So free
reports 12318288 total bytes, 11916148 used, and 402140 free (effectively nothing).
Then, top
reads like so:
Mem: 12318288k total, 11916596k used, 401692k free, 53756k buffers
Swap: 11894776k total, 40596k used, 11854180k free, 11291256k cached
But the first few processes when sorted by MEM% are:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1288 postgres 20 0 6361m 6.0g 6.0g S 0 51.3 4:14.82 postgres
1285 postgres 20 0 6358m 125m 125m S 0 1.0 0:04.04 postgres
490 www-data 20 0 232m 30m 4536 S 0 0.3 0:00.42 apache2
493 www-data 20 0 229m 27m 4412 S 0 0.2 0:00.30 apache2
499 www-data 20 0 227m 25m 4552 S 0 0.2 0:01.30 apache2
500 www-data 20 0 227m 25m 4272 S 0 0.2 0:00.65 apache2
491 www-data 20 0 225m 23m 4328 S 0 0.2 0:00.22 apache2
583 www-data 20 0 226m 23m 4272 S 0 0.2 0:00.17 apache2
32603 nobody 20 0 145m 21m 876 S 0 0.2 0:00.46 memcached
Nothing really seems to be taking up memory other than the 6GB allotted to postgres, so why are all 12GB of RAM used?