Re: [systemd-devel] 11 MB cost of DefaultMemoryAccounting=yes
On Thu, 11.05.17 10:26, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: > Even though this is not a systemd problem, I believe systemd mailing > list is a good place to discuss. > > Our kernel has CONFIG_MEMCG enabled. As soon as we set > DefaultMemoryAccounting=yes, our system wide memory usage increased 11 > MB. The increase is mostly on kmalloc-* slab memory with the peak on > kmalloc-32. > > I initially thought the increase is due to systemd creating > system.slice under /sys/fs/cgroup/memory but I think I am wrong. I > have run "systemd-run -p MemoryLimit=10M /bin/sleep 5" command while > DefaultMemoryAccounting=no and there was no significant memory usage. > > I am quite puzzled about where this extra cost is coming from. Does > anybody have any idea? cgroup memory accounting comes at a cost, both in performance and memory usage. In older kernels it is so steep that many distros disabled it altogether. On current kernels it shouldn't be awful anymore, but like everything is not free... I'd recommend talking to the memcg/cgroup community about this in more detail. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] 11 MB cost of DefaultMemoryAccounting=yes
Am Thu, 11 May 2017 10:26:33 +0200 schrieb Umut Tezduyar Lindskog: > Hello, > > Even though this is not a systemd problem, I believe systemd mailing > list is a good place to discuss. > > Our kernel has CONFIG_MEMCG enabled. As soon as we set > DefaultMemoryAccounting=yes, our system wide memory usage increased 11 > MB. The increase is mostly on kmalloc-* slab memory with the peak on > kmalloc-32. > > I initially thought the increase is due to systemd creating > system.slice under /sys/fs/cgroup/memory but I think I am wrong. I > have run "systemd-run -p MemoryLimit=10M /bin/sleep 5" command while > DefaultMemoryAccounting=no and there was no significant memory usage. > > I am quite puzzled about where this extra cost is coming from. Does > anybody have any idea? I think this is documented in the kernel as far as I know: Memory accounting needs some extra memory. For swap accounting, it is even more. If you look at the kernel documentation: Does this explain your issue? -- Regards, Kai Replies to list-only preferred. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel