Editing Swap on microSD

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 84: Line 84:
==Swap priorities==
==Swap priorities==
-
In order to utilize both swap partitions to balance the I/O load (striping), they should have the same priority. The <code>/bin/swapon</code> command shipped with Maemo is the busybox version that does not support <code>-p</code> option. If you don't have Easy Debian environment installed, download the stock Debian mount package for the armel architecture and extract (<code>-x</code>) the swapon binary from it, and copy it somewhere e.g. <code>/sbin/swapon.debian</code>.
+
In order to utilize both swap partitions to balance
 +
the I/O load (striping), they should have the same priority. The <code>/bin/swapon</code> command shipped with Maemo is the busybox version that does not support <code>-p</code> option. If you don't have Easy Debian environment installed, download the stock Debian mount package for the armel architecture and extract (<code>-x</code>) the swapon binary from it, and copy it somewhere e.g. <code>/sbin/swapon.debian</code>.
It seems that it's not possible to use <code>-p -1</code> to match the priority of the default eMMC swap partition. I use the following trick:
It seems that it's not possible to use <code>-p -1</code> to match the priority of the default eMMC swap partition. I use the following trick:
-
# activate the microSD swap: <code>swapon.debian -p 0 /dev/mmcblk1p2</code>
+
* activate the microSD swap: <code>swapon.debian -p 0 /dev/mmcblk1p2</code>
-
# temporarily deactivate the eMMC swap: <code>swapoff /dev/mmcblk0p3</code>
+
* temporarily deactivete the eMMC swap: <code>swapooff /dev/mmcblk0p3</code>
-
# activate it again with matching priority: <code>swapon.debian -p 0 /dev/mmcblk0p3</code>
+
* activate it again with matching priority: <code>swapon.debian -p 0 /dev/mmcblk0p3</code>
After that your swaps should look like this:
After that your swaps should look like this:
Line 101: Line 102:
</pre>
</pre>
-
Depending on the performance of your microSD card, your N900 might now feel much faster when swapping takes place, about the same, or even slower - YMMV. My N900 definitely seems to have less those total I/O trashing episodes lasting 5-10 minutes, where you might think your N900 just died, after doing heavy I/O (e.g. download a 100 MB podcast with gPodder) after activating this dual-swap scheme.  
+
Depending on the performance of your microSD card, your N900 might now feel much faster when swapping takes place, about the same, or even slower - YMMV. My N900 definedly seems to have less those total I/O trashing episodes lasting 5-10 minutes, where you might think your N900 just died, after doing heavy I/O (e.g. download a 100 MB podcast with gPodder) after activating this dual-swap scheme.  
Note: In my testing my N900 crashed when I tried to fill the VFAT data partition on the microSD with something like <code>dd</code> from <code>/dev/null</code> to a file. It's propably best to dedicate the whole microSD card for swap, if possible.
Note: In my testing my N900 crashed when I tried to fill the VFAT data partition on the microSD with something like <code>dd</code> from <code>/dev/null</code> to a file. It's propably best to dedicate the whole microSD card for swap, if possible.

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)