Process memory reports on Linux are difficult to interpret for various reasons. One of the main reasons is the way processes can share or re-use memory allocated to another process. Linux normally allocates separate memory areas to different processes, of course. There are two main exceptions to this rule.
When several processes use the same code libraries, there will only be one copy of that code in physical memory, re-used by all the processes.
The second exception is a shared memory:
This is usually not significant, because very few programs use large blocks of shared memory.
The first 10 process by memory
ps aux --sort -rss | head -10
Type | Kb |
---|---|
MemTotal | 65960736 |
MemFree | 619152 |
MemAvailable | 47707620 |
Buffers | 190928 |
Cached | 10569080 |
SwapCached | 14316 |
Active | 19988984 |
Inactive | 7073804 |
Active(anon) | 15443864 |
Inactive(anon) | 1486776 |
Active(file) | 4545120 |
Inactive(file) | 5587028 |
Unevictable | 0 |
Mlocked | 0 |
SwapTotal | 2097148 |
SwapFree | 874696 |
Dirty | 316 |
Writeback | 4 |
AnonPages | 16288656 |
Mapped | 203568 |
Shmem | 627856 |
Slab | 37646316 |
SReclaimable | 37498424 |
SUnreclaim | 147892 |
KernelStack | 33136 |
PageTables | 60980 |
NFS_Unstable | 0 |
Bounce | 0 |
WritebackTmp | 0 |
CommitLimit | 35077516 |
Committed_AS | 17919820 |
VmallocTotal | 34359738367 |
VmallocUsed | 255600 |
VmallocChunk | 34359318220 |
HardwareCorrupted | 0 |
AnonHugePages | 606208 |
HugePages_Total | 0 |
HugePages_Free | 0 |
HugePages_Rsvd | 0 |
HugePages_Surp | 0 |
Hugepagesize | 2048 |
DirectMap4k | 210880 |
DirectMap2M | 22857728 |
DirectMap1G | 46137344 |
with the free command
total used free shared buff/cache available
Mem: 62G 16G 772M 613M 46G 45G
Swap: 2.0G 1.2G 854M