Interpreting /proc/meminfo
Administrators familiar with the Linux /proc
filesystem know that it is a valuable source for both device status and performance information. The meminfo
entry in this directory will always provide copious data regarding the status, contents, and state of the memory in our server.
We care about this as DBAs because file cache and write buffering can drastically affect disk I/O. We are not especially interested in analyzing PostgreSQL's memory usage itself. At the time of writing, current recommendations suggest that PostgreSQL's performance doesn't really improve after shared buffers reach 8 GB. However, for client connections, inode caches, and dirty page flushing, it's more than relevant.
On a modern Linux kernel, there are over 40 different lines of information in /proc/meminfo
. Much of this data is not exceptionally useful to a DBA, so this recipe will focus on important fields only.
Getting ready
We will be using the watch
and grep
commands in this recipe. It...