LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-06-2014, 03:10 PM   #1
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Rep: Reputation: Disabled
Determining who is using hugepages...


Hello,
First post here.

I have a very high performance application whose performance suffers badly if there are no hugepages allocated on the system. The application does not explicitly use hugepages, and I'm not running with the Transparent Hugepages patch. The kernel version I am using is 2.6.32 with CentOS 6.5.

How can I determine who is using them? /proc/meminfo does not show any reserved hugepages at the time my app is running.

Thanks.

Ken....
 
Old 06-09-2014, 10:54 PM   #2
dijetlo
Member
 
Registered: Jan 2009
Location: The nice part of hell
Distribution: Slackware Current 64bit Multi-Lib CentOS 6.5
Posts: 680

Rep: Reputation: Disabled
I'd start reading here
You don't really provide any information on the type of application your talking about or if you've modified the kernel to create additional huge pages but the over/under is if you see an unallocated huge page, it would seem likely that it would be available for writing to shared memory.
Quote:
This means that unused Big or Huge Pages will not be available for other use than for shared memory allocations even if the system runs out of memory and starts swapping.
 
Old 06-10-2014, 09:18 AM   #3
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
I have read that already. Thanks for the link though.

Like I said, I have configured hugepages (28k), even though there is nothing on the system that requires them (that I'm aware of). If I don't configure them my app suffers.
 
Old 06-10-2014, 11:24 AM   #4
dijetlo
Member
 
Registered: Jan 2009
Location: The nice part of hell
Distribution: Slackware Current 64bit Multi-Lib CentOS 6.5
Posts: 680

Rep: Reputation: Disabled
Quote:
there is nothing on the system that requires them (that I'm aware of).
The Kernel requires shared memory, primarily for message queues and semaphore flags.
Quote:
If I don't configure them my app suffers.
Perhaps it's overusing the kernel message queues ?
 
Old 06-10-2014, 03:36 PM   #5
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Quote:
there is nothing on the system that requires them (that I'm aware of).
The Kernel requires shared memory, primarily for message queues and semaphore flags.
Quote:
If I don't configure them my app suffers.
Perhaps it's overusing the kernel message queues ?
That's a distinct possibility, but 56GB worth of memory?
 
Old 06-10-2014, 05:36 PM   #6
dijetlo
Member
 
Registered: Jan 2009
Location: The nice part of hell
Distribution: Slackware Current 64bit Multi-Lib CentOS 6.5
Posts: 680

Rep: Reputation: Disabled
56 Gig?
Seriously?
Something is definitely amiss here.....

Open a terminal (I'm a Slackware guy, we always start by opening a terminal) and type...
Code:
$ grep Hugepagesize /proc/meminfo
How big are those things?
Also, where are you pulling that 56GB number from?
 
Old 06-10-2014, 07:29 PM   #7
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dijetlo View Post
56 Gig?
Seriously?
Something is definitely amiss here.....

Open a terminal (I'm a Slackware guy, we always start by opening a terminal) and type...
Code:
$ grep Hugepagesize /proc/meminfo
How big are those things?
Also, where are you pulling that 56GB number from?

28k hugepages at 2MB each = 56GB.
 
Old 06-10-2014, 08:19 PM   #8
dijetlo
Member
 
Registered: Jan 2009
Location: The nice part of hell
Distribution: Slackware Current 64bit Multi-Lib CentOS 6.5
Posts: 680

Rep: Reputation: Disabled
I think you went a little overboard there with the hugepages. Try this:

Code:
#echo 512 > /proc/sys/vm/nr_hugepages
Let's try to drop that back to something reasonable. That's from the RedHat site so it should work on your machine...
 
Old 06-11-2014, 07:53 AM   #9
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dijetlo View Post
I think you went a little overboard there with the hugepages. Try this:

Code:
#echo 512 > /proc/sys/vm/nr_hugepages
Let's try to drop that back to something reasonable. That's from the RedHat site so it should work on your machine...
If I configure anything less than 28k, my application suffers.

The link you provide seems to refer specifically to configuring for Oracle. I'm not running Oracle.
 
Old 06-11-2014, 08:59 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,285

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
"ipcs -ma" might give you somewhere to start looking.
 
Old 06-11-2014, 02:58 PM   #11
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
"ipcs -ma" might give you somewhere to start looking.
This is what the output from that command looks like while my app is running:


------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x2f00056a 0 root 666 4194864 4
0x2f000572 32769 root 644 164772 4
0x2f000706 65538 root 666 16384 1
0x2f000726 98307 root 666 7053328 4

------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 65537 root 600 1
0x00000000 131074 apache 600 1
0x00000000 163843 apache 600 1

------ Message Queues --------
key msqid owner perms used-bytes messages
 
Old 06-13-2014, 01:26 PM   #12
kadey
LQ Newbie
 
Registered: Jun 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Well, it looks like I am using hugepages after all (transparently):

# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

My kernel version is 2.6.32-431.17.1.el6.x86_64. I didn't think this functionality was included until 2.6.38.
 
Old 06-13-2014, 07:21 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,285

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Redhat habitually roll-back functionality they deem useful/needed. Should be documented somewhere.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can hugepages work with more than one GID? - SamanthaCruz Linux - Newbie 1 11-15-2012 07:25 AM
Is it possible to use more than one GID with hugepages? SamanthaCruz Linux - Server 0 11-15-2012 06:06 AM
Hugepages exepriment: Triggering large page tables kenneho Linux - Server 2 03-04-2011 12:59 AM


All times are GMT -5. The time now is 07:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration