The officially official Devuan Forum!

You are not logged in.

#1 2017-12-07 05:48:30

makh
Member
Registered: 2017-10-08
Posts: 51  

[SOLVED] <Ascii/2> Standard reconfiguration - swappiness

Hi

I did as, as advised on different places at web:

nano /etc/sysctl.d/99-sysctl.conf

# Decrease swap usage:
vm.swappiness = 10
vm.vfs_cache_pressure = 50

to get on reboot:
cat /proc/sys/vm/{swap,vfs}*

10
50

Is this standard or okay for sysV, or more specific to systemd?

Thankyou

Last edited by makh (2017-12-18 07:05:24)


HP Probook 440 G2: Arch, Debian Stable
Others: Devuan, Centos, Ubuntu, Opensuse
GUI: Openbox, Xfce, Cinnamon
Chroot: Debian, Ubuntu, Fedora

Offline

#2 2017-12-07 14:29:35

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: [SOLVED] <Ascii/2> Standard reconfiguration - swappiness

It's a kernel feature. I don't think it has anything to do with the init system, but I'm not sure about what the rest of systemd does with it.

Did you notice any difference in performance after you changed it?

https://www.kernel.org/doc/Documentation/sysctl/vm.txt

swappiness

This control is used to define how aggressive the kernel will swap
memory pages.  Higher values will increase aggressiveness, lower values
decrease the amount of swap.  A value of 0 instructs the kernel not to
initiate swap until the amount of free and file-backed pages is less
than the high water mark in a zone.

The default value is 60.

vfs_cache_pressure
------------------

This percentage value controls the tendency of the kernel to reclaim
the memory which is used for caching of directory and inode objects.

At the default value of vfs_cache_pressure=100 the kernel will attempt to
reclaim dentries and inodes at a "fair" rate with respect to pagecache and
swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer
to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will
never reclaim dentries and inodes due to memory pressure and this can easily
lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100
causes the kernel to prefer to reclaim dentries and inodes.

Increasing vfs_cache_pressure significantly beyond 100 may have negative
performance impact. Reclaim code needs to take various locks to find freeable
directory and inode objects. With vfs_cache_pressure=1000, it will look for
ten times more freeable objects than there are.

Offline

#3 2017-12-07 23:22:00

makh
Member
Registered: 2017-10-08
Posts: 51  

Re: [SOLVED] <Ascii/2> Standard reconfiguration - swappiness

Hello Sir!

Thankyou...

Actually when I am using desktop, it starts to consume swap, even when RAM is not used by 50%. Anyways ... it is showing a bit difference in swap usage, after using these two values.


HP Probook 440 G2: Arch, Debian Stable
Others: Devuan, Centos, Ubuntu, Opensuse
GUI: Openbox, Xfce, Cinnamon
Chroot: Debian, Ubuntu, Fedora

Offline

Board footer