Host Memory Management ConfigurationΒΆ

TNSR has commands to tweak a few common host OS memory management parameters.

These are:

sysctl vm nr_hugepages <u64>

Virtual memory, maximum number of huge pages. This controls allocations of huge areas of contiguous memory, which is used to keep TNSR in memory, rather than swapping. Each huge page is 2MB by default, and the default number of huge pages is 1024. Multiplying the values yields 2GB of RAM set aside. This value can be tweaked lower for systems with less memory or higher for systems with more available memory and larger workloads.

sysctl vm max_map_count <u64>

Virtual memory, maximum map count. This controls the number of memory map areas available to a given process. With workloads requiring larger amounts of memory, this may need increased to allow sufficient levels of memory allocation operations to succeed. The default value is 3096.

sysctl kernel shmmem <u64>

Maximum size, in bytes, of a single shared memory segment in the kernel. Default value is 2147483648 (2GB).

To view the current active values of these parameters, use show sysctl:

tnsr# show sysctl
vm/nr_hugepages = 1024
vm/max_map_count = 3096
kernel/shmmax = 2147483648