| Prev |   1   2   3     4   12 | Next | Last
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce][Fremantle] FlopSwap - Swap GUI Management (https://talk.maemo.org/showthread.php?t=87985)

mr_pingu 2012-11-23 23:36

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Do I need to have 3 swaps? That part isn't clear to me

I only have them on
/dev/mmcblk0p3 and /dev/mmcblk1p2

Is a third really needed or would this suffice?

peterleinchen 2012-11-23 23:47

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Cannot (yet ;)) answer for his app, but I assume after all the discussions that he is swappingthe swap space from one SD swap to the other SD swap, so that there is only one (exactly one: SD1 -> SD2) swap movement; hereby avoiding one full writing of swap memory, as it was done before (SD->eMMC->SD).
The third (internal) eMMC swap is just left untouched, as long as you have your SD card in. If there is the need for removing it, you may enable that internal swap again, so you have the chance to do this with a running system.

@sixwheelebeast
Please correct me, if I am wrong. Did not yet look into your sources.
But this is how I do it.

One question: do you also check swap usage and allow a automated swap refreshing (e.g. after 90% fill level)?

sixwheeledbeast 2012-11-24 09:37

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by mr_pingu (Post 1297714)
Do I need to have 3 swaps? That part isn't clear to me

I only have them on
/dev/mmcblk0p3 and /dev/mmcblk1p2

Is a third really needed or would this suffice?

@mr_pingu
Yes, exactly as per peterleinchen.
A swap space is required at all three locations in the OP.
This is important as currently there is no way "GUI friendly way" to edit swaps and if you try to swapon to a FAT partition the system will reboot.

I wanted to move away from device swap completely to remove flash wear.
0p3 is only used as a backup (this is used when pressing Unmount).
1p2 and 1p3 flip over (only one swapon/swapoff) everytime you press Fresh Swap.

Also if swap is on 0p3 and you press fresh swap it will automatically swap you to 1p2, but never go back to 0p3 unless you press the Unmount button.

@peterleinchen
Currently no this is only a quicker manual way of editing swaps to save me open terminal all the time. However I do plan to turn it into a more complete swap manager.

Plans
*Put a new upstart file in event.d, this is to push swap to 1p2 or fallback to 0p3.
*Adding an alarm_queue event with selectable time.

If you want to read or edit the back end have a dig in /opt/flopswap

sixwheeledbeast 2012-11-24 21:29

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Bump new version 0.0.2 with very useful "Swap on SD at Boot"

This adds/removes a file called relocateswap to /etc/event.d
If checked this will automatically put swapon /dev/mmcblk1p2 after rcs-late.

Very pleased as this is my first checkBox with code I have done. :)

All information in OP new QRCode too!


Any devs got any ideas how to add an event to the alarm_queue or some way of automatically reswapping?

jukra 2012-11-28 21:41

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
What the swap? No more manual swap defragging as I used to do. :) Excellent! This works like a charm when setup as described in OP.

sixwheeledbeast 2012-11-28 23:22

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by jukra (Post 1299498)
What the swap? No more manual swap defragging as I used to do. :) Excellent! This works like a charm when setup as described in OP.

Glad I have a happy user.

I have a tiny update that I am working on, I have mapped the "QWAS" keys to the buttons in the application.
This works well, however I still want to test it and work on finding a solution for swapping on a timer; before a new release.

peterleinchen 2012-11-28 23:25

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by sixwheeledbeast (Post 1297982)
Any devs got any ideas how to add an event to the alarm_queue or some way of automatically reswapping?

Hey sixwheeler,
just saw your beg.
If it helps you I may send you my script, which checks swap usage cyclically and at a certain border calls a defrag script. I have rewritten it a bit a few months ago, so it may match your needs (you will need some conf files in /tmp/ swapdev, swapsize, swapinuse, which deine the current swap configuration. Done it that way as I have another script checking which swaps to activate according to SD in/out/...).

sixwheeledbeast 2012-12-01 19:57

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
New version released (0.0.3).
Tried the autobuilder to no avail, so get scanning that QRCode. :)

New goodies are:-
*A new button to check swap usage (free | grep Swap)
*Key mappings for the four main buttons on "QWAS" keys.

See OP for full details, happy flopswapping!

peterleinchen 2012-12-01 20:30

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by sixwheeledbeast (Post 1300416)
... Tried the autobuilder to no avail, ...

I do not understand why it works for some and for others not :confused:

Quote:

Originally Posted by sixwheeledbeast (Post 1300416)
A new button to check swap usage (free | grep Swap)

But you can not rely at all on that info for swap defrag!
It just shows the amount of used swap. This will be something from a few MB up to a few 100MB.
But it will not show the already written amount on that swap space. This info can be fetched via iostat (withh bb-power) or more sophisticated with following script (rely on the number of bytes, please):
Code:

#!/bin/sh
disk=mmcblk0p3

blocks=$(awk '{if ($3=="'"$disk"'") print $10}' /proc/diskstats)
echo $blocks blocks
let bytes=$blocks*512
echo $bytes bytes
let kb=$bytes/1024
let mb=$bytes/1024/1024
let gb=$bytes/1024/1024/1024
echo $kb kb, $mb mb, $gb gb


sixwheeledbeast 2012-12-01 20:42

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by peterleinchen (Post 1300423)
But you can not rely at all on that info for swap defrag!
It just shows the amount of used swap. This will be something from a few MB up to a few 100MB.
But it will not show the already written amount on that swap space. This info can be fetched via iostat (withh bb-power) or more sophisticated with following script (rely on the number of bytes, please):

I did realise that but I didn't want to depend on bbpower.
I didn't want to force people to have install dependenices for this to work.
However I like the look of your script (I didn't think of using diskatats) maybe I can re-jig it about to me more useful.


| Prev |   1   2   3     4   12 | Next | Last
All times are GMT. The time now is 11:37.

vBulletin® Version 3.8.8