一. HugePages 說明
1.1 HugePages 介紹
HugePages is afeature integrated into the Linux kernel with release 2.6. This featurebasically provides the alternative to the 4K page size (16Kfor IA64) providing bigger pages.
關於HugePages,有一些相關的專業術語,具體如下:
(1) Page Table: A page table is thedata structure of a virtual memory system in an operating system to store themapping between virtual addresses and physical addresses. This means that on avirtual memory system, the memory is accessed by first accessing a page tableand then accessing the actual memory location implicitly.
--Page Table 是作業系統上的虛擬記憶體系統的資料結構,其用來儲存虛擬記憶體地址和實體記憶體地址之間的映射關係。這就意味著在虛擬記憶體系統上,我們訪問記憶體時,是先訪問Page Table,然後根據Page Table 中的映射關係,隱式的轉移到物理的記憶體位置。
(2) TLB: A Translation LookasideBuffer (TLB) is a buffer (or cache) in a CPU that contains parts ofthe page table. This is a fixed size buffer being used to do virtual addresstranslation faster.
--TLB(Translation Lookaside Buffer) 是CPU 中的一塊buffer 或者cache,其大小的固定的, TLB中包含了部分Page Table,用來快速進行虛擬位址的轉換。
(3) hugetlb: This is an entryin the TLB that points to a HugePage (a large/big page larger than regular 4Kand predefined in size). HugePages are implemented via hugetlb entries, i.e. wecan say that a HugePage is handled by a "hugetlb page entry". The'hugetlb" term is also (and mostly) used synonymously with a HugePage(See Note261889.1). In this document the term "HugePage" is going to beused but keep in mind that mostly "hugetlb" refers to the sameconcept.
--hugetlb 是TLB中的一個entry,其指向HugePage(大於4k或預定義的一個large page)。 HugePage 通過hugetlb entries來實現,我們也可以說HugePage 是hugetlb page entry的一個控制代碼。 在MOS 文檔:Note 261889.1中,二者是幾乎是相同的概念。
(4) hugetlbfs: This is a newin-memory filesystem like tmpfs and is presented by 2.6 kernel. Pages allocatedon hugetlbfs type filesystem are allocated in HugePages.
--hugetlbfs 是2.6核心中提出的一個新的in-memory filesystem,就像tmpfs一樣。
1.2 常見的錯誤概念
|
WRONG: HugePages is a method to be able to use large SGA on 32-bit VLM systems |
RIGHT: HugePages is a method to have larger pages where it is useful for working with very large memory. It is both useful in 32- and 64-bit configurations |
|
WRONG: HugePages cannot be used without USE_INDIRECT_DATA_BUFFERS |
RIGHT: HugePages can be used without indirect buffers. 64-bit systems does not need to use indirect buffers to have a large buffer cache for the RDBMS instance and HugePages can be used there too. |
|
WRONG: hugetlbfs means hugetlb |
RIGHT: hugetlbfs is a filesystem type **BUT** hugetlb is the mechanism employed in the back where hugetlb can be employed WITHOUT hugetlbfs |
|
WRONG: hugetlbfs means hugepages |
RIGHT: hugetlbfs is a filesystem type **BUT** HugePages is the mechanism employed in the back (synonymously with hugetlb) where HugePages can be employed WITHOUT hugetlbfs. |