The analysis problem in the results of ps and svmon is that the sum of the issue part of svmon must match the size of the actual ps result, but in the case of page-out, the ps side is actually displayed larger.
Memory Management Policy for HP
This section describes the memory management of the HP operating system.
rx6600:[/] pmap 12379 12379: /altibase_home/bin/altibase -p boot from admin OFFSET VSZ RSZ TYPE PRM FILE 0 4K 4K SD(170) r-- [nullderef] 4000000000000000 15.1M 11.5M SC(2) r-x [text] 6000000000000000 901M 658M PD rw- [data] 9fffffff7d67f000 72K 64K PD rw- [uarea] 9fffffff7d7af000 72K 64K PD rw- [uarea]
In HP, the exact memory usages of a process can be checked with the map command. The result is similar to that of Solaris.
HP can adjust the settings for file cache in the same way as AIX. Since these values are related to the overall performance, the recommended value is variable depending on the situation, but in general, it is recommended to set 5%(min)/15%(max).
|dbc_max_pct||Maximum threshold of memory to be used for file cache|
|dbc_min_pct||Minimum threshold of memory to be used for file cache|
Memory Management Policy for Linux
This section describes the memory management of the Linux operating system.
Linux Memory Management
Linux has a memory usage policy similar to AIX for the file cache part. In other words, it tries to use all the free memory as a file cache. However, starting with kernel 2.6, there is a limit on this part, and the usage of file cache can be limited.
Shell> cat /proc/sys/vm/swappiness
Basically, it is set to 60(%), and there are some complex arithmetic expressions, but when the physical memory starts to be used beyond the value set in swappiness, swapping starts unconditionally.
This is because the Linux system itself generates swapping in an effort to secure the file cache below the set value.
However, since this part incurs a cost due to swapping that the user wants or does not want, it can worsen the system performance. Although currently, Altibase does not make any special recommendations, it is recommended to set this kernel value to “0” in MySQL and etc.
## Additional conditions to Arena-related matters (when writing)
- This feature was added in red Hat Enterprise Linux 6 to improve performance issues due to memory contention between threads in a multi-threaded application environment.
- The default value is the number of CPU core * MALLOC_ARENA_TEST.
- The default value of MALLOC_ARENA_TEST environment variable
- 2 for 32-bit
- 8 for 64-bit
- The MALLOC_ARENA_MAX environment variable operates properly in glibc2.10 or later.
Checking Linux memory
The memory usage of a process can be checked with the top or map command.
Why doesn't the vsz decrease?
Generally, the operating system returns the memory area used by the process to the free area only when the process ends.
In other words, even if a process calls free() on a memory area explicitly allocated by a user, the area is not released immediately.
This is because kernel cost can have a significant performance impact if the memory manager of the operating system expects the process to reuse the freed memory area by the process to remain in the form of a fragment and reconfigured to a free-list of allocable segments.
Therefore, even if the process is free(), the operating system sees a phenomenon in which the size of the VSZ does not decrease with an actual monitoring tool, for the reason described above.