Values for minfree and maxfree parameters
The purpose of the free list is to keep track of real-memory page frames released by terminating processes and to supply page frames to requesters immediately, without forcing them to wait for page steals and the accompanying I/O to complete.
The minfree limit specifies the free-list size below which page stealing to replenish the free list is to be started. The maxfree parameter is the size above which stealing ends and the minfree value is used to start page stealing. When the number of persistent pages is equal to or less than the difference between the values of the maxfree and minfree parameters, or when the number of client pages is equal to or less than the difference between the values of the maxclient and minfree parameters, page stealing starts.
The objectives in tuning these limits are to ensure the following:
- Any activity that has critical response-time objectives can always get the page frames it needs from the free list.
- The system does not experience unnecessarily high levels of I/O because of premature stealing of pages to expand the free list.
The default values of the minfree and maxfree parameters depend on the memory size of the machine. The difference between the maxfree and minfree parameters should always be equal to or greater than the value of the maxpgahead parameter, if you are using JFS. For Enhanced JFS, the difference between the maxfree and minfree parameters should always be equal to or greater than the value of the j2_maxPageReadAhead parameter. If you are using both JFS and Enhanced JFS, you should set the value of the minfree parameter to a number that is greater than or equal to the larger pageahead value of the two file systems.
The minfree and maxfree parameter values are different if there is more than one memory pool. Memory pools were introduced for MP systems with large amounts of RAM. Each memory pool has its own minfree and maxfree values. in earlier AIX versions, the minfree and maxfree values shown by the vmo command are the sum of the minfree and maxfree values for all memory pools. The values shown by vmo command are per memory pool.
# vmstat 1
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
2 0 70668 414 0 0 0 0 0 0 178 7364 257 35 14 0 51
1 0 70669 755 0 0 0 0 0 0 196 19119 272 40 20 0 41
1 0 70704 707 0 0 0 0 0 0 190 8506 272 37 8 0 55
1 0 70670 725 0 0 0 0 0 0 205 8821 313 41 10 0 49
6 4 73362 123 0 5 36 313 1646 0 361 16256 863 47 53 0 0
5 3 73547 126 0 6 26 152 614 0 324 18243 1248 39 61 0 0
4 4 73591 124 0 3 11 90 372 0 307 19741 1287 39 61 0 0
6 4 73540 127 0 4 30 122 358 0 340 20097 970 44 56 0 0
8 3 73825 116 0 18 22 220 781 0 324 16012 934 51 49 0 0
8 4 74309 26 0 45 62 291 1079 0 352 14674 972 44 56 0 0
2 9 75322 0 0 41 87 283 943 0 403 16950 1071 44 56 0 0
5 7 75020 74 0 23 119 410 1611 0 353 15908 854 49 51 0 0
In the above example output, you can see that the minfree value of 120 is constantly being reached. Therefore, page replacement occurs and in this particular case, the free list even reaches 0 at one point. When that happens, threads needing free frames get blocked and cannot run until page replacement frees up some pages. To prevent this situation, you might consider increasing the minfree and maxfree values.
# vmo -o minfree=1000 -o maxfree=1008
To make this a permanent change, include the -p flag: # vmo -o minfree=1000 -o maxfree=1008 -p
The default value of the minfree parameter
is increased to 960 per memory pool and the default value of the maxfree parameter
is increased to 1088 per memory pool.