[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where to set swappiness? (an entry in /etc/sysfs.conf doesn't do it)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

On 24.07.2012 09:15, John Magolske wrote:
> Hello,
> 
> This command will set swappiness (to 0 in this case):
> 
> # sysctl vm.swappiness=0
> 
> To have that setting persist across reboots, it is suggested to
> add a line like so to /etc/sysfs.conf :
> 
> vm.swappiness=0
> 
> Which I did...but that value is not set after reboot:
> 
> # cat /proc/sys/vm/swappiness 60
> 
> So I have to set it manually:
> 
> # sysctl vm.swappiness=0 # cat /proc/sys/vm/swappiness 0
> 
> Other settings in /etc/sysfs.conf work, for example these entries:
> 
> devices/platform/smapi/BAT0/start_charge_thresh=87 
> devices/platform/smapi/BAT0/stop_charge_thresh=96
> 
> Will set those values accordingly:
> 
> % cat /sys/devices/platform/smapi/BAT0/start_charge_thresh 87 % cat
> /sys/devices/platform/smapi/BAT0/stop_charge_thresh 96
> 
> But swappiness doesn't get set with an entry to /etc/sysfs.conf
> ... any thoughts as to why not?
> 
> Thanks for any help,

If you set something with sysctl and want it to be permanent, you
should put it into /etc/sysctl.conf.

For example, I have

kernel.core_pattern = %e-%p-%h.core

in it, so

/proc/sys/kernel/core_pattern

stays as %e-%p-%h.core

- -- 
Mika Suomalainen

NOTICE! I am on mobile broadband with very limited time, so I cannot
read emails very much.
The best time to contact me is probably weekends when I have better
connectivity with good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Public key: http://mkaysi.github.com/PGP/key.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A  AA65 4DB5 3CFE 82A4 6728
Comment: Why do I (clear)sign emails? http://git.io/6FLzWg
Comment: Please remove PGP lines in replies. http://git.io/nvHrDg
Comment: Charset of this message should be UTF-8.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJQDl1VAAoJEE21PP6CpGcovrwQAL1cBHdmudw38LoqIkKAqhTN
IwFKc8WBi2F4NlheuI7FkadE3QTiFUxOo6j8UW2yQazvzpwsDsNSLxXqubrEh8SH
7Gs3WfN7H0yDeidyP2FwDRt5ttN9iuaD798uX06WjwqKk8gwpFxwyYt6ibAbvZbW
c1VLJBM8us+bnKs3BsrJFH6uAwIZ0W5/iRRUP3Dl7RwVWO1ruFV1d0Rc2JtPYcgf
hEGSSTfLxufRjUCF3bCtgABI6+aONoNLGO0dIkeF41t7uMEnmGUTY07QSOcQOW75
V93919xq+DQg2openouL98rzX4rBSOeR1Op383XoJQmHkIDM0x4EtKP/6nMAHM/5
u+7CjO8hL7Mua3iXgS/6Meq+E4MWlVeiFq38lJL4lvh8vrTMbxmu1oT+sxqQm3us
OFzhB+oQipeG2RwPM6NGef8PnESWSMg+ux66v0vfa1WO5VM2LFojuZ9dhTO3A++E
Hg7hvKHRsUXMUIR46Ohekint6/mLTOIMxXm1l3A0OlVe2rP2iMfUZxcHrcBmqB3e
J2kEhGtJPkWBTwHIVtC4IIq4uviFtxlQT6Gg1s9r7Vib4JtbjLNMrMscOnwjb+fu
m4ObFLwyHoohAwlCgIHiNz9tm/jrePStcf0a33Ez34ioXhP7vjLCda6ASG5f41RB
bytQA2gGNwdZH9huZ09d
=sGYa
-----END PGP SIGNATURE-----


Reply to: