0

I have a problem with Ubuntu's memory management. I am running 32-bit Ubuntu 13.10.

My system is only running Chromium. However, when I run free -m, it returns:

              total       used       free     shared    buffers     cached
Mem:          5861       4525       1336          0        638       3385
-/+ buffers/cache:        500       5360
Swap:            0          0          0

I can not find why there is so much memory being used. Why is this?

Seth
  • 58,122

1 Answers1

2

First off, like @CassioSposito said, you are using 32-bit Ubuntu. You should really be using 64-bit if your processor supports it.

Ubuntu likes eating up RAM because it likes caching things. Ubuntu, in other words, likes storing stuff in memory because it's faster to read/write. It also likes doing this because it doesn't like wasting valuable RAM.

The cache size is dynamically fluctuating and is based off of two things:

  • The amount of memory needed by other programs
  • The amount of free memory.

Ubuntu will use almost all of the free memory for its cache, but it will remove stuff from cache when other programs need the memory.

It is perfectly normal behavior. In fact, most modern operating systems do this because it makes the system faster and has no real downsides.

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
  • In fact all modern operating systems do this because there's no significant drawback to this behaviour. – David Foerster Sep 06 '14 at 18:12
  • Good answer, just wanted to add that the RAM you are actually using is chache minus used memory, in your case this is 4525-3385=1140MB. Which is quite normal. Also you don't want to have much RAM being free since it's just wasted memory, if it's not being used then it's just laying around consuming power... – Alvar Sep 06 '14 at 18:37