On Mon, Nov 19, 2018 at 07:56:53PM +0800, dong wrote: > Sorry, there's a leak indeed. The memory was leaking all the time and > I tried to run command `echo 3 > /proc/sys/vm/drop_caches`, it didn't > help. > > But when I delete the log files which was created by the failed > systemd service, the leak(cached) memory was released. I suspect the > leak is relevant to the inode objects. What kind of filesystem is used for storing logs? Also, I assume you use SLAB. It would be nice if you could try to reproduce the issue with SLUB, because the latter exports information about per memcg caches under /sys/kernel/slab/<cache-name>/cgroup. It could shed the light on what kinds of objects are not freed after cgroup destruction. In case of SLAB you can try to monitor /proc/slabinfo to see which caches are growing. Anyway, you'll probably have to turn off kmem cache merging - see slab_nomerge boot options.