Re: Huge Pages in oracle 11g

  • From: frits.hoogland@xxxxxxxxx
  • To: "neil_chandler@xxxxxxxxxxx" <neil_chandler@xxxxxxxxxxx>
  • Date: Sat, 5 Sep 2015 22:12:19 +0200

Don't forget page tables (which keep track of the physical to virtual address
translation, which is what huge pages minimises, because the number of pages is
lower) are kept per process. Also, they are built on demand.

Verstuurd vanaf mijn iPad

Op 5 sep. 2015 om 21:50 heeft Neil Chandler <neil_chandler@xxxxxxxxxxx> het
volgende geschreven:

The huge pages used is (total - free) + reserved. Don't forget ASM and
-MGMTDB will also use huge pages if allocated. Also, you must use ASMM, not
AMM. (Does anyone successfully use AMM on Linux? Stupid idea. Use ASMM.)

The main reason for using huge pages is to minimise the mapping tables.
Normal pages are small, so it will take 1gb of memory to map each 8gb of
normal pages. With huge pages, it costs a few tens of mb for every 8gb. 40 I
think (it's Saturday night). So you gain memory and have less management
overhead.

Only the SGA comes out of huge pages, as Andrew says. You should never
allocate more than about 65% of server memory for huge pages (OLTP) and
somewhat less for data warehouse, to leave room for pga ( which should be
bigger in a DWh.)

Regs

Neil Chandler
sent from my phone

On 5 Sep 2015, at 19:12, Andrew Kerber <andrew.kerber@xxxxxxxxx> wrote:

First of all, PGA will not use huge pages at all. Only the sga. Next
transparent huge pages are the same as anonymous huge pages. And they look
to be disabled on your system. Look at your alert log for how oracle is
using huge pages. Information is printed there on boot. I would have
expected the huge pages reserved to be the number in use, but those don't
quite add up. So I'm not sure about that.

Sent from my iPad

On Sep 5, 2015, at 12:47 PM, Dba DBA <oracledbaquestions@xxxxxxxxx> wrote:

Redhat 6
Oracle RAC 11.2.0.4
Grid: 11.2.0.4
Huge page size: 2048

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

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?

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


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?

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.


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?

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?

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.
--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: