Submit A Tip Alternative Tip Form

[How To] Add Swap Memory to your Chromebook

Chrome OS still require some tweaking like all other operating systems.

Majority of Chromebooks are limited to 2GB RAM, with no option to upgrade the memory. With a dozen tabs open, you can easily fill your available memory. In this How-To, we will show you how to increase your available memory.

I, like many others, will have dozen or so tabs open on their Chromebook. With the limited available RAM, Chrome OS can easily fill it. The Chrome team have found a way to combat it by implementing a feature called tab scrubbing, which will freeze inactive tabs. Thus, will reduce the memory usage to allow Chrome OS to function. However, the downside to this feature is that when you return to that tab, you will have to reload the page. This can be very annoying and affect your work flow.

For many years in computing, when available RAM was limited in computers, Virtual Memory was used to add additional memory for the operating system and applications to use, which was stored on the Hard Drive. In Linux, it is known as SWAP. The Chrome team have implemented SWAP into Chrome OS, as an experimental feature.

To activate SWAP, you will need to open terminal (Ctrl + Alt + t). In terminal, type the following command:

swap enable 2000

This will create a 2GB SWAP partition on your Chromebook’s SSD, adjusting the number will change the SWAP size. The Chrome team recommends 2GB. A restart is required to activate your newly created SWAP  partition. It is regarding as an experimental feature, and is not recommended for daily use. To disable the SWAP partition  type the following command in terminal and restart:

swap disable

Hopefully this feature will prevent your Chrome tabs from crashing and you should be able to use more tabs. A handy feature until we get Chromebooks with more RAM.

Update! A few of you had questions in comments regarding the Swap feature, I hope to answer some of your questions in the comments.

When Swap is enabled, it will stay enabled on your Chrome devices until you disable it, it will still be there when you reboot. The Swap feature will work on all Chrome devices, with either a HDD (found in the Acer C7 and Samsung Chromebox) and SSD (found in most Chromebooks).

 

  • Ryan Hoots

    Is this swap presistant, or do you have to run that command every time you reboot?

    • http://digitalbounds.com/ Leon Hitchens IV

      I was wondering the same thing.

      • Jay Munsterman

        It is persistent. Or at least it has been persistent on my ARM Chromebook through several upgrades and reboots…

    • Ed Hewitt

      I have updated the post answering your question. Thanks!

      • Ryan Hoots

        Thanks for updating it. :)

        • Theo

          It makes my Samsung Chromebook work better.

      • Chuck

        I had a lot of problems with my acer cromebook crashing figuring it was the flash app
        but then saw this article about swapping memory.. since I replaced the 16g ssd with a 125g ssd I figured ssd is solid state so swapping would be the same as additional memory.

        I even kicked it up from swap enable 2000 to swap enable 4000 and swap enable 6000

        I did the memory_test and everything looked ok.

        Well I haven’t had a crash since.

        Looks like the problem I had was the lack of memory needed… so now with the swap
        command in place.. knowing it will be there on reboots…

        what a nice solution. Hope those with crash problems will pass this on.

        Goggle Chrome people should set a default for at least using the extra 2000

        having a standard 2g of memory just don’t cut what is needed by so many
        apps and pages.

        I also noted that goggle added Bluetooth to the chromebook settings… knew it
        was in the hardware but till recently chrome os had it disabled.. well it’s there now
        and works fine…

        so thing are getting better.. and thanks to this article a big headache has been
        solved.

        thank you

        Chuck in Sarasota

  • http://digitalbounds.com/ Leon Hitchens IV

    Can you do this on the Acer Chromebook where it has a hard drive? Or are you able to upgrade ram?

    • http://www.facebook.com/profile.php?id=1658495863 Curtis Alan Mitchell

      You can upgrade the C7′s RAM and HDD if you are so inclined. Lots of different places of easy-to-follow instructions on the procedure if you google it.

  • tntboomman

    Did it and it will work on any chrome os device and stays on even if you reboot,until you type swap disable

    • Ed Hewitt

      I have updated the post answering your question. Thanks!

  • http://twitter.com/ryanmacnish Ryan Macnish

    I would only do this if i was really desperate, swap is known to be much much slower than accessing RAM, even on an ssd, people just don’t realise how much faster RAM is.

    • dtigue

      Swap is much slower but I’ve seen that on my Acer C7 and my CR48 chromebooks that loading a tab that has sit dormant for several days pops open immediately with 3GB of Swap compared to having to completely reload/refresh the tab when using RAM only. Swap has also helped speed up some of my slower/older Linux machines that have limited RAM. So yes swap is slower than RAM but nice to have when RAM is limited. And it works so nice on Chrome OS despite the warning that it may create some instability.

      • Olaru Paul

        It is that fast because it is zRam (which sits in ram too, but might shrink whatever is swapped, in average, by half)

    • W.G.

      The author forgot a really important tidbit! This is zRam and doesn’t swap to the SSD, it’s done in RAM. It’s fast and wear on the SSD is avoided. Source: crbug.com/199548

      • Ryan Beesley

        Thank you. That was exactly my concern when I read this. Glad to hear that running this on my Chromebook isn’t going to cause additional writes to the SSD.

  • Ethan Monotreme

    From other sources I have read that having swap space can ruin you SSD due to the much lower r/w limit, can anyone confirm this?

    • Olaru Paul

      zRam is used. That doesn’t create any r/w cycles on your SSD, but the swap is actually still in RAM, only compressed. So, it isn’t like the usual swap space on other operating systems (eg. not like a pagefile on Windows or a swap part. on Linux)

  • Chase Mandell-Scott

    <3

  • Marc

    do I have to do this for every user account on the machine or does it apply to all?