Ubuntu Server Guide Changes, errors and bugs
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
Huge page allocation
Huge pages come in different sizes. A normal page usually is 4k and huge pages are eithe 2M or 1G, but depending on the architecture other options are possible. The most simple, yet least reliable way to allocate some huge pages is to just echo a value to sysfs Be sure to re-check if it worked. $ echo 256 | sudo t e e / s y s / k e r n e l /mm/ hugepages / hugepages −2048kB/ nr_hugepages $ c a t / s y s / k e r n e l /mm/ hugepages / hugepages −2048kB/ nr_hugepages 256 There one of these sizes is “default huge page size” which will be used in the auto-mounted /dev/hugepages. Changing the default size requires a reboot and is set via default_hugepagesz You can check the current default size: $ g r e p H u g e p a g e s i z e / p r o c / meminfo H u g e p a g e s i z e : 2048 kB But there can be more than one at the same time one better check: $ t a i l / s y s / k e r n e l /mm/ hugepages / hugepages −*/nr_hugepages ‘ ==> / s y s / k e r n e l /mm/ hugepages / hugepages −1048576kB/ nr_hugepages <== 0 ==> / s y s / k e r n e l /mm/ hugepages / hugepages −2048kB/ nr_hugepages <== 2 And even that could on bigger systems be further split per Numa node. One can allocate huge pages at boot or runtime, but due to fragmentation there are no guarantees it works later. The kernel documentation lists details on both ways. Huge pages need to be allocated by the kernel as mentioned above but to be consumable they also have to be mounted. By default systemd will make /dev/hugepages available for the default huge page size. Feel free to add more mount points if you need different sized. An overview can be queried with $ hugeadm −− l i s t −a l l −mounts Mount Po int Options / dev / hugepages rw , r e l a t i m e , p a g e s i z e =2M A one-stop info for the overall huge page status of the system can be reported with $ hugeadm −−e x p l a i n 105 |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling