Note: This page provides definitions for a variety of possible settings. Please see the SPEC CPU result page to find out what settings were actually used.
Many of the settings below are defined in more detail at
https://www.kernel.org/doc/Documentation/sysctl/vm.txt
https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
cpupower-frequency-set Adjust the MHz for the CPUs on the system,
set limits for them, or select a "scaling governor". For example,
cpupower-frequency-set -g performance selects higher frequency
at the cost of additional power usage;
cpupower-frequency-set -g powersave does the opposite.
dirty_ratio: Sets the threshold at which processes will begin writing dirty (modified)
pages to disk. The dirty_ratio is expressed as a percentage of total available memory.
For example, this command sets the threshold to 8%
echo 8 > /proc/sys/vm/dirty_ratio
drop_caches: Reduces the size of the page cache and kernel slab objects
Example to free both:
echo 3 > /proc/sys/vm/drop_caches
numa_balancing: Automatically move memory to nodes that are accessing it.
This is done by un-mapping and re-mapping pages, which may incur unwanted overhead if proceses
are already bound to the desired memory nodes.
For example, to disable numa balancing, one could use:
echo 0 > /proc/sys/kernel/numa_balancing
numactl Controls NUMA policy for individual processes. There are many options, as defined at https://man7.org/linux/man-pages/man8/numactl.8.html. Options useful for workloads similar to SPEC CPU may include:
Note that the SPEC CPU config file may use config file preprocessing and/or
shell mathematics to compute the desired memory location or desired CPU number.
For example, these commands pick a memory unit by dividing the copy number by the number of
CPUs per node:
%define numasize 20 numactl --membind=`expr $SPECCOPYNUM / %{numasize}` --physcpubind=$SPECCOPYNUM
swappiness Controls how aggressively the kernel swaps memory pages.
The values can range from 0 to 100. Low values decrease the amount of swapping.
For example, this command indicates that swapping should occur only when essential:
echo 1 > /proc/sys/vm/swappiness
transparent_hugepage Transparent huge pages may provide a performance benefit by reducing kernel time spent looking up page locations. The potential benefit is application dependent, and some applications may do better with smaller pages.
tuned-adm Controls tuned, the dynamic adaptive system tuning daemon. Commonly, one may load a tuning profile, for example:
It is also possible to disable all profiles, using:
tuned-adm off
ulimit -s [n | unlimited]: Allow the stack size to grow to n kbytes, or unlimited to impose no limit.
zone_reclaim_mode Provides control over memory allocation when multiple NUMA nodes are active. If zone reclaim is off, data files may be cached on any node. There are three settings that can be ORed together:
For example, this command enables reclaiming:
echo 1 > /proc/sys/vm/swappiness
Dividing the chip into separate nodes (hemisphere or quadrant) may improve latency to the last level cache and main memory, which may benefit overall performance for NUMA-aware operating systems and workloads.
The jemalloc memory allocation library can speed up memory allocation, in part by keeping lists of commonly used sizes. The library includes various configuration options, which are documented at http://jemalloc.net/jemalloc.3.html and in its file INSTALL.md as found in the distribution tar file, and as posted at https://github.com/jemalloc/jemalloc/blob/master/INSTALL.md
Some of the useful options include:
Example configuration:
$ wget https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2 $ bzip2 -dc jemalloc-5.2.1.tar.bz2 | tar -xf - $ cd jemalloc-5.2.1/ $ ./configure --prefix=/usr/local/jemalloc-521 $ make -j30 $ sudo make install