I am running ubuntu 8 on a 2GB laptop. Whenever I look in my system monitor, I see my memory usage is slightly below 1G. Why isn't ubuntu using the full 2GB?

Let me say that the full 2GB are recognized, i.e., the system monitor says, usign 48% of 2GB.

  • 3
    Why should it use 100% if it doesn't need? – grawity Jun 1 '09 at 7:03
  • 2
    Are you perhaps referring to the expectation of full RAM utilization due to the disk cache? At any rate, this question does not belong on Server Fault. – Mihai Limbăşan Jun 1 '09 at 7:12
  • @grawity: yes, it should. for buffers and caches. – vartec Jun 1 '09 at 9:01

If you're wondering why it's not using that spare RAM as a buffer/cache, the reason is that Linux doesn't preemptively read content. If you open a few programs it will leave what it reads from those in the disk cache, but it doesn't have a feature like Superfetch from Windows Vista.

For a laptop, this is probably desirable. I doubt any Superfetch-like algorithm could predict what applications I'll use accurately enough to be worth the waste of battery if it's wrong. (Although if I just preloaded firefox I'd be extremely happy!)


What are you running on ubuntu. Are you observing any performance glitches and found that ram is not being utilized or its just general observation.

If you are worried that your ram is not being used, might be the case where it doesnt need to be used.

Try the scripts on the below link and see the utilization of Ram. Hope it will clear your confusion.



Well, one answer is that pages are thrown out of physical ram (paged out) because they haven't been used lately, so using that memory for disk-cache makes more sense. (because that cache is used more often.) You could try

swapoff -a

Which turns off paging. (Actually, it unmounts all paging files/partitions.) That usually causes programs to crowd out the caches, but it might also make the Out-Of-Memory killer kill a few of your hungriest processes. (Like firefox.) When you're fed up, just do

swapon -a

(Notice I said "when", not "if"...)


And you're running just ubuntu? In this case I'd be shocked if it even uses 1 GB.

Memory utilization is a function of applications running - as long as you just browse the web and read mail there's not much sense in using much memory.

I have the feeling that I do not fully understand your question. If my answer is ridiculous with regard to your problem, please rephrase...

  • Linux by design can use RAM as a disk cache, primarily to speed up disk reads. More info in my own answer. – Alex J Jun 1 '09 at 9:47
  • I know, but as the author was not giving any hint on what is running, I didn't make the assumption that there is a lot running. Actually I was hoping that my asking for rephrasing would trigger some more information. Being a fairly unspecific question I do like the answers assembled here though. Who knows - the question might still get rephrased... – Olaf Jun 1 '09 at 19:58

As Alex says Linux does not have a preemptive caching mechanism like Vista/Win7's Superfetch so its normally only going to use memory when its actually requested. Also, depending upon the value of swappiness you have set it could very well be paging much more quickly than you necessarily need

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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