memory - What applications require 1GB pages? -
x86 , x64 processors allow 1gb pages when pdpe flag set on cpu. in application practical or required , reason?
hugepage in cases have large memory footprint , memory access pattern spans large distance (across 4k pages).
it not reduces tlb miss saves os mm system page tables size.
a example packet processing. in high throughput network applications (1gbps or more), packets stored in packet buffer pool (i.e. pooling technique). example, every packet buffer 2kb in size , pool contains 512 buffers. access pattern of packet buffer pool might not sequential (buffer indexed @ 1,2,3,4,5...) rather random on time (1,104,407,45,905...). since normal page size 4k, normal tlb won't here since each packet access incur tlb miss , there lot of different buffers sitting on different pages.
in contrast, if put pool in 1gb hugepage, packet buffers share same hugepagetlb entry avoiding misses.
this used in dpdk (data plane development kit) packet rate high cycles wasted on tlb miss not negligible.
hugepage support required large memory pool allocation used packet buffers (the hugetlbfs option must enabled in running kernel indicated previous section). using hugepage allocations, performance increased since fewer pages needed, , therefore less translation lookaside buffers (tlbs, high speed translation caches), reduce time takes translate virtual page address physical page address. without hugepages, high tlb miss rates occur standard 4k page size, slowing performance.
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html#bios-setting-prerequisite-on-x86
another example oracle:
...almost 6.8 gb of memory used page tables when hugepages not configured...
...after hugepages allocated , used oracle database. page table overhead reduced less 23 mb
http://www.databasejournal.com/features/oracle/understanding-hugepages-in-oracle-database.html
related links:
https://en.wikipedia.org/wiki/object_pool_pattern
--edit--
however, hugepage should used carefully. above mentioned memory pool benefit 1gb hugepage. however, if have access pattern across 1gb page boundary, might not help. there excellent blog on this:
Comments
Post a Comment