Flopswap

m
m (update)
Line 7: Line 7:
===Partition Requirements===
===Partition Requirements===
-
Before installation your micro SD card needs setting up with linux-swap on two partitions.
+
Before installation your micro SD card needs setting up with two equally sized linux-swap partitions and one on the device (backup).
-
For Flopswap to function it requires the following partitions to be of linux-swap type
+
If you have not removed the swap partition on your device the later will already be working.
-
 
+
-
/dev/mmcblk0p3
+
-
/dev/mmcblk1p2
+
-
/dev/mmcblk1p3
+
-
 
+
-
If you have not modified the partitions on your device the first "0p3" space, will already be working and in the correct location for FlopSwap.
+
===Fragmentation===
===Fragmentation===
Line 57: Line 51:
*Show Current
*Show Current
-
Shows currently active swap (cat /proc/swaps)
+
Shows currently active swap(s) (cat /proc/swaps)
*Check Usage
*Check Usage
Shows current fresh swap usage percentage via hildon banner and recommends fresh swap at 94% via hildon dialog.
Shows current fresh swap usage percentage via hildon banner and recommends fresh swap at 94% via hildon dialog.
-
 
-
 
-
'''IMPORTANT:-'''
 
-
 
-
'''''Swaps HAVE to be in the following locations.'''''
 
-
 
-
'''/dev/mmcblk0p3 /dev/mmcblk1p2 /dev/mmcblk1p3'''
 
==Bugs==
==Bugs==
Line 86: Line 73:
These partitions should be located after the first FAT partition.
These partitions should be located after the first FAT partition.
-
The card will then have a FAT part (mmcblk1p1) swap1 (mmcblk1p2) and swap2 (mmcblk1p3).
+
The card will then have a FAT part (partition 1) swap1 (partition 2) and swap2 (partition 3).
Line 127: Line 114:
==Changelog==
==Changelog==
-
'''0.0.6'' (Current Devel)'''''
+
'''0.1.0'' (TBA)'''''
 +
* Big changes to backend, so new version number
 +
* Change to get swap locations from blkid
 +
* Change upstart file to use blkid
 +
* Support for CSSU upstart swap_sd in mount-ops-overwrite
 +
* General clean up of code
 +
 
 +
'''0.0.6'' (Current Testing)'''''
* Fix bug on Settings page stopping upstart file being created.
* Fix bug on Settings page stopping upstart file being created.
Line 152: Line 146:
==Wiki Update==
==Wiki Update==
-
:sixwheeledbeast - 03 Apr 2013 17:32 UTC
+
[[User:sixwheeledbeast|sixwheeledbeast]] 22:21, 21 September 2013 (UTC)
[[Category:Software]]
[[Category:Software]]
[[Category:Qt]]
[[Category:Qt]]

Revision as of 22:21, 21 September 2013

Contents

Introduction

FlopSwap is a Swap management Tool for N900.

It features as a GUI to refresh your devices Linux Swap to speed up your VM.

Partition Requirements

Before installation your micro SD card needs setting up with two equally sized linux-swap partitions and one on the device (backup).

If you have not removed the swap partition on your device the later will already be working.

Fragmentation

Swap fragmentation starts to occur, when total number of megabytes written during swap's life time exceed it's maximum size. Until that, swap is written in a sequential manner. Blocks that are no longer needed are marked as free, but never used.

After reaching end of swap space, previously used and freed blocks are rewritten, using new content. This means no longer writing sequentially causing massive slowdowns, to an already sluggish swap; when compared to RAM.

A workaround to this is to disable and enable swap again - linuxswap filesystem content doesn't live through restarts, and once re-enabled, is written sequentially again.

Flopswap does this by switching to a fresh swap space on every "reswap". By doing this it saves moving swap to B and back again, hence "FlopSwap".

Main Swap Partition on Micro SD

Putting the Main Swap space on your microSD saves the device from I/O conflicts between swap and /opt requests. Also flash based devices don't handle simultaneous, autonomous requests very well. Another huge advantage is that it reduces a large amount of wear & tear from the devices non-replaceable flash device, at expense of a cheap and replaceable microSD card.

More

More information on the package can be found ...

talk.maemo.org thread FlopSwap

Package Page

Installation

The latest versions can be found in the devel repository and can be installed using the N900 Application Manager (HAM).

Operation

There are four main actions:-

  • Fresh Swap

This swaps to a fresh SD swap space from either the device or another SD swap.

  • Swap to Device

This moves the swap space to the device so the back cover can be removed.

  • Show Current

Shows currently active swap(s) (cat /proc/swaps)

  • Check Usage

Shows current fresh swap usage percentage via hildon banner and recommends fresh swap at 94% via hildon dialog.

Bugs

Please report bugs to the talk.maemo.org thread page.


FAQ

Question

How do I setup linux-swap?

Answer

The easiest way is to use GParted on a desktop. Then make two equally sized "linux-swap" partitions, 800MB is fine. These partitions should be located after the first FAT partition.

The card will then have a FAT part (partition 1) swap1 (partition 2) and swap2 (partition 3).


Question

Can we make FlopSwap run on a timer?

Answer

Yes, you can call the refresh script from a shell or cron/alarmed

sudo /opt/flopswap/script/swapswitch.sh


Question

What type does the first partition have to be?

Answer

FAT32 is recommended as this type will work on all variations of Maemo. There is no reason why other file systems cannot be used.

Even if an incorrect file type is used this will not effect the operation of FlopSwap. However the card may show as "corrupt" to the device, you therefore cannot use this to store data.

Currently tested first partition types are :-

FAT32, ext2 and ext3

License/Disclaimer

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (Version 2) as published by the Free Software.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

To-Do

<none>

Changelog

0.1.0 (TBA)

  • Big changes to backend, so new version number
  • Change to get swap locations from blkid
  • Change upstart file to use blkid
  • Support for CSSU upstart swap_sd in mount-ops-overwrite
  • General clean up of code

0.0.6 (Current Testing)

  • Fix bug on Settings page stopping upstart file being created.

0.0.5

  • int32 workarounds by peterleinchen
  • Fix issue calculation issue after swapping to device

0.0.4

  • Changed Check Usage to Status
  • Changed scripts to work off swap written not swap used
  • Removed rootsh and sudser from depends list now uses update.sudoers

0.0.3

  • Added Keyboard shortcuts to Q,W,A and S keys.
  • Added Check Swap Usage button.

0.0.2

  • Added optional event.d upstart file (in settings menu)
  • Depends rootsh and sudser due to new event.d file

0.0.1

  • Initial Release

Wiki Update

sixwheeledbeast 22:21, 21 September 2013 (UTC)