how can I see the memory usage of a Linux process?
You might want to have a look at 'pmap', e.g.
At the bottom you will see how much memory is shared and how much of it is private to the process. For example: Some applications look like they use an awful lot of memory, but in reality it is just a lot of shared libraries that are taken into the calculation.
This will show the amount of memory the program has requested (virtual set size), how much is currently stored in RAM (resident set size), and what percentage that is of your total RAM.
For an explanation of the first two numbers that includes examples of analyzing real program behavior, read this atop case study analyzing memory leakage. If that's too much, at least read the "introduction to virtual memory" section.
Calculating the resident set size of a program is complicated by shared memory. Devin has a great explanation how shared memory can be accounted for using pmap to determine the marginal cost of starting another process.
To really dig in when compiling from source, tcmalloc from google perftools.
For ongoing trending, have a look at
Average of 10 samples taken sequently after an hour. If I'm missing something, which I prol am, let me know.