As DBA, you must know the concept of page table and huge page, because database's physical memory is huge and if you use common page(4K) to manage the memory, it will exhaust many physical memory on page table, Let's me introduce what's the problem on page table with common page(4K).
Firstly, I'd like introduce Linux x86_64 use 4 level page tables architecture.
Secondly,we know Linux x86_64 use 4 level page tables design and builds with PGD(9 bit),PUD(9 bit),PMD(9 bit),PTE (9 bit), page (12 bit), total 8 bytes(48 bits+16 bit unused).
thirdly, assume one Oracle Node Pre-Malloc physical memory is 96G,so used PTE(Page Table Entry) equals to 96(G)*1024*1024/4K =25,165,824,one PTE entry need 9 bits to descripte it,
So, that’s 27MB((25,165,824*9)/8/1024/1024=27M) of page table entries.
finally, assume one Oracle Node max support delicate sessions is 4000, that's meaning it have about 2675 oracle processes and each process which attaches to the SGA needs it's own copy of the page table, therefore it need about 70.5G(2675*27M) physical memory, that's why we need huge page to downgrade the page table used memory.
reference
https://lwn.net/Articles/106177/
https://docs.oracle.com/cd/E18283_01/server.112/e17110/initparams229.htm
No comments:
Post a Comment