Readyboost for Xubuntu

I have been playing with Readyboost for Microsoft Windows Vista and it’s one of the best features (or the only good feature) that Vista has.

Usually I do my programming with a Xubuntu box, so I thought why not try the same with Xubuntu.

It’s not hard.

  1. Plug, if not plugged, the usb device
  2. Usually Xubuntu will mount the device (or at least show it for you on the desktop). Right click on the icon (Removable Volume) and check if it is mounted (if you can see the files inside the disk, it is mounted). If so, open a terminal screen and type mount. It will show a list of the mounted devices on y our PC. Try to identify the device name for your usb device. Usually is /dev/sda1, but, like in my case, it can change.
    1. Mount the device (if not mounted) and in a terminal screen, use the mount command to show a list with all devices mounted. If you are having trouble finding the device, copy the list to mousepad and umount the device (right click on the icon on desktop) and then, list the devices again. Most likely the device that is missing is your device.
    2. You can use the df -h to list the mounted devices and find out which one is the usb device
  3. Now, before creating the readyboost, you will need to umount the device, so go to the desktop and right click on the icon and umount it.
  4. Now let’s set up the swap file (readyboost).
    1. sudo mkswap /dev/sdf1
      1. Setting up swapspace version 1, size = 3917820 KiB no label […]
    2. sudo swapon -p 32767 /dev/sdf1
      1. This will set up the swap priority for last (to avoid priority mix with the original swap file)
  5. Last step, let’s check the swap files:
    1. cat /proc/swaps

It’s not as easy as Windows Vista, but you can always create a script to run this every time.

Have fun.


About mcloide

Making things simpler, just check: View all posts by mcloide

2 responses to “Readyboost for Xubuntu

  • Steven

    Two things to be careful about, which Vista’s ReadyBoost takes care of but aren’t used in the swap implementation:

    – Vista uses ReadyBoost as a cache for the swap file, not as the actual swap file. This means the real swap file (on a hard drive) is still available even when you remove the USB drive, so it won’t crash. When using a USB device as a swap file, don’t ever remove it, as you’re literally ripping the guts out of some tasks’ process space.

    – There’s not likely to be any wear leveling this way. If your system swaps heavily, the lifespan of the flash memory can be significantly reduced.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: