- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Percentage of total memory utilization is shown ab...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 11:25 AM
тАО07-14-2009 11:25 AM
In some of linux servers, The percentage of total mem utilization is above 100.
pmem is showing percentage value of rss.
rss is the size of physical memory that a process is using.
Ex:
server 1:
[root@emdlagas1109 ~]# ps -eo user,pid,pmem,comm | awk '{x += $3} END {print x}'
34.2
server 2:
-bash-3.00# ps -eo user,pid,pmem,size,comm | awk '{x += $3} END {print x}'
181.9
in second one it showing as 181.9%, how it is possible.
Pls explain me the purpose of pmem.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 01:16 PM
тАО07-14-2009 01:16 PM
SolutionThe problem lies in accounting for shared code and data. That is, if two processes use a shared library and/or use common shared memory segments for interprocess communication, the simple sum of the memory requirements for the two processes will be larger than their real contribution.
If this is something more than an academic question, what are you trying to solve?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 03:36 AM
тАО07-15-2009 03:36 AM
Re: Percentage of total memory utilization is shown above 100%.
How can i find the exact percentage of total memory in Linux servers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 06:12 AM
тАО07-15-2009 06:12 AM
Re: Percentage of total memory utilization is shown above 100%.
> How can i find the exact percentage of total memory in Linux servers.
First, why would you care?
Second, without a tool and a rule to measure and apportion memory used by more than one process to only one process (as I first wrote) you have no chance to define "exact percentage".
Third, what would you do if you did have an exact measurement?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 06:59 AM
тАО07-15-2009 06:59 AM
Re: Percentage of total memory utilization is shown above 100%.
question is as well, what in your meaning is percentage of memory usage...
all the memory not used by user processes is automaticaly acquired by kernel for buffers and caches, so the usage is still reaching almost 100%
emha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 07:05 AM
тАО07-15-2009 07:05 AM
Re: Percentage of total memory utilization is shown above 100%.
We have to tell the percentage of total memory utilization to out project manager at regular intervals.
so that i am asking "how to find the percentage of total memory utilization".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 09:43 AM
тАО07-15-2009 09:43 AM
Re: Percentage of total memory utilization is shown above 100%.
Change the basis of the analysis.
Memory in this context is being shown as physical memory.
Of course you can utilize more than 100% of it because you save swap.
Memory in the HP-UX world is defined as physical memory plus swap.
You need to get the swap size some how and calculate memory use based on real memory capacity which is swap plus physical ram.
Or you can decide that you are utilizing more than 100% of RAM. That is quite possible.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 09:54 AM
тАО07-15-2009 09:54 AM
Re: Percentage of total memory utilization is shown above 100%.
> so that i am asking "how to find the percentage of total memory utilization".
You could use 'free()' and compute the ratio of the total memory to the used memory:
# free|awk '/^Mem/ {printf "%4.1f\n",$3/$2*100}'
For example, I had:
# free
total used free shared buffers cached
Mem: 513692 484308 29384 0 33052 308588
-/+ buffers/cache: 142668 371024
Swap: 765944 0 765944
...so:
# free|awk '/^Mem/ {printf "%4.1f\n",$3/$2*100}'
94.4
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 10:12 AM
тАО07-15-2009 10:12 AM
Re: Percentage of total memory utilization is shown above 100%.
I have tested both of JRF's commands on CentOS 5.2
Works great.
One problem with the concept.
By default RHEL assigns most spare memory to the buffer cache.
You will find on systems that are not busy memory utilization is nearly always between 90% and 99%.
Is the buffer pool really used memory?
I say no, because the instant a process wants memory, its pulled out of the pool.
You will probably using JRF's excellent code see a flat line on memory use.
Mem: 329728 324512 5216 0 3624 163188
-/+ buffers/cache: 157700 172028
Swap: 1048568 216 1048352
This is output of free from my system. Buffer cache in Linux is like the buffer pool in HP-UX. Except there is virtually no cost in moving memory in and out of it.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2009 11:26 PM
тАО07-15-2009 11:26 PM
Re: Percentage of total memory utilization is shown above 100%.
slight modification of James' formula to get usage just of user processes
free|awk '/^Mem/ {printf "%4.1f\n",($2-$4-$6-$7)/$2*100}'
emha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 08:04 AM
тАО07-14-2010 08:04 AM
Re: Percentage of total memory utilization is shown above 100%.
in linux, Kernell uses all available physical memory cache to maximize the use of RAM, and so expedite the process. In this case you always see 90 or 99% of RAM used
total used free buffers cached
Mem: 16055 4264 11790 15 3027
-/+ b/cache 1221 14833
Swap: 8189 0 8189
as you can see, the amount of free memory and buffer cache is equal to the free virtual memory, if you make a drop_caches in RH or CentOS, you can watch free virtual memory to continue with the same value, in this case 14 833
free -m|awk '{print $3}'|tail -2|head -1 this is de used memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 09:40 AM
тАО07-14-2010 09:40 AM
Re: Percentage of total memory utilization is shown above 100%.
Memory use can be over 100%, depending on the definition of memory.
If you define memory as RAM, and you have programs of services running in excess of that total, inactive processes will be swapped to disk. Memory use will exceed RAM.
If you define memory as ram plus swap, than it is not possible to exceed 100% memory utilization.
I believe the statement on server 2 is a situation defined above, where memory is being calculated based on physical memory, not total capacity.
What does vmstat show on server 2?
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 10:19 AM
тАО07-14-2010 10:19 AM
Re: Percentage of total memory utilization is shown above 100%.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2010 01:44 PM
тАО07-16-2010 01:44 PM
Re: Percentage of total memory utilization is shown above 100%.
I understand your requirement, in a simple manner the solution to your query would be to use free -m
For eg:
$ free -m
total used free shared buffers cached
Mem: 32186 18596 13590 0 828 13587
-/+ buffers/cache: 4180 28006
Swap: 16386 0 16386
From the above o/p the amount of memory actually in use is 4180( free command takes care of calculating the buffers and cache). From this, you can arrive at the percentage usage of memory on your linux server ( In this case would be ~13% used)
Thanks,
RB