Top reports that the system is using 93% (7.2GB) of the total 7.6GB RAM. However, the sum of all running processes as calculated below is 2.2GB! What is wrong? Could be something to do with the fact that it is a VMWare virtual server? Edit: I added the output of free
.
$ top
top - 12:00:28 up 116 days, 22:10, 2 users, load average: 0.70, 0.24, 0.14
Tasks: 134 total, 1 running, 133 sleeping, 0 stopped, 0 zombie
Cpu(s): 35.2%us, 9.1%sy, 0.0%ni, 16.6%id, 8.6%wa, 0.5%hi, 30.0%si, 0.0%st
Mem: 8061584k total, 7513516k used, 548068k free, 9352k buffers
Swap: 2047996k total, 1559912k used, 488084k free, 80004k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10478 mysql 20 0 4181m 1.0g 3300 S 37.0 13.7 12212:52 mysqld
32309 app 0 -20 552m 108m 4520 S 0.0 1.4 0:02.60 ruby
32199 root 20 0 1026m 99m 5680 S 12.2 1.3 0:07.35 ruby
32526 app 20 0 661m 99m 6112 S 52.0 1.3 0:12.77 ruby
32303 app 0 -20 549m 96m 4324 S 0.0 1.2 0:03.58 ruby
32300 app 0 -20 550m 93m 4304 S 0.0 1.2 0:03.15 ruby
22472 app 20 0 1811m 64m 2420 S 11.3 0.8 152:50.74 java
32306 app 0 -20 534m 33m 1920 S 0.0 0.4 0:00.03 ruby
24600 app 0 -20 534m 28m 1584 S 0.0 0.4 0:12.29 ruby
17998 root 20 0 1125m 25m 1284 S 0.0 0.3 30:33.06 ruby
18089 root 20 0 953m 17m 1868 S 0.0 0.2 0:40.92 node
$ free -m
total used free shared buffers cached
Mem: 7872 7372 499 0 1 51
-/+ buffers/cache: 7319 553
Swap: 1999 1436 563
$ sudo ps -A -o rss | awk '{ sum += $1} END { print sum }'
2300228 (2.2GB)
$ sudo ps -A -o size | awk '{ sum += $1} END { print sum }'
12359284 (11.8GB)