Você está na página 1de 2

1.

Linux HugePages VS Solaris Large Pages


1.1 Linux hugepages (http://unixfoo.blogspot.com/2007/10/hugepages.html, http://
www.dba-oracle.com/t_linux_hugepages.htm)
Hugepages is a mechanism that allows the Linux kernel to utilize the multiple pa
ge size capabilities of modern hardware architectures. Linux uses pages as the b
asic unit of memory, where physical memory is partitioned and accessed using the
basic page unit. The default page size is 4096 Bytes in the x86 architecture. H
ugepages allows large amounts of memory to be utilized with a reduced overhead.
Linux uses "Transaction Lookaside Buffers" (TLB) in the CPU architecture. These
buffers contain mappings of virtual memory to actual physical memory addresses.
So utilizing a huge amount of physical memory with the default page size consume
s the TLB and adds processing overhead.
The Linux kernel is able to set aside a portion of physical memory to be able be
addressed using a larger page size. Since the page size is higher, there will b
e less overhead managing the pages with the TLB. In the Linux 2.6 series of kern
els, hugepages is enabled using the CONFIG_HUGETLB_PAGE feature when the kernel
is built. Systems with large amount of memory can be configured to utilize the m
emory more efficiently by setting aside a portion dedicated for hugepages. The a
ctual size of the page is dependent on the system architecture.
A typical x86 system will have a Huge Page Size of 2048 kBytes. The huge page si
ze may be found by looking at the /proc/meminfo:
# cat /proc/meminfo |grep Hugepagesize
To view the current setting:
# cat /proc/sys/vm/nr_hugepages
Or
# sysctl vm.nr_hugepages
To set the number of hugepages:
# echo 10000 > /proc/sys/vm/nr_hugepages
Or
# sysctl -w vm.nr_hugepages=10000
Or
# echo vm.nv_hugepages=10000 >> /etc/sysctl.conf
To increase ulimit parameter memlock for oracle user
edit /etc/security/limits.conf
oracle soft memlock Y
oracle hard memlock Y
How to decide the number of hugepages:
X = grep Hugepagesize /proc/meminfo
Y = Largest (MB of all client SGA) * 1024
Z = # Huge Pages needed = Y / X
It may be necessary to reboot to be able to allocate the number of hugepages tha
t is needed. This is because hugepages requires large areas of contiguous physic
al memory. Over time, physical memory may be mapped and allocated to pages, thus
the physical memory can become fragmented. If the hugepages are allocated early
in the boot process, fragmentation is unlikely to have occurred.
There are couple of important benefits of HugePages have some very real benefits
for Oracle systems.
First, the "real" page size increases to 2 meg, 50 times larger than the old 4k
page sizes.
Second, RAM allocated for Hugepages is fenced. Unlike standard RAM allocated to
the Oracle SGA and PGA, Hugepages RAM is resident and it cannot be paged out, a
nd it's ineligible for swapping.
Here are some documented limits for hugepages:
Linux x86 (IA32) 4MB
Linux x86-64 (AMD64, EM64T) 2MB
Linux Itanium (IA64) 256MB
1.2Solaris Large Pages
1.2.1Two different types of page-size observability tools are available in Solar
is:
1. describe the page sizes in use by the system or application.
2. help to determine whether using large pages will benifit performance.
pmap and pagesize commands, getpagesize() and meminfo() discover information abo
ut the system's ability to support different TLB page sizes.
trapstat and cpustat commands can approximate the amount of time spent waiting f
or servicing TLB misses.
Using Solaris multiple-page-size support commands to direct the application to u
se 4MB pages.
1.2.2Configuring for Multiple Page Sizes
Solaris 2.6~Solaris 8:
Oracle uses large pages (ISM) by default on solaris. ISM is requested by the shm
at with SHM_SHARE_MMU flag and is allocated as 4MB pages.
Solaris 9:
ISM support 4KB, 64KB, 512KB and 4MB page sizes.
ppgsz command and libmpss.so library indicates the application use larger page s
izes.
memcntl() is request for using large page sizes by application.

http://www.freelists.org/post/oracle-l/Large-SGA-in-Solaris,2
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.w
ebsphere.base.doc/info/aes/ae/tprf_tunesolaris.html
http://technopark02.blogspot.com/2007/09/memory-fragmentation-large-pages-on.htm
l
http://www.solarisinternals.com/wiki/index.php/Multiple_Page_Size_Support
http://christianbilien.wordpress.com/2007/05/25/oracle-ism-and-dism-there-is-mor
e-than-no-swap-22%E2%80%A6-but-be-careful-with-solaris-8/

Você também pode gostar