Baffling Memory leak. What is using ~10GB of memory on this system?

I am running a box with 32GB of memory, and the standout difference is the DirectMap4k value;

DirectMap4k:      493076 kB
DirectMap2M:     7862272 kB
DirectMap1G:    27262976 kB

vs yours;

DirectMap4k:    11182080 kB
DirectMap2M:     4677632 kB

It might be a starting point.. Googling suggests that this value might be affected by the allocation to a VPS from the host... are you running this machine in a virtual server?

It could be that the host server does not have enough RAM and is messing up the outputs of /proc/meminfo.

Also, I would paste the output of smem -tw, as that might determine of the memory leak is in the kernel or an app;

# smem -tw
Area                           Used      Cache   Noncache 
firmware/hardware                 0          0          0 
kernel image                      0          0          0 
kernel dynamic memory      11297432   10738716     558716 
userspace memory            6144832    1182184    4962648 
free memory                15470032   15470032          0 
----------------------------------------------------------
                           32912296   27390932    5521364 

smem helped me track the problem to the kernel, and I believe the NVIDIA drivers were the culprit. Things are looking good after upgrading to 367.35.

References:

  • https://devtalk.nvidia.com/default/topic/952317/huge-memory-leak-/
  • https://askubuntu.com/questions/731677/out-of-memory-issue