maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [DISCUSS] SDCard Swap Partition Methods.. (https://talk.maemo.org/showthread.php?t=84296)

Estel 2012-07-28 00:29

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by peterleinchen (Post 1241398)
I think you are wrong. Only amount of swap data in use, i.e. what conky (cat /proc/swaps) shows, will be moved. So bigger swap parts will help to minimze swap refresh actions, as time until fragmentation starts, will increase.
(did not test yet, but am pretty sure)

Yep. Bigger swaps are for having less PITA with frequent reswaps, as 2GB swap require 2x less often reswaps, that 1GB. Time for actutal process of reswapping doesn't change.

Which may make reswap painfully long, is many programs opened (which eats memory and increase amount of swap used), as more data need to be reswapped. Thus, it's recommended to reswap without any programs opened (or lightweight ones like terminal).

Extreme example of bad idea is reswapping with ED Chromium open, and 10+ tabs with real pages inside. It can take 10 minutes or more to reswap...

/Estel

sixwheeledbeast 2012-11-22 19:51

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Sorry to bump this discussion again, but I am interested what people have settled on lately for swap management?

Personally I am swapping manually as required, mainly because I am not keen on ereswap (where it installs it'self, modifing rcs-late).

misiak 2012-11-22 21:10

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by sixwheeledbeast (Post 1297336)
Sorry to bump this discussion again, but I am interested what people have settled on lately for swap management?

Personally I am swapping manually as required, mainly because I am not keen on ereswap (where it installs it'self, modifing rcs-late).

In addition to that question, i would like to ask if there's software that's available to (all at once in one program):
  • set default swap partition mounted on startup, but with failback default emmc swap (so when i let's say set default swap to sd and either unmount it or screw the card or my card reader brakes, the n900 would be still bootable without changing anything)
  • setting as many swap partitions as desired by user and automatic reswapping in user-specified time intervals in a manner that, when we have let's say 3 swap partitions, the "1" is used at first ("2" and "3" are inactive), then after reswap, the "2" is used ("1" and "3" are inactive) and then after next reswap only "3" is used, and then "1" again - so only one swap partition is used at once
  • possibility to manually reswap to any available swap partition on demand
Is there any program capable of all these three at once? ;) I have ereswap right now, but I also find it to be not what I really want.

sixwheeledbeast 2012-11-22 21:17

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by misiak (Post 1297360)
In addition to that question, i would like to ask if there's software that's available to (all at once in one program)

Nope not that I know of.
If there is a demand I may take another look at making a swap GUI application.

I can understand switching swaps between position 1 and 2 (this is the way I would design my swap app,), but why 3.

This is the other reason I am not keen on ereswap you swapon and swapoff twice for no reason at each reswap.

misiak 2012-11-22 21:28

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by sixwheeledbeast (Post 1297361)
Nope not that I know of.
If there is a demand I may take another look at making a swap GUI application.

I can understand switching swaps between position 1 and 2 (this is the way I would design my swap app,), but why 3.

This is the other reason I am not keen on ereswap you swapon and swapoff twice for no reason at each reswap.

Thanks for your answer. It's not a demand, it was just a question ;) If I find time, I might as well code it myself (but lack of time is a killer of my maemo projects)...

3 swap partitions was just an example, 2 would be sufficient (one of emmc and one on microsd), but it wouldn't take much effort to make the number unlimited, which may be usefull in some use cases (e.g. someone might have two swap partitions on sd card in order to not use emmc swap at all, but keeps the emmc partition for ability to take the back cover off without rebooting device).

sixwheeledbeast 2012-11-22 21:35

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by misiak (Post 1297363)
someone might have two swap partitions on sd card in order to not use emmc swap at all, but keeps the emmc partition for ability to take the back cover off without rebooting device

Yep. I understand the need for a micro sd eject feature, that puts swap back on 0p3. I would just treat this as a backup myself.

When I say "demand" I mean if it is needed.

misiak 2012-11-22 22:12

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by sixwheeledbeast (Post 1297365)
Yep. I understand the need for a micro sd eject feature, that puts swap back on 0p3. I would just treat this as a backup myself.

When I say "demand" I mean if it is needed.

Ok, I understand that. My personal preference for it would be a systemui applet (that's the one that opens after pressing power button, right?) or hildon-home-menu applet (that's the one that opens after clicking on the area with time in the top left, right?) which displays on the button current state of swap (which swap is used, when was last reswap) and, after clicking on it, opens dialog with options to:
1. add/remove swap partitions (no need to automatically detect i guess? that would be too much to ask for;) ) and ability to set the default one selected upon startup and fallback one used when default one is not available during startup
2. set the interval (timer or maybe time of day to do this - maybe alarmd can be used?) when reswaps should be done and between which partitions added in point 1 and in which order (or disabling automatic reswapping)
3. ability to manually reswap to any partition added in point 1

That would be perfect for me... system-ui applet or hildon-home-menu applet, because it would be easily accessible from whole system...

Edit: ok, forget th system-ui or hildon-home-menu ideas, maybe a control panel applet would be best, as it is a good place for setting this and maybe there's no need to put more garbage into other places (after all, setting reswap intervals or manual reswapping shouldn't be done that often, so no need for easy access). However, I would hate to have it as a normal application visible on application list.

sixwheeledbeast 2012-11-22 23:06

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by misiak (Post 1297372)
However, I would hate to have it as a normal application visible on application list.

Why? Seems counter intuitive to go to settings for a reswap, IMO

mr_pingu 2012-11-22 23:12

Re: [DISCUSS] SDCard Swap Partition Methods..
 
PowerMenu seems best place, IMO. In settings belong things you set once (or twice) and never llok at it any further. While settings of the particular swap-parameters could find a nice place in settings.

Would love to have a reswap button in my powerMenu. Right now I am using ereswap + alarmd to do reswap every night.

misiak 2012-11-22 23:13

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by sixwheeledbeast (Post 1297386)
Why? Seems counter intuitive to go to settings for a reswap, IMO

If someone wants to reswap manually, then yes, I agree - system-ui or hildon-home-menu might be better... But I was thinking about more automatic application, where manual reswapping would be just additional option which would need to be performed rather rarely (e.g. when taking the back cover off or when really in need of "clean and tidy" ram for ram-hungry applications like something from easy debian). But that's just my vision which i'm sharing with you.

Edit: Like mr_pingu wrote, set this once and forget it's there untill really needed ;)

Edit 2: Or, maybe split it - in config panel, the setup of swap partitions and automatic reswapping schedule and in power menu just option to stop automatic reswapping and performing a manual reswap. What do you think?


All times are GMT. The time now is 12:16.

vBulletin® Version 3.8.8