You are not logged in.
Pages: 1
Hi - Is it ok to use /etc/rc.conf to set swappiness on boot-up - ie setup a parameter like:
vm.swappiness=x
If so, is it ok to put it at the end of the file.
Thanks.
Offline
It won't work at the end of rc.conf - you need to put it in rc.local.
Offline
Thanks - however, it doesn't work in /etc/rc.local either - it gives
"command not found"
as a last boot up message, just before login - in addition, I tried putting it in:
/etc/sysctl.conf
however, Arch doesn't seem to use this file ?? - is it possible to call this file from somewhere? - anyone have any other thoughts.
At the moment my setting is set to 60 (which is the default apparently) - would like to lower this somewhat.
Thanks
Offline
1. Create /etc/sysctl.conf and put your settings in it.
2. Add /sbin/sysctl -p to /etc/rc.local.
3. Reboot or run sysctl -p as root.
Offline
Cheers Ianrat - that worked perfectly - last boot message was;
vm.swappiness=x
without any errors, and checked:
cat /proc/sys/vm/swappiness
and it has changed accordingly.
BTW - what does anyone think - for an ordinary desktop user with say 512 mb ram, would it be useful to reduce it to say
vm.swappiness=10
or 20 etc from the default of 60.
Or does anyone think it's overrated and there'd be little difference in desktop app snappiness/responsiveness/loading.
Does anyone else use this tweak ?
Offline
Seems to work here nicely
Arch Linux
Dual AMD MP 2000
GF 6600GT
1 Gig Ram
etc.
great find and a pity you can't get options for tuning like this with OS installers. Oh well.
Leave ones footprint not in the physical world but the in the world of the mind.
Offline
Thanks - however, it doesn't work in /etc/rc.local either - it gives
"command not found"
Well, it would do that - wm.swappiness is not a command, after all. You could have done it in rc.local with the following command:
echo x > /proc/sys/vm/swappiness
and I probably should have clarified that for you. Glad you're sorted, anyway.
Offline
Thanks all - just as a heads up and for further interest - might be something of use below:
http://www.linuxjournal.com/article/8308
http://kerneltrap.org/node/3000
Offline
this file, swappiness, does one have to install any specific programs for it to show, ??
http://www.linuxportalen.com -> Linux Help portal for Linux and ArchLinux (in swedish)
Dell Inspiron 8500
Kernel 2.6.14-archck1 (selfcompiled)
Enlightenment 17
Offline
As a kernel "feature", you should be able to modify it via a run-time tunable - to start with, open an xterm and as an ordinary user type:
$ cat /proc/sys/vm/swappiness
It should give you a default value of 60.
After you've verified that succesfully - then follow the instructions further up the thread to change it.
Offline
I do not have that file, I have compiled my own kernel, 2.6.11.8 with CKO6 patchset..
http://www.linuxportalen.com -> Linux Help portal for Linux and ArchLinux (in swedish)
Dell Inspiron 8500
Kernel 2.6.14-archck1 (selfcompiled)
Enlightenment 17
Offline
ck patchset uses so-called mapped watermark instead (and actually most of other patchsets use it as well, taking it from ck). It's configurable at /proc/sys/vm/mapped. Check ck's homepage for more info ;-)
Offline
ah..thanks..that does explain it:D
http://www.linuxportalen.com -> Linux Help portal for Linux and ArchLinux (in swedish)
Dell Inspiron 8500
Kernel 2.6.14-archck1 (selfcompiled)
Enlightenment 17
Offline
Pages: 1