LinuxQuestions.org
Visit Jeremy's Blog.
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: 9

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
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

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: 9

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
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

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: 9

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
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

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: 9

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
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

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: 9

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: 21,103

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

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: 9

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: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:50 AM.

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