My Linux system sometimes reaches 90% memory usage.

enter image description here

We are running some Java processes, and top shows overall usage as 45%.

If I stop the running processes, usage reduces to 5-10%. I want to list out which process is consuming so much memory, ideally as a table of process ids next to their memory usage.

How can I do that?

marked as duplicate by Stephen Kitt, maxschlepzig, jordanm, chaos, John WH Smith Mar 25 '15 at 19:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Hi Stephen, Is there any option to check which process/service is consuming complete memory? – RAVITEJA DUVVA Mar 25 '15 at 13:37
  • Buffer/cache use doesn't correspond to a process directly, it's memory used by the operating system to avoid repeated disk accesses. It's perfectly normal for all your available memory to end up being used in the buffers and cache; in fact it's a good thing. Check the links given in the multiple answers to the linked question for details. – Stephen Kitt Mar 25 '15 at 13:38
  • @Stephen - As per above link, its stating as OS will consume that memory, But my observation is, when the server is in 90% memory usage, if I stop the running processes its reduced to 5-10% usage. So i thought that some of the process is not releasing the memory properly. How can i prove it, that system or processing consuming that memory? – RAVITEJA DUVVA Mar 25 '15 at 13:52
  • Could you edit your question to add examples of free output in the different situations you're asking about? – Stephen Kitt Mar 25 '15 at 14:05