免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4445 | 回复: 12
打印 上一主题 下一主题

[新手入门] 关于vmtune [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-09-10 14:37 |只看该作者 |倒序浏览
请问vmtune是用来调整什么的啊。
谢谢指导。能否说的详细些。

论坛徽章:
0
2 [报告]
发表于 2003-09-10 14:45 |只看该作者

关于vmtune

vmtune Command

Purpose

Changes operational parameters of the Virtual Memory Manager and other AIX components.


Syntax
vmtune [ -a ] [ -b Numfsbuf] [ -B Numpbuf ] [ -c Nmclust ] [ -C 0 | 1 ] [ -d 0 | 1 ] [ -f MinFree ] [ -F MaxFree ] [ -g LargePageSize ] [ -h 0 | 1 ] [ -k NpsKill ] [ -l LruBucket ] [ -L LargePages ] [ -M MaxPin ] [ -n uid ] [ -N Pd_Npages ] [ -p minperm ] [ -P MaxPerm ] [ -r MinPgAhead ] [ -R MaxPgAhead ] [ -s SyncReleaseInodeLock ] [ -S 0 | 1 ] [ -t maxclient ][ -u lvm_Bufcnt] [ -U unixfile ] [ -w NpsWarn ] [ -W MaxRandWrt]


Description
The Virtual Memory Manager (VMM) maintains a list of free real-memory page frames. These page frames are available to hold virtual-memory pages needed to satisfy a page fault. When the number of pages on the free list falls below that specified by the MinFree parameter, the VMM begins to steal pages to add to the free list. The VMM continues to steal pages until the free list has at least the number of pages specified by the MaxFree parameter.

If the number of file pages (permanent pages) in memory is less than the number specified by the minperm parameter, the VMM steals frames from either computational or file pages, regardless of repage rates. If the number of file pages is greater than the number specified by the MaxPerm parameter, the VMM steals frames only from file pages. Between the two, the VMM normally steals only file pages, but if the repage rate for file pages is higher than the repage rate for computational pages, computational pages are stolen as well.

If a process appears to be reading sequentially from a file, the values specified by the MinPgAhead parameter determine the number of pages to be read ahead when the condition is first detected. The value specified by the MaxPgAhead parameter sets the maximum number of pages that will be read ahead, regardless of the number of preceding sequential reads.

AIX Version 4 of the operating system allows tuning of the number of file system bufstructs (Numfsbuf) and the amount of data processed by the write-behind algorithm (Nmclust).

In AIX Version 4 of the operating system, you can also modify the thresholds that are used to decide when the system is running out of paging space. The NpsWarn parameter specifies the number of paging-space pages available at which the system begins warning processes that paging space is low. The NpsKill parameter specifies the number of paging-space pages available at which the system begins killing processes to release paging space.

vmtune can only be executed by root. Changes made by the vmtune command last until the next reboot of the system. If a permanent change in VMM parameters is needed, an appropriate vmtune command should be put in inittab.


Attention: Misuse of this command can cause performance degradation or operating-system failure. Before experimenting with vmtune, you should be thoroughly familiar with both Performance Overview of the Virtual Memory Manager (VMM) and Tuning VMM Page Replacement.

Flags

-a  Displays the current statistic counters.  
-b Numfsbuf  Specifies the number of file system bufstructs. The default value is 64.  
-B Numpbuf  Specifies the number of pbufs used by the LVM. The maximum value is 128.  
-c Nmclust  Specifies the number of 16KB clusters processed by write behind. The default value is 1.  
-C  Enables page coloring for specific hardware platforms. When enabled, real memory is carefully assigned to virtual memory. On a system with a direct-mapped cache and certain workloads, this can provide more constant system performance. The bosboot command must be run and the system rebooted for this change to take affect.  
-d  Turns on or off deferred paging space allocation. By default, disk blocks for paging space are not allocated until pageout is actually required. This option allows this behavior to change so that the disk block is allocated when the memory is referenced.  
-f MinFree  Specifies the minimum number of frames on the free list. This number can range from 8 to 204800.  
-F MaxFree  Specifies the number of frames on the free list at which page stealing is to stop. This number can range from 16 to 204800 but must be greater than the number specified by the MinFree parameter by at least the value of MaxPgAhead.  
-g LargePageSize  Specifies the size in bytes of the hardware-supported large pages used for the implementation for the shmget( ) system call with the SHM_LGPAGE flag. This must be enabled with a non-zero value for the -L flag and the bosboot command must be run and the system rebooted for this change to take affect.  
-h  Specifies that maxperm (-P) should be hard limit. By default it is a soft limit and numperm is allowed to grow beyond maxperm as long as there is free real memory available.  
-k NpsKill  Specifies the number of free paging-space pages at which AIX begins killing processes.  
-l LruBucket  Specifies the size (in 4K pages) of the least recently used (lru) page-replacement bucket size. This is the number of page frames which will be examined at one time for possible pageouts when a free frame is needed. A lower number will result in lower latency when looking for a free frame, but will also result in behavior that is not as much like a true lru algorithm. The default value is 512MB and the minimum is 256MB. Tuning this option is not recommended.  
-L LargePages  Specifies the number of large pages to reserve for implementing the shmget( ) system call with the SHM_LGPAGE flag. For this change to take effect, you must specify the -g flag, run the bosboot command, and reboot the system.  
-M MaxPin  Specifies the maximum percentage of real memory that can be pinned. The default value is 80. If this value is changed, the new value should ensure that at least 4MB of real memory will be left unpinned for use by the kernel.  
-n uid  Specifies that processes with uid less than uid should not be killed when paging space is low. Setting this to 1 would prevent root processes from being killed.  
-N Pd_Npages  Specifies the number of pages that should be deleted in one chunk from RAM when a file is deleted. The default value is the largest possible file size divided by the page size (currently 4096). If the largest possible file size is 2GB, then Pd_Npages is by default 524288. Tuning this option is really only useful for real-time applications.  
-p minperm  Specifies the point below which file pages are protected from the repage algorithm. This value is a percentage of the total real-memory page frames in the system. The specified value must be greater than or equal to 5.  
-P MaxPerm  Specifies the point above which the page stealing algorithm steals only file pages. This value is expressed as a percentage of the total real-memory page frames in the system. The specified value must be greater than or equal to 5.  
-r MinPgAhead  Specifies the number of pages with which sequential read-ahead starts. This value can range from 0 through 4096. It should be a power of 2.  
-R MaxPgAhead  Specifies the maximum number of pages to be read ahead. This value can range from 0 through 4096. It should be a power of 2 and should be greater than or equal to MinPgAhead.  
-s SyncReleaseInodeLock  Enables the code which minimizes the time spent holding inode lock during sync by flushing dirty pages before calling _commit. SyncReleaseInodeLock is a boolean variable: 0 to disable or a positive integer to enable. The default is 0.  
-S  Enables the SHM_PIN flag on shmget( ) system call. By default this flag is ignored.  
-t maxclient  Specifies the point above which the page stealing algorithm steals only client file pages. This value is expressed as a percentage of the total real-memory page frames in the system.  
-u lvm_Bufcnt  Specifies the number of LVM buffers for raw physical I/Os. The default value is 9. The possible values can range between 1 and 64. This option is only available in AIX Version 4.  
-U unixfile  Specifies the name of the AIX file to patch for the -m and -C flags. The default is /usr/lib/boot/unix_mp.  
-w NpsWarn  Specifies the number of free paging-space pages at which the operating system begins sending the SIGDANGER signal to processes.  
-W MaxRandWrt  Specifies a threshold (in 4KB pages) for random writes to accumulate in RAM before these pages are sync'd to disk via a write-behind algorithm. This threshold is on a per file basis.
The -W MaxRandWrt option is only available in AIX 4.1.3 and later. The default value of MaxRandWrt is 0, which disables random write-behind.

论坛徽章:
0
3 [报告]
发表于 2003-09-10 18:49 |只看该作者

关于vmtune

楼上好有耐心,

论坛徽章:
0
4 [报告]
发表于 2003-09-11 11:01 |只看该作者

关于vmtune

man 看的吧

论坛徽章:
0
5 [报告]
发表于 2003-09-11 11:39 |只看该作者

关于vmtune

vmtune,故名思义,tune VM。

论坛徽章:
0
6 [报告]
发表于 2003-09-11 13:03 |只看该作者

关于vmtune

[quote]原帖由 "炸鸡"]vmtune,故名思义,tune VM。[/quote 发表:
     

呵呵,这个解释倒挺容易记的。

论坛徽章:
0
7 [报告]
发表于 2003-09-11 13:24 |只看该作者

关于vmtune

我都知道它是tune vm的。但是它tune vm和tune pagespace有什么不同吗?
各位朋友,能说明一下吗?
virtual memory 和pagespace有什么区别。
另外pagespace假如是设为512 m,那么在文件系统中一定留给它512m,而不做其他用途吗?怎么理解啊。

论坛徽章:
0
8 [报告]
发表于 2003-09-11 14:38 |只看该作者

关于vmtune

个人认为vmtune是调整系统有关参数的,楼上所说的是tune pagespaces 只是调整pagespace的相关的东西吧

论坛徽章:
0
9 [报告]
发表于 2003-09-11 14:55 |只看该作者

关于vmtune

物理内存和PageSpace加在一起构成了虚拟内存(VM),由于Pagespace实际上是硬盘,所以如何优化内存的使用率就是优化系统性能的一个内容.vmtune基本上就是如何控制物理内的分配和(与pagespace之间)调页算法的行为的,所以它也隐含了对Pagespace的影响.

Pagespace是专给虚拟内存的,不可作为它用

论坛徽章:
0
10 [报告]
发表于 2003-09-11 23:41 |只看该作者

关于vmtune

up!vmtune是否有个实例,这样好像好些!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP