.

Optimise 9.10 SWAP with Swappiness [KARMIC KOALA BIBLE #13]

English   English (change)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

RAM up Your SWAP for Improved Stability

ram image

Clearly, the order of the day is to RAM your machine up to the hilt, but enhancing the use of the swap file can also be a benefit. Here's how, using Swappiness.

Why? Because ..

Computing can be very RAM-intensive. Say, you are running a graphics editor, a web browser or two, office apps and, who knows, maybe even a video editor.

Then there's AC-DC playing in the background .. ;)

the_guv's sistasite: Setup The Ultimate VPS

"Blank box to top-notch web server"

  • plain English copy/paste tutorials with video
  • written for VPS beginners and Linux newbies
  • perfect for multiple sites, blogs & more
  • Fast. Secure. Future-proofed. Cheap-as-chips!
  • "Wow!!" "godsend!!" "GREAT!!!" "awesome"

Ubuntu & Debian, Nginx (beats Apache), MySQL, PHP-FPM, Xcache, WordPress, WP MU, Drupal etccccc

Set Up & Enhance Ubuntu 9.10 .. KARMIC KOALA BIBLE

In simple copy/paste steps .. from zero to hero.

Scroll down for the full series index.

Wake up and smell the Ubuntu! Hope it helps. the_guv

Check Your Swappiness Value

The lower the value, the longer it takes for swap to kick in. Of a scale of 0-100, the default is 60. Check yours:-

cat /proc/sys/vm/swappiness

By way of a contradiction, Ubuntu's official swap guide - and if you are reading this you should also read that - recommends a way lower value, of just 10, to allow for quicker swap access. While there is no one-size-fits-all, have a play with various swappiness values.

To change the default, open:-

gksudo gedit /etc/sysctl.conf

Search for this:-

vm.swappiness=60

Swap the value to this:-

vm.swappiness=10

.. and that takes effect after a reboot.

vm.swappiness=60 Doesn't Exist

You opened the sysctl.conf file and vm.swappiness wasn't there? Very possible.

Just scroll to the bottom of the file and add your swappiness parameter to override the default, so paste:-

vm.swappiness=10

Change Swappiness Value Without Reboot

This is handy to try different values without having to reboot each time.

To change the swappiness value for the current session only, or until you change again the value, type:-

sudo sysctl vm.swappiness=10

.. where you want to try the value of 10, for example.


If you liked that ...
  • Easy-as-you-like! Adapt Square Boxes with Hassle-Free Curves

    Give your site a design lift with this simple CSS code snippet. Simply choose a radius and drop it in a div for a real easy way to add curves without any images or javascript. This is super-fast to do and works for [...]
  • Swap Vista Default Using Vistalizator

    Need to change the factory-installed language setting? Can't? YOU CAN NOW! .. using Vistalizator and any language packs you prefer. So you bought a new PC somewhere where the native language isn't English, maybe in [...]
  • Video How-to: Add a Favicon

    If I had a Big Mac for every favicon tutorial out there, I'd be dead. But hey, I needed a favicon, and I figured a video illustrating the process may come in handy for some folks, so here goes. What is a [...]
  • Dividing the Hard Drive: Food for Thought

    Pre-OS-install, mapping out data/system demands for optimal disk segmentation saves headaches down the road. Here's a heads-up to help. You don't have to, but it is a mighty good idea to put pen to paper, [...]
  • About Guvnr & the_guv

    Hi.  My name's Olly Connelly.  Welcome to Guvnr. About Guvnr.com Guvnr launched in 2008 as a showcase for my Web, PC and Content services. [...]
... maybe you'll like these?

.