top at the command line.
Then look at these two lines:
Mem: 8092444k total, 7647620k used, 444824k free, 550248k buffers
Swap: 8388604k total, 107804k used, 8280800k free, 3228520k cached
- Buffers is the amount of memory used for file system meta information like directories
- Cached is the amount of memory used as disk cache, for files
These two pools grow/shrink automatically, depending on the amount of memory actual processes require. When you have a lot of memory and only small process memory footprint, it is good that your RAM is used as disk cache as it improves system responsiveness. Your machine doesn't have to read the disk every time over and over again. On most machines (depending on RAM size) after a while nearly the whole memory will be in use, either for processes or as disk cache.
- Used (first line) is process memory + buffers + cached
- Free (first line) is readily available RAM
- Swap is the size of your swap space
- Used (second line) is amount of swap space in use
- Free (second line) is free swap space
Swap space is virtual memory, memory on disk rather than RAM. Having it is extremely valuable, but it is slow. The kernel provides a lot of intelligence to decide whether to swap out (unused) process memory or to give up some disk cache.