Rng the range of swapness.
I see descriptions of 0-100 and 0-200.egardi
The old CentOS7 is set to 30, and RockyLinux9.3 is set to 60.
If the CentOS range is 0-100, then RockyLinux of 60 would be considered the same value. It’s probably the default value.
It seems that there was a range change in redhat, what do you think?
Is there a note in the source that says you changed 0-100 to 0-200?
The default has been 60 for a long time. You could even go back to RHEL 5 and find the default was 60. There’s even Red Hat documentation dating back to the RHEL 5 days that points out this default.
Here’s the kernel source, straight from github.
$ grep vm_swappiness mm/vmscan.c
int vm_swappiness = 60;
That tells me the default is 60. In fact below shows an initial git repository build commit, that omits just about all history predating this commit, from 2005 (see tag v2.6.12-rc2).
Even the systemd sources from CentOS 7, which drops down default sysctl files, doesn’t mention swappiness. So I’m not sure where you got “30” from.
I’m not sure what you mean by “range change”. If there is need a static range (e.g. you cannot go over 100), this is also likely something dictated by the kernel developers. It may have been always possible to set 200, but it may not actually do anything useful beyond 100 in older kernels, hence why documentation has always said 0-100.
so I doubt very much that previous versions were anything less unless customised by the person who installed. Either that, or some app installed on it has configured it differently - can be known to happen.
I have configured my el9 hosts with Ansible and can’t find any non-default config for tuned nor swappiness from the play.
On my el9 Gnome desktops tuned has apparently stopped couple seconds after start and swappiness remains 60.
On el9 MATE desktops tuned runs and swappiness is not 60 (profile “throughput-performance”).
All VM’s (el7-el9) seem to have swappiness 30 (profile “virtual-guest”).
The swappiness is 30 on el7 host that has tuned profile “desktop”.
Thanks information .
my post swapness renge 0-200 is this web page , i looked .
Sorry japanese. but same as Red hat english page? " swappiness 値 (0 から 200 まで) は、"
regrds!
/minami
[35.3. 仮想メモリーパラメーター Red Hat Enterprise Linux 8 | Red Hat Customer Portal]
The swappiness value, ranging from 0 to 200, controls the degree to which the system favors reclaiming memory from the anonymous memory pool, or the page cache memory pool.
Setting the swappiness parameter’s value:
Higher values favor file-mapped driven workloads while swapping out the less actively accessed processes’ anonymous mapped memory of RAM. This is useful for file-servers or streaming applications that depend on data, from files in the storage, to reside on memory to reduce I/O latency for the service requests.
Low values favor anonymous-mapped driven workloads while reclaiming the page cache (file mapped memory). This setting is useful for applications that do not depend heavily on the file system information, and heavily utilize dynamically allocated and private memory, such as mathematical and number crunching applications, and few hardware virtualization supervisors like QEMU.
The default value of the vm.swappiness parameter is 60.
There is also note that swappiness could be set per cgroup i.e. not same for all processes.