Re: Huge Pages in oracle 11g

From: <frits.hoogland_at_gmail.com>
Date: Sat, 5 Sep 2015 20:25:23 +0200
Message-Id: <E345225E-0BBB-460A-A771-ED989212963B_at_gmail.com>


Verstuurd vanaf mijn iPad

> Op 5 sep. 2015 om 19:47 heeft Dba DBA <oracledbaquestions_at_gmail.com> het volgende geschreven:
>
> Redhat 6
> Oracle RAC 11.2.0.4
> Grid: 11.2.0.4
> Huge page size: 2048

For Intel, there's only 2m pages supported for oracle. 11204 gives a good summary on HP usage in the alert log
>
> I set this up on a few clusters recently. I followed the oracle notes and a few pages on the web. I am trying to understand huge pages a little lower level. I am wondering if anyone can help me out.
>
> 1. If I size my PGA_AGGREGATE_TARGET at 5 gb and my Huge Pages are sized at 2 GB, PGA will still need to use 3 huge pages and will effectively reserve 6 GB in memory right? Is it the same with SGA_MAX_SIZE
Only the SGA can be in huge pages.
The SGA is allocated at instance startup.
>
> 2. When I use 'free -m' to see my free memory, I see that all of my Huge Page memory is already allocated and does not show up here. When users connect to a DB, do the user sessions use Huge Page or memory from free memory? Anything else associated with Oracle that will not use huge pages?
HP memory can only be allocated for memory specifically allocated as HP. As such it is distinct from regular memory.

Again, only the SGA can be allocated in HP, which is allocated at startup.
>
> 3. See below from one of my boxes. I have read some unix sites and I still can't figure out what HugePages_RSVD and HugePages_Surp means to an oracle DB? I think all I care about Total and Free.
>
> grep -i huge /proc/meminfo
> AnonHugePages: 0 kB
> HugePages_Total: 26752
> HugePages_Free: 20097
> HugePages_Rsvd: 11781
> HugePages_Surp: 0
> Hugepagesize: 2048 kB

Keep it simple. Look at total, which is the total number of HP, free is what is available for use. Total minus free is what is in use and thus not available.
>
>
> 4. second huge page output is from the same 2 node cluster as the one above. The exact same DB and settings are running on each node. Why would there be so much less HugePages Free across servers?
Read the alert log to see what is allocated in HP. It can be different per instance, because the SGA can be allocated from a mix of normal and huge pages (provided use_large_pages is not set to only), starting from version 11.2.0.3. However, if use large pages is set to true, and HP are available, oracle will allocate it.
>
> I believe SGA is static. You set SGA_MAX_SIZE and at startup and this grabs a static amount of memory. Between 4 DBs I have 10 GB for PGA_AGGREGATE_TARGET. This isn't a static allocation right? The DBs are not busy and nothing is going on since we are off hours. So it doesn't look like PGA would be allocated. I bounced the DBs last night as part of a planned outage and the HugePage free was differnet as soon as I started them. I dont know what it was before. I did not have time to stop and start instances one by one on each node to see the variance in huge pages free by DB.
Sga_max_size allocations are static.
>
>
> AnonHugePages: 0 kB
> HugePages_Total: 26752
> HugePages_Free: 12266
> HugePages_Rsvd: 3950
> HugePages_Surp: 0
> Hugepagesize: 2048 kB
>
> 5. How do I tell which processes use huge pages vs. which use regular memory? I don't see a way to distinguish in top or any of the utilities?
See /proc/PID/smaps
>
> 6. I found out from a coworker last night that oracle sent out an alert recently about 'transparent huge pages' and they have to be disabled due to a bug. I have not read the article yet. Does anyone know of any other known bugs with huge pages?
THP and HP are two different things. THP should be turned off.
>
> 7. anyone bench mark this huge pages to see an actual performance difference? I see oracle recommend it. I see all over the place people talk about implementing it, but what I don't see is a benchmark showing that it actually improves performances.
Depending on usage, HP can yield up to 10% improvement, which I witnessed myself. Another big plus for HP is the pages are locked and not considered for swapping.
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Sep 05 2015 - 20:25:23 CEST

Original text of this message