[CentOS] kernel memory accounting

Fri Mar 10 20:04:34 UTC 2017
David Both <dboth at millennium-technology.com>

First - why in the world would you want to disable kernel memory 
accounting? I don't think that is even possible (despite not being a 
kernel programmer myself) because the kernel must needs account for 
every bit of real and virtual memory in the system in order to do its job.

Second - the first note in the doc to which you refer says that it is 
hopelessly out of date and further down it indicates it refers to 2.6 
kernels and we are now at 4.9.

So now my question boils down to - what is it that you are trying to do 
that makes you think you have to disable kernel memory accounting?


On 03/10/2017 02:25 PM, Wensheng Deng wrote:
> Hi CentOS experts,
>
> I am using CentOS 7. Trying to disable kernel memory accounting:
> according to https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt,
>   passing cgroup.memory=nokmem to the kernel at boot time, should be able to
> archive that.
>
> However it is not the case in my exercise.  These are what I have now
> $ grep CONFIG_MEMCG_KMEM /boot/config-3.10.0-327.36.3.el7.x86_64
>
> CONFIG_MEMCG_KMEM=y
>
> $ cat /proc/cmdline
>
> BOOT_IMAGE=/vmlinuz-3.10.0-327.36.3.el7.x86_64
> root=UUID=56568066-5719-46d9-981d-278c7559689b ro quiet cgroup.memory=nokmem
> systemd.log_level=debug
>
> But kernel memory is still accounted in user's applications. Any suggestion
> on how to chase the issue is greatly appreciated!  Thank you!
>
>
> Best Regards,
> Wensheng
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos

-- 


*********************************************************
David P. Both, RHCE
Millennium Technology Consulting LLC
Raleigh, NC, USA
919-389-8678

dboth at millennium-technology.com

www.millennium-technology.com
www.databook.bz - Home of the DataBook for Linux
DataBook is a Registered Trademark of David Both
*********************************************************
This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not consent to the
retrieving or storing of this communication and any related metadata, as well as
printing, copying, re-transmitting, disseminating, or otherwise using it. If you
believe you have received this communication in error, please delete it
immediately.