Tunable Base Page Size

1
Executive summary
Tunable Base Page Size is a new feature introduced in update 3 to HP-UX 11i v3. The system
administrator can now adjust the size of a base page used in managing system memory, by invoking
the kctune command to change the tunable base_pagesize and then rebooting the system. The
larger base page sizes allow memory to be managed more efficiently, resulting in a decrease in
kernel memory usage. This can also result in an increase in system performance for some workloads.
This white paper describes this new feature, how the size of a base page affects the system, and how
to use the new feature, including guidance on choosing a base page size for your configuration.
What is Tunable Base Page Size?
A base page is the unit of physical memory management in the HP-UX kernel. It is the smallest block
of physical memory that can be allocated for storing data and code by the kernel. Base pages are
also the smallest unit of memory protection.
The size of a base page has been made a tunable parameter for Integrity platforms in Update 3 to
HP-UX 11i v3. Previously, the base page size was fixed by the constant NBPG, whose value was 4
kB.
Virtual memory, as seen by applications, is managed by the kernel in units of base pages.
Applications can also use "large pages", which are logical entities whose size is a multiple of the
system base page size.
The getconf(1) command can be used to obtain the base page size of the system. Typical usage
to obtain the system page size is:
getconf PAGE_SIZE
On HP-UX Integrity systems without the Tunable Base Page Size enhancement, and on all HP 9000
(PA-RISC) platforms, the base page size is always 4 kB.
How Base Page Size Affects the System
The HP-UX kernel maintains several tables of per-page data for each base page in the system. As
systems support larger amounts of physical memory, the overhead of managing the physical memory
of the system becomes significant. This overhead is both a space issue (amount of memory consumed
by this data) and a performance issue (time that the kernel spends managing the system memory)
The amount of memory consumed by these tables is sensitive to the size of a base page. The larger
the base page size, the smaller the amount of memory consumed by the tables. Reducing the size of
the tables makes more of the system‟s physical memory available to applications.
Many of the kernel‟s data structures and algorithms that manage system memory are directly
impacted by the number of pages that the kernel must manage. Increasing the base page size from
4kB to 16kB, for example, reduces the overhead of managing memory by a factor of 4. Figure 1
below shows how the base page size impacts kernel memory consumption for static tables overall,
and for the largest of those tables, the pfdat, or Page Frame Data, table.