From c051d51e4467d806fc671b0819ff44b3ef2a587d Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 15 Jan 2019 08:36:27 +0100 Subject: getting started: add hugepages section renamed "min_to_use_1g" to "threshold_to_use_1g" since this variable has been changed in commit 629. Change-Id: Ie2ca9c71c086d07a0773966cc55dfb61d43edaaa Signed-off-by: Sona Sarmadi --- .../doc/getting_started_nfv_access.xml | 123 ++++++++++++++++++++- 1 file changed, 122 insertions(+), 1 deletion(-) diff --git a/doc/book-enea-nfv-access-getting-started/doc/getting_started_nfv_access.xml b/doc/book-enea-nfv-access-getting-started/doc/getting_started_nfv_access.xml index 0b3121c..49dc4d4 100644 --- a/doc/book-enea-nfv-access-getting-started/doc/getting_started_nfv_access.xml +++ b/doc/book-enea-nfv-access-getting-started/doc/getting_started_nfv_access.xml @@ -419,7 +419,7 @@ sdb 8:0 0 111.8G 0 disk Modifying any of the Default parameters (e.g Core isolation, 1G huge page count, etc.) will automatically update the kernel - paramters string shown. + paramters string shown. Updating the Custom parameters within the kernel string @@ -570,6 +570,127 @@ run +
+ Hugepage Reservation Service + + NFV Access implements an automatic hugepage allocation service that + is triggered at each startup. The service is skipped if hugepages have been + allocated in the kernel boot command line. + + There are two strategies outlined for hugepage + allocation: + + + + If a system has an amount of memory that's lower than 8GB, at least + 30% of the memory will be reserved to user space applications. 1GB of this + memory will be reserved for hugepages 2MB per page size. + + + + If a system has an amount of memory that's higher than 8GB, then it + will use 1GB hugepages 2MB per page size and leave a predefined amount of + memory for the user space applications. + + + +
+ Customizing Automatic Hugepage Reservation + + Configuration of Hugepage Reservation Service is done in + /etc/enea-nfv-access/hugepages.cfg. + + Parameters used by the automatic algorithm: + + + + hugepage_setup: Enables the automatic configuraiton algorithm. It has only one value, auto. For manual configuration comment or + remove the parameter. Use the other parameter descriptions as a template/example. + + + + threshold_to_use_1g: Decides the threshold which instructs the + algorithm to use 1GB hugepages. If a system's memory is higher than + threshold_to_use_1g, then the algorithm will use 1GB + hugepages, otherwise it will use 2MB hugepages. + + + + percent_os_alloc: Decides how much memory to try to reserve for + userspace applications. The algorithm will try to reserve at least + percent_os_alloc of the total system memory to + user space applications. + + + + maximum_os_alloc_mb: Maximum amount of memory to allocate for + userspace applications. If percent_os_alloc of + the total system memory exceeds + maximum_os_alloc_mb then the maximum allocated + memory for userspace applications is + maximum_os_alloc_mb. + + + Example of automatic Hugepage Configuration: + + hugepage_setup = auto + threshold_to_use_1g = 8192 + percent_os_alloc = 50 + maximum_os_alloc_mb = 1024 + + The following possible allocations could result + (based on total system memory available): + + + + 2GB of memory: approximately 616MB allocated for userspace + applications and 1432MB allocated as 2MB hugepages. + + + + 4GB of memory: 1024MB allocated for userspace applications and + 7168MB as hugepages. + + + + 16GB of memory: 1GB allocated for userspace applications and + 15GB as 1GB hugepages. + + +
+ +
+ Customizing Manual Hugepage Reservation + + The automatic algorithm can be disabled and hugepages configured + manually. To do this, comment the line which defines + hugepage_setup as auto and + configure memory for each CPU socket in the following manner: + + <NUMA node>.<hugepage size> = <number of pages> + + Where <NUMA node> refers to a node which + is part of the system's NUMA topology, <hugepage + size> decides what type of hugepages should be set and + <number of hugepages> is how many hugepages of + <hugepage size> should be allocated. + + To list the available system nodes, run: + + ls -d /sys/devices/system/node/node* + + To list available hugepage sizes, per node, run: + + ls -d /sys/devices/system/node/node*/hugepages/hugepages-* + + Example of Manual Hugepage Configuration, + to configure the sytem to allocate e.g. 3 1GB hugepages and 512 2MB hugepages on node: + + node0.2048kB = 512 + node0.1048576kB = 3 +
+
+
NFV Access Release content -- cgit v1.2.3-54-g00ecf