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> | |
- | + | * temporarily deactivete the eMMC swap: <code>swapooff /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 | + | 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.