- This topic has 2 replies, 2 voices, and was last updated Feb 4-12:53 pm by andfree.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › New users › New Users and General Questions › permanantly change vm.swappiness value
Tagged: vm.swappiness
Whatever I tried in a friend’s laptop, vm.swappiness after rebooting is always equal to 1. I created /etc/sysctl.d/local.conf and set it like the advice in this topic:
# Uncomment the following two values to improve perceived system performance
# Threshold at which swapping starts
# Values lower than default favour filling physical RAM before beginning to use a swap area
# Default vm.swappiness=60
vm.swappiness=10
#
# Threshold at which the directory and inode caches are reclaimed
# Values lower than default favour retaining them rather than recovering the memory they occupy
# Default vm.vfs_cache_pressure=100
vm.vfs_cache_pressure=50
After rebooting, vm.swappiness was still equal to 1. I removed the /etc/sysctl.d/local.conf file again and ran:
$ sudo sysctl vm.swappiness=5
vm.swappiness = 5
But after rebooting:
$ sudo sysctl vm.swappiness
vm.swappiness = 1
That’s the expected result ~~ as you can confirm, by performing a websearch “vm.swappiness permanent”
Thanks for the help. Web search helped me to find that the problem was the /etc/sysctl.conf file. There were the lines “vm.swappiness=1” and “vm.vfs_cache_pressure=50” (a bad copy-paste, probably by me, I suppose). I deleted these lines, edited /etc/sysctl.d/local.conf as shown in my initial post, rebooted, and everything is OK.
EDIT: I would mark this topic as solved, if I could.
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |