[SOLVED] What is transparent huge page (khugepage) and how can I disable it?

D

Deleted member 143446

Guest
I want to share what I had did "released" some burden of my PC.
After collecting and anslysing system profiler tool logs, I noticed these consumes the highest CPU usages are in freeze times :
1. %52.60 - Firefox
2. %34.80 - kernel
Under kernel I found these :

asm_exc_page_fault
- exc_page_fault
-- do_user_addr_fault
--- handle_mm_fault
----__do_fault
-----filemap_fault
-------page_cache_ra_unbounded
-------read_pages
--------squashfs_readpage
----------squashfs_readpage_block
----------squashfs_cache_get
----------read_indexes
----------squashfs_read_metadata
----------squashfs_copy_cache


Those listed aboves are the breakdown structure of the process under kernel title.

So, I found from internet that, squashfs_readpage is responsible for writing to tmpfs(temporary file system) and it can cause high cpu usage. Someone deals with but s/he did not write how to, so I leave that alone.

Today I found there is also one high cpu user :

khugepage

I looked those pages :

1. https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html
2. https://access.redhat.com/solutions/46111
3. https://docs.oracle.com/en/database...tml#GUID-02E9147D-D565-4AF8-B12A-8E6E9F74BEEA

As far as I understand, users have options to enable or disable it, if their applications do not require it, because it is not like hugepage process which is a system-wide requirement and can not be closed. I do not have such applications so I want to disable it. So, I tried to change it to never by using command :

sudo echo never >/sys/kernel/mm/transparent_hugepage/enabled

but it gives me error :

bash: /sys/kernel/mm/transparent_hugepage/enabled: Access restricted

Why did such error appear?
How can I disable it?
If I want to kill it, is it safe to kill khugepage instantly by using kill command(I did not try it yet)? Can anybody guide me about this topic?
 


$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online

No members online now.

Top