Host Memory Management Configuration¶
TNSR has commands to tweak a few common host OS memory management parameters.
- 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 by default.
This value can be tweaked lower for systems with less memory or higher for systems with more available memory and larger workloads. For example for a system with a 6GB main heap, consider setting this value to
- 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
- sysctl kernel shmmem <u64>
Maximum size, in bytes, of a single shared memory segment in the kernel. Default value is
To view the current active values of these parameters, use
tnsr# show sysctl
vm/nr_hugepages = 1024
vm/max_map_count = 3096
kernel/shmmax = 2147483648