LTS

    Innovation Version

      Best Practices

      Huge Page Configuration

      Overview

      StratoVirt supports the configuration of huge pages for VMs. Compared with the traditional 4K memory page mode, huge page memory can effectively reduce the number of TLB misses and page fault interrupts, significantly improving the performance of memory-intensive services.

      Precautions

      • The directory to which the huge pages are mounted must be an absolute path.
      • Memory huge pages can be configured only during startup.
      • Only static huge pages are supported.
      • Configure huge pages on the host before use.
      • To use the huge page feature, ensure that the VM memory size is an integer multiple of huge page size.

      Mutually Exclusive Features

      • If huge pages are configured, the balloon feature becomes invalid.

      Configuration Methods

      Configuring Huge Pages on the Host
      Mounting

      Mount the huge page file system to a specified directory. /path/to/hugepages is the user-defined empty directory.

      $ mount -t hugetlbfs hugetlbfs /path/to/hugepages
      
      Setting the Number of Huge Pages
      • Set the number of static huge pages. num indicates the specified number.

        $ sysctl vm.nr_hugepages=num
        
      • Query huge page statistics.

        $ cat /proc/meminfo | grep Hugepages
        

        To view statistics about huge pages of other sizes, view the related information in the /sys/kernel/mm/hugepages/hugepages-*/ directory.


      Notice Configure the StratoVirt memory specifications and huge pages based on the huge page usage. If the huge page resources are insufficient, the VM fails to be started.

      Huge Page Configuration During StratoVirt Startup

      • CLI

        -mem-path /page/to/hugepages
        

        In the preceding command, /page/to/hugepages indicates the directory to which the huge page file system is mounted. Only absolute paths are supported.

      • JSON file

        {
            "machine-config": {
                "mem_path": "/page/to/hugepages",
                ...    
            },
                ...
        }
        

        In the preceding command, /page/to/hugepages indicates the directory to which the huge page file system is mounted. Only absolute paths are supported.


      Note Typical configuration: Set mem-path in the StratoVirt command line to the huge page file system mount directory. The StratoVirt huge page feature is recommended for the typical configuration.

      Performance Improvement

      Memory Noise Floor

      To achieve the optimal memory noise floor, developers can use the methods provided by WIKI on the StratoVirt homepage for compilation and testing.

      https://gitee.com/openeuler/stratovirt/wikis/%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95-%E5%86%85%E5%AD%98%E5%BA%95%E5%99%AA?sort_id=3879743

      Cold Startup Time

      To reduce the cold startup time, developers can also use the methods provided on by WIKI on the StratoVirt homepage to perform compilation tests.

      https://gitee.com/openeuler/stratovirt/wikis/%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95-%E5%86%B7%E5%90%AF%E5%8A%A8%E6%97%B6%E9%97%B4?sort_id=3879744

      Bug Catching

      Buggy Content

      Bug Description

      Submit As Issue

      It's a little complicated....

      I'd like to ask someone.

      PR

      Just a small problem.

      I can fix it online!

      Bug Type
      Specifications and Common Mistakes

      ● Misspellings or punctuation mistakes;

      ● Incorrect links, empty cells, or wrong formats;

      ● Chinese characters in English context;

      ● Minor inconsistencies between the UI and descriptions;

      ● Low writing fluency that does not affect understanding;

      ● Incorrect version numbers, including software package names and version numbers on the UI.

      Usability

      ● Incorrect or missing key steps;

      ● Missing prerequisites or precautions;

      ● Ambiguous figures, tables, or texts;

      ● Unclear logic, such as missing classifications, items, and steps.

      Correctness

      ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

      ● Incorrect schematic or architecture diagrams;

      ● Incorrect commands or command parameters;

      ● Incorrect code;

      ● Commands inconsistent with the functions;

      ● Wrong screenshots.

      Risk Warnings

      ● Lack of risk warnings for operations that may damage the system or important data.

      Content Compliance

      ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

      ● Copyright infringement.

      How satisfied are you with this document

      Not satisfied at all
      Very satisfied
      Submit
      Click to create an issue. An issue template will be automatically generated based on your feedback.
      Bug Catching
      编组 3备份