LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   700mb of memory used, but processes memory usage appears not match it? (https://www.linuxquestions.org/questions/linux-general-1/700mb-of-memory-used-but-processes-memory-usage-appears-not-match-it-4175516947/)

postcd 08-31-2014 06:22 AM

700mb of memory used, but processes memory usage appears not match it?
 
Hello, these processes is all what "top" returns long time:

http://i.snag.gy/WQxiZ.jpg

but i dont see how the processes memory usage match the 756Mb memory usage mentioned in the top sumary..? why? how i can discover where the memory is used, this is strange, because i cant believe vps is using that much memory, only these processes.

thx

evo2 09-01-2014 01:59 AM

Hi,

this is usually just disk cache. See http://www.linuxatemyram.com/ for an explanation.

Evo2.

johnsfine 09-01-2014 05:48 AM

This system is running inside a VM, rather than on bare hardware. That means the link evo2 posted does not answer your question at all.

You can sort by the RES column in top to get a better idea what your processes are really using. In the form you displayed you can't tell whether more processes with large RES are hidden off the bottom of the display.

I expect even sorting top correctly won't show your answer. My best guess is that the hosting system is borrowing back memory for use in other VMs.

Quote:

Originally Posted by evo2 (Post 5230511)
this is usually just disk cache. See http://www.linuxatemyram.com/ for an explanation.

You should look at the contents of the post, not just its title, before providing that generic answer. In most cases the contents of the post contain the details needed to tell you whether that generic answer applies to this situation. In this case, the zeroes for cache and buffers tell you that generic answer does not apply.

sundialsvcs 09-01-2014 06:56 AM

Remember that every operating system is designed to be "lazy." If there's a memory-resource available for use, then, since memory is fast and free, use it for something. Then, don't do anything to change that situation unless, and until, some actual pressure obliges you to do so.

For example, if you run a particular program, the system won't go out of its way to unload process segments from memory (and so on ...), unless there is pressure to use the memory for some other purpose. After all, you are likely to run the same program again soon. If your program needs more memory and there's no pressure to limit how much it can have, then the OS will just grab some more of "the free stuff" and give it to you.

When, and only if, competition for the memory resource actually develops, the OS will then start to clean house ... starting with the cheapest thing to get rid of, which is the various caches, and once again doing it "lazily."

"So what if the process has a lot of memory allocated to it? Who cares right now? Which one of the other processes under my control must be given some of it, such that I must take some action right now? If that answer is 'no one cares,' then, 'neither do I.' Better that the CPU time be consumed instead by 'hauling revenue freight,' rather than my 'overhead.'"

evo2 09-01-2014 08:28 AM

Hi,
Quote:

Originally Posted by johnsfine (Post 5230577)
In this case, the zeroes for cache and buffers tell you that generic answer does not apply.

Interesting, and if it had have been text instead of a link to an image I probably would have seen it.

Cheers,

Evo2.

johnsfine 09-01-2014 09:05 AM

Quote:

Originally Posted by evo2 (Post 5230647)
if it had have been text instead of a link to an image I probably would have seen it.

Sorry, I didn't know it would look that different in a different browser. The image is inline, not a link, when I look at it in Firefox.

For future reference for the OP, pasting text inside a [code] block is better than pasting an image of text.

evo2 09-01-2014 09:20 AM

Hi,
Quote:

Originally Posted by johnsfine (Post 5230660)
Sorry, I didn't know it would look that different in a different browser. The image is inline, not a link, when I look at it in Firefox.

Curious. For me chromium and iceweasel (Debian Jessie) present it as a link but Midori shows it inline, along with a bunch adds, one of which is animated and appears to link to a malware site...

Evo2.


All times are GMT -5. The time now is 12:58 PM.