Please support VectorLinux!

Author Topic: Optimizing system swappiness...whereis sysctl.conf?  (Read 6204 times)

silentstone

  • Member
  • *
  • Posts: 25
Optimizing system swappiness...whereis sysctl.conf?
« on: November 24, 2007, 08:52:48 am »
I'm trying to eek the last bit of power out of the laptop battery, and turn down the temperature, too.  Several optimization guides suggest lowering swappiness to below 20 by modifying /etc/sysctl.conf, but this file is missing in my VL5.8 Standard install.  The setting can be changed manually by writing the desired number to the file /proc/sys/vm/swappiness, but this is erased on a reboot.  How do I set this value automatically?

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: Optimizing system swappiness...whereis sysctl.conf?
« Reply #1 on: November 24, 2007, 09:03:43 am »
Have you tried making a new file? Just because a file isn't there doesn't mean you can't use it. read "man sysctl.conf" for it's syntax.
Most music on my soundcloud page was arranged in programs running on VL.

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: Optimizing system swappiness...whereis sysctl.conf?
« Reply #2 on: November 24, 2007, 10:04:20 am »
The comments section from this link (http://lwn.net/Articles/83588/) specifies creating a file the following way, however the file may need to already exists (don't know):
Quote
And if you want it set at every reboot try:-

echo "vm/swappiness=0" >> /etc/sysctl.conf

(Thats how to do it in debian and fedora, its part of the procpc package)

HTH!

The Headacher

  • Louder than you
  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1553
  • I like the bass to go BOOM!
    • Multimedia on VL (work in progress)
Re: Optimizing system swappiness...whereis sysctl.conf?
« Reply #3 on: November 24, 2007, 10:37:56 am »
the ">>" operator will make sure it's added to the end of the file. If it doesn't exist a new file will be created.
Most music on my soundcloud page was arranged in programs running on VL.

silentstone

  • Member
  • *
  • Posts: 25
Re: Optimizing system swappiness...whereis sysctl.conf?
« Reply #4 on: February 20, 2008, 08:45:41 am »
Well, this feels belated, but...

Thanks for the tips; they helped!