diff options
| -rw-r--r-- | doc/book-enea-nfv-access-getting-started/doc/getting_started_nfv_access.xml | 123 |
1 files changed, 122 insertions, 1 deletions
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 | |||
| 419 | 419 | ||
| 420 | <para>Modifying any of the Default parameters (e.g Core isolation, | 420 | <para>Modifying any of the Default parameters (e.g Core isolation, |
| 421 | 1G huge page count, etc.) will automatically update the kernel | 421 | 1G huge page count, etc.) will automatically update the kernel |
| 422 | paramters string shown. </para> | 422 | paramters string shown.</para> |
| 423 | 423 | ||
| 424 | <note> | 424 | <note> |
| 425 | <para>Updating the Custom parameters within the kernel string | 425 | <para>Updating the Custom parameters within the kernel string |
| @@ -570,6 +570,127 @@ run</programlisting> | |||
| 570 | </section> | 570 | </section> |
| 571 | </section> | 571 | </section> |
| 572 | 572 | ||
| 573 | <section id="hugepage_reservation"> | ||
| 574 | <title>Hugepage Reservation Service</title> | ||
| 575 | |||
| 576 | <para>NFV Access implements an automatic hugepage allocation service that | ||
| 577 | is triggered at each startup. The service is skipped if hugepages have been | ||
| 578 | allocated in the kernel boot command line.</para> | ||
| 579 | |||
| 580 | <para>There are two strategies outlined for hugepage | ||
| 581 | allocation:</para> | ||
| 582 | |||
| 583 | <itemizedlist> | ||
| 584 | <listitem> | ||
| 585 | <para>If a system has an amount of memory that's lower than 8GB, at least | ||
| 586 | 30% of the memory will be reserved to user space applications. 1GB of this | ||
| 587 | memory will be reserved for hugepages 2MB per page size.</para> | ||
| 588 | </listitem> | ||
| 589 | |||
| 590 | <listitem> | ||
| 591 | <para>If a system has an amount of memory that's higher than 8GB, then it | ||
| 592 | will use 1GB hugepages 2MB per page size and leave a predefined amount of | ||
| 593 | memory for the user space applications.</para> | ||
| 594 | </listitem> | ||
| 595 | </itemizedlist> | ||
| 596 | |||
| 597 | <section id="hugepage_customizing_auto"> | ||
| 598 | <title>Customizing Automatic Hugepage Reservation</title> | ||
| 599 | |||
| 600 | <para>Configuration of Hugepage Reservation Service is done in | ||
| 601 | <literal>/etc/enea-nfv-access/hugepages.cfg</literal>.</para> | ||
| 602 | |||
| 603 | <para><emphasis role="bold">Parameters used by the automatic algorithm: </emphasis></para> | ||
| 604 | |||
| 605 | <itemizedlist spacing="compact"> | ||
| 606 | <listitem> | ||
| 607 | <para><literal>hugepage_setup</literal>: Enables the automatic configuraiton algorithm. It has only one value, <literal>auto</literal>. For manual configuration comment or | ||
| 608 | remove the parameter. Use the other parameter descriptions as a template/example.</para> | ||
| 609 | </listitem> | ||
| 610 | |||
| 611 | <listitem> | ||
| 612 | <para><literal>threshold_to_use_1g</literal>: Decides the threshold which instructs the | ||
| 613 | algorithm to use 1GB hugepages. If a system's memory is higher than | ||
| 614 | <literal>threshold_to_use_1g</literal>, then the algorithm will use 1GB | ||
| 615 | hugepages, otherwise it will use 2MB hugepages.</para> | ||
| 616 | </listitem> | ||
| 617 | |||
| 618 | <listitem> | ||
| 619 | <para><literal>percent_os_alloc</literal>: Decides how much memory to try to reserve for | ||
| 620 | userspace applications. The algorithm will try to reserve at least | ||
| 621 | <literal>percent_os_alloc</literal> of the total system memory to | ||
| 622 | user space applications.</para> | ||
| 623 | </listitem> | ||
| 624 | |||
| 625 | <listitem> | ||
| 626 | <para><literal>maximum_os_alloc_mb</literal>: Maximum amount of memory to allocate for | ||
| 627 | userspace applications. If <literal>percent_os_alloc</literal> of | ||
| 628 | the total system memory exceeds | ||
| 629 | <literal>maximum_os_alloc_mb</literal> then the maximum allocated | ||
| 630 | memory for userspace applications is | ||
| 631 | <literal>maximum_os_alloc_mb</literal>.</para> | ||
| 632 | </listitem> | ||
| 633 | </itemizedlist> | ||
| 634 | <para><emphasis role="bold">Example of automatic Hugepage Configuration:</emphasis></para> | ||
| 635 | |||
| 636 | <programlisting> hugepage_setup = auto | ||
| 637 | threshold_to_use_1g = 8192 | ||
| 638 | percent_os_alloc = 50 | ||
| 639 | maximum_os_alloc_mb = 1024</programlisting> | ||
| 640 | |||
| 641 | <para>The following possible allocations could result | ||
| 642 | (based on total system memory available):</para> | ||
| 643 | |||
| 644 | <itemizedlist> | ||
| 645 | <listitem> | ||
| 646 | <para>2GB of memory: approximately 616MB allocated for userspace | ||
| 647 | applications and 1432MB allocated as 2MB hugepages.</para> | ||
| 648 | </listitem> | ||
| 649 | |||
| 650 | <listitem> | ||
| 651 | <para>4GB of memory: 1024MB allocated for userspace applications and | ||
| 652 | 7168MB as hugepages.</para> | ||
| 653 | </listitem> | ||
| 654 | |||
| 655 | <listitem> | ||
| 656 | <para>16GB of memory: 1GB allocated for userspace applications and | ||
| 657 | 15GB as 1GB hugepages.</para> | ||
| 658 | </listitem> | ||
| 659 | </itemizedlist> | ||
| 660 | </section> | ||
| 661 | |||
| 662 | <section id="hugepage_customizing_man"> | ||
| 663 | <title>Customizing Manual Hugepage Reservation</title> | ||
| 664 | |||
| 665 | <para>The automatic algorithm can be disabled and hugepages configured | ||
| 666 | manually. To do this, comment the line which defines | ||
| 667 | <literal>hugepage_setup</literal> as <literal>auto</literal> and | ||
| 668 | configure memory for each CPU socket in the following manner:</para> | ||
| 669 | |||
| 670 | <programlisting><NUMA node>.<hugepage size> = <number of pages> </programlisting> | ||
| 671 | |||
| 672 | <para>Where <literal><NUMA node></literal> refers to a node which | ||
| 673 | is part of the system's NUMA topology, <literal><hugepage | ||
| 674 | size></literal> decides what type of hugepages should be set and | ||
| 675 | <literal><number of hugepages></literal> is how many hugepages of | ||
| 676 | <literal><hugepage size></literal> should be allocated.</para> | ||
| 677 | |||
| 678 | <para>To list the available system nodes, run:</para> | ||
| 679 | |||
| 680 | <programlisting>ls -d /sys/devices/system/node/node* </programlisting> | ||
| 681 | |||
| 682 | <para>To list available hugepage sizes, per node, run:</para> | ||
| 683 | |||
| 684 | <programlisting>ls -d /sys/devices/system/node/node*/hugepages/hugepages-*</programlisting> | ||
| 685 | |||
| 686 | <para>Example of Manual Hugepage Configuration, | ||
| 687 | to configure the sytem to allocate e.g. 3 1GB hugepages and 512 2MB hugepages on node:</para> | ||
| 688 | |||
| 689 | <programlisting>node0.2048kB = 512 | ||
| 690 | node0.1048576kB = 3 </programlisting> | ||
| 691 | </section> | ||
| 692 | </section> | ||
| 693 | |||
| 573 | <section condition="hidden" id="release-content"> | 694 | <section condition="hidden" id="release-content"> |
| 574 | <title>NFV Access Release content</title> | 695 | <title>NFV Access Release content</title> |
| 575 | 696 | ||
