Description of problem:I have 64 GB of ram, and I wish to set permanently the swappiness at 40; I added the line: vm.swappiness=40 to the file /etc/sysctl.conf: [alain4@mag6 ~]$ cat /etc/sysctl.conf net.ipv4.icmp_ignore_bogus_error_responses=1 net.ipv4.icmp_echo_ignore_broadcasts=0 net.ipv4.icmp_echo_ignore_all=0 net.ipv4.conf.all.rp_filter=1 net.ipv4.conf.all.log_martians=1 vm.swappiness=40 but after the boot: [alain4@mag6 ~]$ cat /proc/sys/vm/swappiness 60 of course, it's always possible to set the swappiness at 40 during the session,but this change doesn't remain at the following boot Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3.
solved: I have added the line vm.swappiness=40 to the file /etc/sysctl.d/51-drakx.conf: [alain4@mag6 ~]$ cat /etc/sysctl.d/51-drakx.conf net.ipv4.tcp_window_scaling=1 net.ipv4.tcp_timestamps=1 net.ipv4.conf.all.log_martians=1 net.ipv4.icmp_echo_ignore_all=0 net.ipv4.icmp_echo_ignore_broadcasts=0 net.ipv4.icmp_ignore_bogus_error_responses=1 net.ipv4.conf.all.rp_filter=1 vm.swappiness=40 after reboot [alain4@mag6 ~]$ sysctl vm.swappiness vm.swappiness = 40
Sure? Closing.
CC: (none) => ouaurelienResolution: (none) => FIXEDStatus: NEW => RESOLVED
(In reply to Aurelien Oudelet from comment #2) > Sure? > Closing. I've found the trick in https://forums.mageia.org/en/viewtopic.php?f=7&t=13452
Based on http://rudd-o.com/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that and my own testing, I recommend also setting the threshold ... # cat /etc/sysctl.d/tales.conf # Reduce applications being swapped to disk vm.swappiness=1 # Don't shrink the inode cache vm.vfs_cache_pressure=50 This is on a system with 16GB ram, opera 12.16, firefox, and ktorrent all running under kde/plasma ... # free -m total used free shared buff/cache available Mem: 16020 4475 182 251 11362 10962 Swap: 32761 4 32756
CC: (none) => davidwhodgins
(In reply to Dave Hodgins from comment #4) > Based on > http://rudd-o.com/linux-and-free-software/tales-from-responsivenessland-why- > linux-feels-slow-and-how-to-fix-that > and my own testing, I recommend also setting the threshold ... > > # cat /etc/sysctl.d/tales.conf > # Reduce applications being swapped to disk > vm.swappiness=1 > # Don't shrink the inode cache > vm.vfs_cache_pressure=50 > > This is on a system with 16GB ram, opera 12.16, firefox, and ktorrent all > running > under kde/plasma ... > # free -m > total used free shared buff/cache > available > Mem: 16020 4475 182 251 11362 > 10962 > Swap: 32761 4 32756 sorry, /etc/sysctl.d doesn't content the file tales.conf [alain4@mag6 ~]$ ls /etc/sysctl.d 50-libreswan.conf 51-alt-sysrq.conf 51-drakx.conf
For now, create the file manually. Long term I recommend the installer or another Mageia tool be changed to check for systems with more 4GB or more of ram and add the file if that's the case. Reopening and assigning to the Mageia tools group for consideration of the change for cauldron.
Assignee: bugsquad => mageiatoolsStatus: RESOLVED => REOPENEDResolution: FIXED => (none)Version: 8 => Cauldron
Thinking about it more, perhaps it should not be done for no gui servers where overall performance is more important than responsiveness.
Summary: impossibility to set permanently the swappiness at one another value than 60 => Default vm.swappiness and vm.vfs_cache_pressure settings result in poor responsiveness on larger ram desktop systems
(In reply to Dave Hodgins from comment #6) > For now, create the file manually. no need, writing the line "vm.swappiness=40" in /etc/sysctl.d/51-drakx.conf fine works: at every boot, the swappiness is set to 40 (value I've choosed) in fact, I think that choosing any file in /etc/sysctl.d will work > > Long term I recommend the installer or another Mageia tool be changed to > check > for systems with more 4GB or more of ram and add the file if that's the case. > > Reopening and assigning to the Mageia tools group for consideration of the > change for cauldron.
(In reply to Dave Hodgins from comment #6) > For now, create the file manually. see bug 25212 > > Long term I recommend the installer or another Mageia tool be changed to > check > for systems with more 4GB or more of ram and add the file if that's the case. > > Reopening and assigning to the Mageia tools group for consideration of the > change for cauldron.
(In reply to peter lawford from comment #8) > (In reply to Dave Hodgins from comment #6) > > For now, create the file manually. > no need, writing the line "vm.swappiness=40" in /etc/sysctl.d/51-drakx.conf dont do that... if drakx writes anything to that file, it might get overwritten. > fine works: at every boot, the swappiness is set to 40 (value I've choosed) > in fact, I think that choosing any file in /etc/sysctl.d will work This is what you should do (create your own file) Any file ending in *.conf will be parsed... the number in the beginning is just to allow ordering, so take care if some parameter is in several files, the last one wins
(In reply to Thomas Backlund from comment #10) > (In reply to peter lawford from comment #8) > > (In reply to Dave Hodgins from comment #6) > > > For now, create the file manually. > > no need, writing the line "vm.swappiness=40" in /etc/sysctl.d/51-drakx.conf > > dont do that... > if drakx writes anything to that file, it might get overwritten. > > > fine works: at every boot, the swappiness is set to 40 (value I've choosed) > > in fact, I think that choosing any file in /etc/sysctl.d will work > > This is what you should do (create your own file) > > Any file ending in *.conf will be parsed... > > the number in the beginning is just to allow ordering, so take care if some > parameter is in several files, the last one wins you're right, I have run: [alain4@magaux ~]$ echo "vm.swappiness=40" > /etc/sysctl.d/50-swappiness.conf (this command has created the file /etc/sysctl.d/50-swappiness.conf) and erased the corresponding line in /etc/sysctl.d/51-drakx.conf after a reboot, I have seen it works