Here's the output from top on a box with 8GB of ram:
top - 13:32:44 up 3 days, 4:17, 4 users, load average: 1.10, 1.12, 1.09
Tasks: 125 total, 1 running, 124 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 3.2% sy, 0.0% ni, 49.8% id, 43.9% wa, 0.0% hi, 0.2% si
Mem: 7979656k total, 7455752k used, 523904k free, 56020k buffers
Swap: 1052216k total, 0k used, 1052216k free, 6065544k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP DATA COMMAND
25747 mysql 16 0 5464m 1.0g 3912 S 12.0 13.5 4:32.87 4.3g 5.3g mysqld
1 root 16 0 724 256 216 S 0.0 0.0 0:08.04 468 224 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.05 0 0 migration/0
Note the first process - mysqld. It shows 4.3GB of swap, yet the header shows 0k of swap space used - and in fact there is only 1GB of available swap space. And the actual RAM isn't maxed out yet.
So what is my misunderstanding here? What does the SWAP column in the top output really mean??
top - 13:32:44 up 3 days, 4:17, 4 users, load average: 1.10, 1.12, 1.09
Tasks: 125 total, 1 running, 124 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 3.2% sy, 0.0% ni, 49.8% id, 43.9% wa, 0.0% hi, 0.2% si
Mem: 7979656k total, 7455752k used, 523904k free, 56020k buffers
Swap: 1052216k total, 0k used, 1052216k free, 6065544k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP DATA COMMAND
25747 mysql 16 0 5464m 1.0g 3912 S 12.0 13.5 4:32.87 4.3g 5.3g mysqld
1 root 16 0 724 256 216 S 0.0 0.0 0:08.04 468 224 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.05 0 0 migration/0
Note the first process - mysqld. It shows 4.3GB of swap, yet the header shows 0k of swap space used - and in fact there is only 1GB of available swap space. And the actual RAM isn't maxed out yet.
So what is my misunderstanding here? What does the SWAP column in the top output really mean??