Notices


Reply
Thread Tools
Posts: 1,163 | Thanked: 1,873 times | Joined on Feb 2011 @ The Netherlands
#11
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?
__________________
N900 loaded with:
CSSU-T (Thumb)
720p recording,
Pierogi, Lanterne, Cooktimer, Frogatto
N9 16GB loaded with:
Kernel-Plus
--
[TCPdump & libpcap | ngrep]
--
donate
 

The Following User Says Thank You to mr_pingu For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#12
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)?
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#13
Originally Posted by mr_pingu View Post
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
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 5 Users Say Thank You to sixwheeledbeast For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#14
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?
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.

Last edited by sixwheeledbeast; 2012-11-24 at 21:35. Reason: typo
 

The Following 6 Users Say Thank You to sixwheeledbeast For This Useful Post:
jukra's Avatar
Posts: 22 | Thanked: 54 times | Joined on Aug 2010 @ Kajaani, Finland
#15
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.
__________________
BioPower - my entry for Maemo Coding Competition 2012.
 

The Following User Says Thank You to jukra For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#16
Originally Posted by jukra View Post
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.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#17
Originally Posted by sixwheeledbeast View Post
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/...).
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 3 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#18
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!
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#19
Originally Posted by sixwheeledbeast View Post
... Tried the autobuilder to no avail, ...
I do not understand why it works for some and for others not

Originally Posted by sixwheeledbeast View Post
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
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#20
Originally Posted by peterleinchen View Post
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.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 07:21.