We help IT Professionals succeed at work.

Ubuntu server: How can I see what processes are using memory?

cdukes
cdukes asked
on
1,442 Views
Last Modified: 2013-12-16
I'm trying to figure out what's eating all 4G of memory on my server but top/vmstat/free/ps auc, etc. aren't really telling me anything.
I can see that the system is using all the ram, but I can't tell exactly *what* is using it.
I've tried stopping mysql (which I would have thought was the culprit) but that didn't help.
If you look at the output below, top only shows mysql using 7.2% of memory...what's eating the rest of it?
Examples:
top - 19:18:03 up  6:00,  1 user,  load average: 1.06, 1.22, 1.34
Tasks: 151 total,   1 running, 150 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.5%us,  3.6%sy,  0.0%ni, 73.0%id, 21.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3873336k total,  3757576k used,   115760k free,     7596k buffers
Swap:  2610520k total,    17328k used,  2593192k free,  3362408k cached
 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
17230 mysql     20   0 1853m 271m 2504 S   16  7.2   8:00.20 mysqld
17483 root      20   0 13732  11m  944 S    1  0.3   0:11.53 syslog-ng
18395 www-data  20   0 34588  10m 4300 S    1  0.3   0:02.58 php
18424 root      20   0 34588  10m 4316 S    1  0.3   0:02.57 php

Open in new window

Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Top Expert 2009
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
@stefanx
Understand that it's not a waste - but I have the VMware ESX team asking me why my server is taking up 4G of ram :-)

@mrjoltcola
So by "technically free" you mean there's 3448584 free? (as noted in the output below)
# free
             total       used       free     shared    buffers     cached
Mem:       3873336    3739956     133380          0      16248    3298956
-/+ buffers/cache:     424752    3448584
Swap:      2610520      18544    2591976

Open in new window

Top Expert 2009

Commented:
Correct. And you can run some experiments by starting up some process and watching the cache "free" shrink.

Author

Commented:
Oddly...if I log into webmin, it shows mem usage at:
3.69 GB total, 488.22 MB used
This is weird...?
If I look at the vmware esx server it shows memory usage at 3.2g
Is there anything I can do to make the vmware team feel better?
Top Expert 2009

Commented:
>>Is there anything I can do to make the vmware team feel better?

I don't know. Educate them on Linux? Why are they worried, is there some sort of system performance problem?

Author

Commented:
Yeah...good point. I've supplied them with my findings, thanks for your help!

Commented:
Mybe your VMWare team should just assign you less memory?
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.