How to show the memory details of a process in Linux

Recently we are evaluating the memory consumption of redis process when it is rewriting of append-only-file. In this situation, redis will firstly fork(), and then the child process will write all the data from memory to new AOF file and the parent process will still provide service to custom. The new written key/value will make the page dirty and hence consume a lot of new memory (a small key/value pair may cause a whole 4K page be allocated).

We write a simple shell to monitor the detail memory consumption of this process (which is referred from

The result looks like this:

Divide Shared Memory by PSS (Proportional Set Size) is about 3, which means there are 3 processes using this 63MB share-memory.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.