Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After using the laptop for several days without rebooting, I start to get into awful swapping problems (combined with very poor responsiveness during IO operations, swapping 10mb could mean that the desktop is unresponsivel for 5s, but 200mb at once will mean that it is completely unresponsive for several minutes straight while it grinds the disk).

With all interface-apps shut down, the system monitor is reporting that over half of my 4GB is being used on something. What exactly, though? System Monitor, when showing 'All Processes', does not list enough to add up to 2GB.

Using the top command shows similar numbers - not a lot of processes using RAM, but the statistics show half used.

My concern is what is actually using the memory up that I don't see?

share|improve this question

closed as off topic by James May 23 '12 at 17:17

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This problem sounds to me like there is a memory leak somewhere. It may be important to find out exactly where it is coming from and get a bug reported. – Christopher Kyle Horton Nov 14 '11 at 7:11
Why is this off topic? The OP is clearly asking "what is using my RAM memory / how do I use Ubuntu to find out this information". – mchid Jan 4 '15 at 18:45
I had that grinding disk problem once and used iotop to see what was responsible. In the end, it turned out that I had not allocated enough space for my swap partition and had swappiness set too low. If the swap partition is not large enough or is full, the system will constantly search for available swapspace that does not exist and so the loop starts and the disk thrashing begins. – mchid Jan 5 '15 at 2:56

The process list of the system monitor is not very detailed on my opinion. You should better use the command


in a terminal to monitor your ressources - system monitor consumes much CPU power with default settings.

Strange, however, is, that your ubuntu uses the swap memory in this situation... on my computer it fills the memory until there is nearly no space left and then uses the swap memory. However, it is long ago that that happened as I have 16 GB memory installed. So if the numbers in top are similar (much free RAM, but using swap), first try to disable swap (comment it out in /etc/fstab), hopefully performance increases then. With 4 GB system memory ubuntu should work without swap for standard applications. But Suspend to disk wont work without swap partition.

share|improve this answer
It shows similar numbers - not a lot of processes using RAM, but the statistics show half used. The swap isn't an issue, I was running really close earlier - 3.5 out of 3.9gb, and it used swap for some things. My concern is what else is actually using it up that I don't see. – Vadi Nov 14 '11 at 8:41
@Vadi use the command free this will list details about your memory and will show you exactly what accounts for the large percentage of ram in use. I can tell you now that it is cached memory, this is why you can't find what's using it because technically nothing is at the moment, however, the next time you go to use the application that is currently sitting in cached ram, it will open way faster than it did the first time. This is how linux works to take full advantage of the resources available. – mchid Jan 4 '15 at 19:27
@Vadi If you add more ram to your system you should notice about the same 50% usage when almost nothing is in use after time. The more applications in your cached ram, the faster your system works because ram is way faster than disk IO. That 50% is typical because swappiness is set to 60 by default so when ram reaches 50-60%, the system will start caching out the stuff in cashed RAM to swap cache instead to make room for the most recently used or in use application to be placed in cached ram or to use ram directly. – mchid Jan 4 '15 at 19:32
@Vadi setting swappiness lower than 60 is deceptive as many argue a >4GB system does not need or use that much ram at any given moment. Setting swappiness lower only allows more applications to be placed in your cached ram (setting to 10 will result in roughly 90% rather than 50%.) The system will seem more responsive because of a lower setting but there are problems when trying to use a bunch of ram for an applicatiion; the system will need to cache out to swap, before ram is made available and that's only as fast as disk IO will allow so the result is momentary freezes/other annoying stuff – mchid Jan 4 '15 at 19:38
@Vadi one last thing: to free up ram, you can manually empty your cached ram by executing the following command echo "3" | sudo tee /proc/sys/vm/drop_caches – mchid Jan 5 '15 at 2:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.