VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: swappiness value  (Read 3956 times)

vectornewb

  • Member
  • *
  • Posts: 46
swappiness value
« on: July 18, 2011, 03:49:54 pm »

Curious what the experienced user think of the subject. Am told vm.swappiness=10 is a good setting for desktop PC's. Can't even find where to change it, which VL light is set to the normal default of most distro's at =60. Worth doing and advice as to what to edit to achieve it if it is ? I mean I can run the command to temporarily set it.

echo 10 > /proc/sys/vm/swappiness

But it isn't persistent and the default value of 60 is restored upon reboot. Any thoughts and experiences with this folks ?


Thanks.
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4086
Re: swappiness value
« Reply #1 on: July 18, 2011, 05:13:09 pm »

Try adding the command to /etc/rc.d/rc.local
Logged

vectornewb

  • Member
  • *
  • Posts: 46
Re: swappiness value
« Reply #2 on: July 19, 2011, 08:22:51 pm »

Thanks nightflier, in your experience is it worth doing ? I mean any benefits to it ? Honestly VL light doesn't use the swap hardly that I've seen even at the default of 60. Guess could always change it with echo and see if there's any noticeable difference. Thought to ask the people more linux savvy and who have more experience with VL than I do what they think about the topic.

Anyway, thanks for the reply and suggestion.
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4086
Re: swappiness value
« Reply #3 on: July 20, 2011, 02:04:09 am »

I never played much with it, the defaults work fine for my use. It can't hurt to test different values though, so play with it and see if you notice any change. And please share your experience if you do, for the benefit of everyone. :)
Logged

vectornewb

  • Member
  • *
  • Posts: 46
Re: swappiness value
« Reply #4 on: July 20, 2011, 05:10:54 pm »

Just been using that echo command to temp change it now and then. Not really seeing all that much of a diff. Haven't experimented enough. When editing the file you mention, not even overly sure where to add the edit. So is making leery of messing with it. Considering it barely uses swap even with the default setting. VL seems a bit harder to figure out how to dig into than some others I've tried. Though in my (nix newb) case found out, that can be a good thing. As it keeps me from borking it up. :D
Logged

vectornewb

  • Member
  • *
  • Posts: 46
Re: swappiness value
« Reply #5 on: July 20, 2011, 05:12:25 pm »

Just been using that echo command to temp change it now and then. Not really seeing all that much of a diff. Haven't experimented enough. When editing the file you mention, not even overly sure where to add the edit. So is making leery of messing with it. Considering it barely uses swap even with the default setting. VL seems a bit harder to figure out how to dig into than some others I've tried. Though in my case (nix newb) found out, that can be a good thing. As it keeps me from borking it up. :D

As always thanks for the reply and input nightflier. Seems like you single handedly handle a ton of requests for help and support with this distro.
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4086
Re: swappiness value
« Reply #6 on: July 20, 2011, 05:27:04 pm »

Thanks. :)

Yes, VL is a little simpler than the "fully automatic" distros that grab the headlines. You need to open the hood and get your hands dirty to really appriate it. As far as this command goes, you would add the line:
Code: [Select]
echo 10 > /proc/sys/vm/swappiness
to the end of /etc/rc/d/rc.local

The commands in rc.local get executed with root privileges. Commands in your WM/DE startup files launch with user privileges.
Actions performed as regular user can bork your profile, but won't hurt the system, so keep a good backup of important files and go for it. Have fun figuring things out.
Logged

vectornewb

  • Member
  • *
  • Posts: 46
Re: swappiness value
« Reply #7 on: July 21, 2011, 01:54:35 am »

Ah why not ... what's the worst that can happen ? A reinstall I guess. Definitely done enough of those trying to learn the ropes w linux mint. Also agree nix is weird. The distro I dislike the most and found to be nothing special is a household name. The really cool ones that do something spectacular ... barely anyone knows about ? Which VL light definitely lives up to it's name and I've been promoting. When they said light ... they weren't kidding. While still being full of features, user friendly and packed fulla linuxy goodness.

Sighs anyway, cover me ... I'm going in. :D

Well it's done ... check in terminal confirms swappiness=10 now. Guess will have to spend some time comparing and try to figure out if there's any real difference. Thanks nightflier as always. Basic look around seems nothing is borked.
« Last Edit: July 21, 2011, 02:16:09 am by vectornewb »
Logged

vectornewb

  • Member
  • *
  • Posts: 46
Re: swappiness value
« Reply #8 on: July 22, 2011, 04:01:22 am »

Update: Not really noticing much difference. Then again VL light wasn't using the swap hardly ever with it set to default. Haven't exhaustively played with it. Can say it hasn't borked anything, sys stats seem to be where they were before. Still prefer doing this as have seen vm.swappiness=10 being the recommended setting for desktops in some places around the web. Think every lil bit can help make a nix OS run smoother. So generally just change it and file it under every lil bit helps, shrugs.

Guess it could improve performance a bit for folks who push their systems harder than I do. Lowering the OS's tendency to use the swap when there's free RAM still available has to be at least a tad of benefit ? I mean disk writes and CPU cycles I'd think would add up and cause at least some lag otherwise. Just a nix newbs opinion and could be totally wrong. Thanks yet again nightflier for pointing me in the right direction. Would've more than likely never found the right file to edit on my own.



« Last Edit: July 22, 2011, 04:15:04 am by vectornewb »
Logged