github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/metrics/density/README.md (about)

     1  # Kata Containers density metrics tests
     2  
     3  This directory contains a number of tests to help measure container
     4  memory footprint. Some measures are based around the
     5  [PSS](https://en.wikipedia.org/wiki/Proportional_set_size) of the runtime
     6  components, and others look at the system level (`free` and `/proc/meminfo`
     7  for instance) impact.
     8  
     9  ## `memory_usage`
    10  
    11  This test measures the PSS footprint of the runtime components whilst
    12  launching a number of small ([BusyBox](https://hub.docker.com/_/busybox/)) containers
    13  using ctr.
    14  
    15  ## `fast_footprint`
    16  
    17  This test takes system level resource measurements after launching a number of
    18  containers in parallel and optionally waiting for KSM to settle its memory
    19  compaction cycles.
    20  
    21  The script is quite configurable via environment variables, including:
    22  
    23  * Which container workload to run.
    24  * How many containers to launch.
    25  * How many containers are launched in parallel.
    26  * How long to wait until taking the measures.
    27  
    28  See the script itself for more details.
    29  
    30  This test shares many config options with the `footprint_data` test. Thus, referring
    31  to the [footprint test documentation](footprint_data.md) may be useful.
    32  
    33  > *Note:* If this test finds KSM is enabled on the host, it will wait for KSM
    34  > to "settle" before taking the final measurement. If your KSM is not configured
    35  > to process all the allocated VM memory fast enough, the test will hit a timeout
    36  > and proceed to take the final measurement anyway.
    37  
    38  ## `footprint_data`
    39  
    40  Similar to the `fast_footprint` test, but this test launches the containers
    41  sequentially and takes a system level measurement between each launch. Thus,
    42  this test provides finer grained information on system scaling, but takes
    43  significantly longer to run than the `fast_footprint` test. If you are only
    44  interested in the final figure or the average impact, you may be better running
    45  the `fast_footprint` test.
    46  
    47  For more details see the [footprint test documentation](footprint_data.md).
    48  
    49  ## `memory_usage_inside_container`
    50  
    51  Measures the memory statistics *inside* the container. This allows evaluation of
    52  the overhead the VM kernel and rootfs are having on the memory that was requested
    53  by the container co-ordination system, and thus supplied to the VM.
    54  
    55  ## `k8s-sysbench`
    56  
    57  Sysbench is an open-source and multi-purpose benchmark utility that evaluates parameters features
    58  tests for CPU, memory and I/O. Currently the `k8s-sysbench` test is measuring
    59  the CPU performance.