vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| shaun.lukhan@eskom.co.za wrote: |Hi |Which is the best tool to use for checking how much memory a process uses ? |Ist it ps -efl, glance or top ? |Why don the values for a specific process from these different tools match |? Glance is the best tool, as it gives the most complete information. The various tools report different numbers because they disagree about which regions to report as part of the size and how to count shared memory regions. When looking at that size of a process, there really are three different categories of size. 1. The amount of RAM in use, or resident set size, (RSS). 2. The amount of virtual memory address space, (VSS). 3. The amount of swap space allocated or reserved. Most tools report one of the first two numbers for some set of regions. The top command changed in patch PHCO_25204 for 11.11 and PHCO_26020 for 11.00. It used to report the RSS of all regions, but the VSS of only the classic text, data, and stack region. The newer version reports VSS for other regions such as shared memory and private mmap regions. The amount of RAM held by a process can vary quite a bit depending on the amount available on the system. The RAM is usually allocated a page at a time on demand. A process can have some of its memory contents pushed out to swap. Code and static data from a text area can be paged in and released without using swap to back it up. Seldom used memory areas will linger in RAM if there is no other need for that RAM. There is no single best way to count the size for shared memory regions. It could be argued that each process is responsible for all or none of the size of a region that it shares with other processes. The memory summary in glance actually divides the size of shared memory regions by the number of processes sharing each region. You can also use glance to look at the actual list of regions and the RAM used for each one. -- Mike Stroyan, mike.stroyan@hp.com |