Huge page is what it is, huge page

Huge pages are what they are called- huge pages. Normal page size by default is 4k Bytes on x86 and x86_64. Huge pages are 4MB in size on x86, 2MB on x86_64, and 256MB on IA64

What is a page? Memory is allocated to processes in pages.

A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described by a single entry in the page table. It is the smallest unit of data for memory management in a virtual memory operating system

What is the benefit of huge?

What is the appeal of huge pages?

The CPU has a limited number of TLB entries. A huge page allows a single TLB
entry to translate addresses for a large amount of contiguous physical
memory. (For example, the entire Linux kernel fits within a single 2
megabyte “huge page” on x86 systems. Keeping the entire kernel in a
single TLB entry means that calling into the kernel doesn’t flush the
userspace mappings out of the TLB.)

Using huge pages means the MMU spends less time walking page tables to refill
the TLB, and can lead to about a 10% performance increase if used


With HugePages enabled, the system uses fewer page tables, reducing the overhead for maintaining and accessing them. Huges pages remain pinned in memory and are not replaced, so the kernel swap daemon has no work to do in managing them, and the kernel does not need to perform page table lookups for them. The smaller number of pages reduces the overhead involved in performing memory operations, and also reduces the likelihood of a bottleneck when accessing page tables.


Find page size

getconf PAGE_SIZE

How many huge pages are there?

grep HugePages_Total /proc/meminfo
HugePages_Total:    1282

What is the size of huge page?

grep Hugepagesize /proc/meminfo
Hugepagesize:       2048 kB

To some extent I guess the case of huge page is similary to- If I am going to store mostly large files on my filesystem, I would benefit for bigger block size.


One thought on “Huge page is what it is, huge page

  1. Pingback: Nutanix AHV: Where has all the memory gone? | RTFMP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s