LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-14-2018, 02:13 AM   #1
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Kernel: there is a reasonable explanation why the "typical Linux user" needs Transparent Huge Pages? Memory consumption: 42GB vs 5.7GB


From long time I have an issue. And that's really a long time.

The issue is the epic huge memory consumption in computers which I use for work. You read right, I can hit 42GB memory consumption in a day of work. That's 32GB real memory, the rest is SWAP, with all the fun.

And I have a very good excuse: very bad habits, as in tons of Firefox and Chromium pages open, LAMP stack running in background dozens of local sites, REDIS and so on...

Then, somewhen a month ago, I had the bad idea to look in the REDIS logs. Hundred times, they said so:
Quote:
WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after
THP is disabled.
I had then the stupid idea to follow that recommendation, and I added into rc.local
Code:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
For my surprise, the memory consumption never then passed the 5.77GB. Reasonable for a 32GB system, right?

After all, I think that's much more reasonable than 42GB, in my humble opinion...

Then, I tried the same thing in more lightly used computers. That's "only" some hundreds pages opened in Firefox, in my vision.

For my surprise, computers with 8GB which easily hit the SWAP while I walked in a news site (and opened about hundred tabs in Firefox or Chrome), now not hit 3GB memory consumption.

In the final, I arrived to conclusion that THIS thing: Transparent Huge Pages enabled in the kernels, interacts freaking badly with Firefox, Chromium, LAMP stack and REDIS habits.

Then, dear Slackware Team, permit me to ask you:

FOR WHAT THE HECK are good those Transparent Huge Pages, excluding the wasting the users computers memory, thing which they do perfectly?

Last edited by Darth Vader; 03-14-2018 at 01:43 PM.
 
Old 03-14-2018, 02:24 AM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,508

Rep: Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473
Thanks for pointing that out. I'll add CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y.
 
9 members found this post helpful.
Old 03-14-2018, 02:32 AM   #3
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Original Poster
Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Thanks, Patrick!

I can consider then this thread solved.

Last edited by Darth Vader; 03-14-2018 at 03:42 PM.
 
Old 03-15-2018, 12:13 AM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Darth Vader View Post
FOR WHAT THE HECK are good those Transparent Huge Pages, excluding the wasting the users computers memory, thing which they do perfectly?
/usr/src/linux-4.4.118/Documentation/vm/hugetlbpage.txt contains any answers you'd want.

I don't remember making any changes, but on all of my Slackware64 systems:
Code:
130 ✗ cranium@cranium ~ $ cat /sys/kernel/mm/transparent_hugepage/enabled 
[always] madvise never
The maximum amount of physical RAM on any of my machines is 16GB.

(I've certainly seen the same messages from Redis docker images when they boot up at work, so I've seen the same thing there and turned off THP in those cases.)
 
1 members found this post helpful.
Old 03-15-2018, 09:45 PM   #5
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
I built 4.14.26 here with CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y and it feels rather strange that firefox is no longer trying to use all my ram.
 
3 members found this post helpful.
Old 03-16-2018, 02:50 AM   #6
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,975

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
Well I was gonna wait until tomorrow or the next to upgrade my kernel to 4.14.26, I will upgrade as soon as my local repository syncs at a 1600 my time.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why the sound of "huge" kenerl is better that the "generic" kernel ? sdrkyj Slackware 2 02-06-2014 10:44 AM
Problem with squid as transparent proxy: "Invalid request" only on certain pages dtinazzi Linux - Networking 3 08-10-2011 03:41 AM
What is meaning of "has pages locked into memory (for real-time and custom IO) " ? dtustudy68 Programming 2 05-13-2011 01:08 PM
Measure "CPU load" and "memory consumption" of a process DaneelGiskard Programming 3 08-30-2007 11:43 AM
LXer: Leverage transparent huge pages on Linux LXer Syndicated Linux News 0 04-27-2007 03:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration