RE: Linux and huge pages

From: <Christopher.Taylor2_at_parallon.net>
Date: Thu, 24 Jan 2013 10:02:11 -0600
Message-ID: <F05D8DF1FB25F44085DB74CB916678E8856C2C93CA_at_NADCWPMSGCMS10.hca.corpad.net>



I was thinking something along these lines as well.

I *wonder* if smaps would record 64KB for the lib files (when 64KB pages are in use, or 2MB for 2MB pages etc)

For me using 4KB pages, most of the lib files show up as 4KB in smaps.

Grab the PID for DBWR and cat /proc/$PID/smaps and look at the lib files:

I'm *probably* way off base but it seems that "Size" would not be less than your page size but I could be mistaken.

...
...

3b21a81000-3b21a82000 r-xp 00081000 fd:00 736033                         /lib64/libm-2.5.so
Size:                 4 kB
Rss:                  4 kB
Shared_Clean:         0 kB
Shared_Dirty:         0 kB
Private_Clean:        0 kB
Private_Dirty:        4 kB
Swap:        0 kB
3b21a82000-3b21a83000 rwxp 00082000 fd:00 736033                         /lib64/libm-2.5.so
Size:                 4 kB
Rss:                  4 kB
Shared_Clean:         0 kB
Shared_Dirty:         0 kB
Private_Clean:        0 kB
Private_Dirty:        4 kB
Swap:        0 kB

...
...
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Yong Huang Sent: Thursday, January 24, 2013 9:43 AM To: Mark.Bobak_at_proquest.com
Cc: oracle-l_at_freelists.org
Subject: RE: Linux and huge pages

> Unfortunately, if you're looking to directly confirm whether a
> particular memory segment was allocated with hugepages, I know of no
> way to do that.

There's no v$ or x$ table for this info, but /proc/<pid>/smaps has KernelPageSize and MMUPageSize if your kernel is new enough, probably 2.6.29 or newer. For example, the following shows a shared memory segment of about 37GB using 2MB page size of HugePages.

70000000-960000000 rwxs 00000000 00:0c 1179654                           /SYSV00000000 (deleted)
Size:           37486592 kB
Rss:                   0 kB
Pss:                   0 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:            0 kB
Anonymous:             0 kB
AnonHugePages:         0 kB
Swap:                  0 kB
KernelPageSize:     2048 kB
MMUPageSize:        2048 kB

Regarding the kernel version, my note says "[when] this patch is in your kernel: http://lkml.org/lkml/2008/10/3/250. That patch may be in kernel 2.6.29 (http://www.kernel.org/pub/linux/kernel/v2.6/)".

Yong Huang

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


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 24 2013 - 17:02:11 CET

Original text of this message