Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change virtual memory page size?

Tags:

c

linux

x86-64

Is it possible to change the virtual memory page size? I'm asking this because in the X86_64 part of the MMU article on wikipedia, it talks about different page sizes. If the page size can indeed be changed, how it is changed?

like image 337
pythonic Avatar asked Apr 19 '12 20:04

pythonic


1 Answers

On x86_64 you can explicitly request 2 MiB pages instead of the usual 4 KiB pages with the help of hugetlbfs. On modern kernels with transparent huge page support a small pages can automagically concatenated to huge pages in the background, given that the memory fragmentation isn't to big and enough memory is still free.

like image 82
Gunther Piez Avatar answered Sep 22 '22 09:09

Gunther Piez