Swap

From Pandora Wiki
Jump to: navigation, search



Modern wear-leveling-algorithms can compensate some of the disadvantages.


By default, the OpenPandora does not have swaping enabled at all.


How much swap

It's hard to say how much swap your system should provide. As a hint: The Nokia N900, which is also a Linux based Handheld and comes with 256MB RAM, has a 768MB swap partition enabled by default.

Swap partition

In Linux computing, the standard is to have a separate partition for swaping. The (hexadecimal) partition type ID for a swap partition is 0x82. On your flashcard, create a partition with that partition type. Let's take the example from here http://pandorawiki.org/Running_Linux_from_an_SD_card, where you're having a swap partition as the third partition on the first SD card. First we have to 'format' the partition to be a swap partition. As a root-user, you can do that with the command line tool mkswap

sudo su
mkswap /dev/mmcblk0p3

After that, you have to enable the swap partition. You can do that with the swapon tool

swapon /dev/mmcblk0p3

To enable the swap partition on boot, we have to add an entry to the /etc/fstab file. In our example, the line would look something like that:

/dev/mmcblk0p3    none    swap    sw    0 0

After the reboot, use a tool such as swapon or top to determine wether the swap partition is enabled:

swapon -s

Swap file

TODO

When installing SuperZaxxon Final, its first boot does not have zRam enabled. Reboot to have it automatically enabled.

To determine if you have swap enabled, run free or swapon -s