I have allowed Postgres 30GB of RAM on our server. When running intensive tasks, I think it is swapping.
As I understand it:
- VIRT - virtual memory (ie: swapped to disk)
- RES - complete memory usage
- SHR - shared memory - I'm not clear on what this is
See attached
I think this is saying:
- complete memory usage by Postgres ~60GB, of which 30GB is swapped
- complete memory usage by Ruby ~40GB
If this is the case, does giving Postgres another 30 or 40GB RAM seem like a good idea?
Reference
http://mugurel.sumanariu.ro/linux/the-difference-among-virt-res-and-shr-in-top-output/