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)

malkavian 2012-07-12 23:26

Re: [DISCUSS] SDCard Swap Partition Methods..
 
2 Attachment(s)
@sixwheeledbeast

This is not javascript, you can't simple equal a function to a variable.

Here you have your scripts corrected and improved I think. If you don't understand something of the code, just ask ;)

Edited to upload a corrected scripts. swapswitch.sh had some stupid errors, I let spaces in assignations between "new" variable the equal and the value. swapswitchejectsd.sh some stupid too but long to explain.

impeham 2012-07-13 09:19

Re: [DISCUSS] SDCard Swap Partition Methods..
 
I just increased the SD's swap size to 1.5GB instead of just 768MB in order to increase the time needed between reswap operations.
should probably be much better this way.

Estel 2012-07-13 15:49

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Using both swaps on microSD card with backup swap on eMMC (for being able to boot, if microSD refuses to work) is very good. It should be quite easy, to implement it in ereswap - although, for 2 next weeks, I have very limited time for investigating it. Any input - like patches or even improved ereswap - highly appreciated. It would be great, to allow - tuneable by configuration - usage of any variant, no matter of partition layout (2 swaps, 3 swaps, eMMC, microSD...)

BTW, I agree that flip/flop on microSD only is slightly faster and saves eMMC from wear, but it doesn't affect SD card wear&tear - wear leveling is implemented on hardware level of microSD card, so it doesn't matter - for that case - if 1 or 1 partition is used on microSD (flip could be used all the time, with flop being idle, and wear would be exactly same as with flip and flop used one after another).

/Estel

sixwheeledbeast 2012-07-13 18:41

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

Originally Posted by malkavian (Post 1236822)
@sixwheeledbeast

This is not javascript, you can't simple equal a function to a variable.

Here you have your scripts corrected and improved I think. If you don't understand something of the code, just ask ;)

I knew there was something wrong, although I am fairly new to writing scripts.
Saying that I got my version working too after seeing peter and vi_'s posts.

I have started a "talk wiki" page with my latest scripts (IMHO easier than taring them up)

In my version I had to move the position of swap0 in the logic part of the script as it was unnessacarily swapping from 0 to 1 then 2

The idea is to move the information to the Main page when complete.

@malkavian I don't understand the need for the RANDOM part of your script?

http://wiki.maemo.org/Talk:Swap_on_microSD

OMOIKANE 2012-07-13 19:52

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

Originally Posted by OMOIKANE (Post 1236701)
I have N900 with swap on sd card partition. Swap on emmc is disabled.
And i have a problem with some osso applications. RSS, for example, after returning from microb, refreshing to main window, contacts refreshing to top of list after call. Both programs showing "<app name> - resuming" on the top. With emmc swap enabled glitch disappears. What to do?

Anyone? Tell me the truth)

peterleinchen 2012-07-13 20:03

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

Originally Posted by impeham (Post 1236938)
I just increased the SD's swap size to 1.5GB instead of just 768MB in order to increase the time needed between reswap operations.
should probably be much better this way.

Yep, good idea. As filling up this much space takes longer until fragmentation starts, the need for swap refreshing will also take longer. And this minimizes the wear (each time you change swap location, all data -of currently used swap size- is moved).
Will increase my swap file also (as I fill it up once/twice a day during heavy usage).


Quote:

Originally Posted by Estel (Post 1237065)
Using both swaps on microSD card with backup swap on eMMC (for being able to boot, if microSD refuses to work) is very good.

Agree.

Quote:

BTW, I agree that flip/flop on microSD only is slightly faster and saves eMMC from wear, but it doesn't affect SD card wear&tear - wear leveling is implemented on hardware level of microSD card, so it doesn't matter - for that case - if 1 or 1 partition is used on microSD (flip could be used all the time, with flop being idle, and wear would be exactly same as with flip and flop used one after another).
/Estel
Right.
But to minize wear to the maximum:
what about not disabling flip location, but enabling flop location with higher priority?
This will lead to flip still used (only read of old data) and all new swap on flop. Or/and vice versa. This way we do not have the need to move the currently used swap data.

Maybe I do not increase, but create second swap ....

peterleinchen 2012-07-13 20:08

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

Originally Posted by OMOIKANE (Post 1237152)
Originally Posted by OMOIKANE

I have N900 with swap on sd card partition. Swap on emmc is disabled.
And i have a problem with some osso applications. RSS, for example, after returning from microb, refreshing to main window, contacts refreshing to top of list after call. Both programs showing "<app name> - resuming" on the top. With emmc swap enabled glitch disappears. What to do?


Anyone? Tell me the truth)

I do not have the truth for you, just assumption, that disabling eMMC swap for some N900s leads to unpredictable behaviour.
Please see my posts in compcache/ramzwap thread.

Estel 2012-07-13 20:58

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

Originally Posted by peterleinchen (Post 1237158)
But to minize wear to the maximum:
what about not disabling flip location, but enabling flop location with higher priority?
This will lead to flip still used (only read of old data) and all new swap on flop. Or/and vice versa. This way we do not have the need to move the currently used swap data.

Maybe I do not increase, but create second swap ....

But, without moving swap data and physically turning one down, it doesn't get un-fragmented, so when swap 2 also hit the limit, changing priority to higher for swap 1 won't help in fighting fragmentation...

So, it works only, until both swaps hit the limit. But, maybe after giving higher priority for swap 2, we could wait some time, and then quickly disable and re-enable (with still lower priority) swap 1, so it will be ready for taking higher priority again? Due to sitting with lower priority for some time, it should contain low amount of data for read, anyway.

/Estel

peterleinchen 2012-07-13 21:21

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

Originally Posted by Estel (Post 1237186)
But, without moving swap data and physically turning one down, it doesn't get un-fragmented, so when swap 2 also hit the limit, changing priority to higher for swap 1 won't help in fighting fragmentation...

Yes, you are right. Did not consider that we do need the dis-/enable game to defragment.
But ...

Quote:

So, it works only, until both swaps hit the limit. But, maybe after giving higher priority for swap 2, we could wait some time, and then quickly disable and re-enable (with still lower priority) swap 1, so it will be ready for taking higher priority again? Due to sitting with lower priority for some time, it should contain low amount of data for read, anyway.
/Estel
... this could be good solution!

malkavian 2012-07-13 22:08

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

Originally Posted by Estel (Post 1237065)
Any input - like patches or even improved ereswap - highly appreciated. It would be great, to allow - tuneable by configuration - usage of any variant, no matter of partition layout (2 swaps, 3 swaps, eMMC, microSD...)

Ok, I suppose I will have time to try it :)

Quote:

Originally Posted by Estel (Post 1237065)
it doesn't affect SD card wear&tear - wear leveling is implemented on hardware level of microSD card, so it doesn't matter

All SD cards have wear leveling? Mine is a old 2Gb SD from my old Nokia N81.

Quote:

Originally Posted by sixwheeledbeast (Post 1237127)
@malkavian I don't understand the need for the RANDOM part of your script?

You (or we) wanted to share the damage to each swap partition on SD card so when it changes from backup swap to another, it doesn't use always the same partition, uses RANDOM to equally distribute the use. If, as said by Estel wear leveling is implemented, then it's not needed at all.

Quote:

Originally Posted by sixwheeledbeast (Post 1237127)

Great!

Quote:

Originally Posted by Estel (Post 1237186)
maybe after giving higher priority for swap 2, we could wait some time, and then quickly disable and re-enable (with still lower priority) swap 1, so it will be ready for taking higher priority again? Due to sitting with lower priority for some time, it should contain low amount of data for read, anyway.

Great solution... ops, more work to do XDDD. The time to wait might be big, to move the less possible data. We don't have "at" command in N900, so maybe a cron could be created and autoremoved, because an "sleep" command would be lose if you reboot the phone.

peterleinchen 2012-07-13 22:30

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Just wait until current swap usage reaches its limit (with some safety margin, e.g. 10% of swap).So start dis-/enabling just shortly before switching.
And do it with lesser nice, like
'nice -20 switchswap.sh'

Estel 2012-07-13 22:45

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Worth checking in practice - if dis/ena/-bling, at this point, would be very quickly, it could be done in background, automatically, without user's intervention at all.

OTOH, I've talked with ShadowJK on IRC about that, and he mentioned, that having fragmented swap with lower priority (as when enabling 2nd swap with higher priority, without disabling 1st one), won't work well, as due to flawed implementation, there are still writes occurring on lower-priority (=fragmented) swap:

http://mg.pov.lt/maemo-irclog/%23mae...07-13T23:50:36

/Estel

sixwheeledbeast 2012-07-13 22:45

Re: [DISCUSS] SDCard Swap Partition Methods..
 
OK your RANDOM part makes sense now, probably not required tho.

Quote:

Originally Posted by malkavian (Post 1237203)
Great!

What do you think of my version of scripts on the wiki page?
Do they work for everyone?

Quote:

Originally Posted by malkavian (Post 1237203)
Great solution... ops, more work to do XDDD.

On that note anybody looking for more work to do check out this.
I started a GUI for ereswap but it got well out of my league.
Feel free to take the reigns on the project.

peterleinchen 2012-07-13 23:15

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

Originally Posted by Estel (Post 1237217)
...
that having fragmented swap with lower priority (as when enabling 2nd swap with higher priority, without disabling 1st one), won't work well, as due to flawed implementation, there are still writes occurring on lower-priority (=fragmented) swap:
...

Yes, true about small amount of writing to low-priority swap, but really small amount.
And, this swap is not yet fragmented, as we start switchswap about 10% (or similar) before maximum reached.
Then it should work flawlessly.

I did not have any negative effects with my setup (main swap on SD with eMMC always on with lower priority; dis-/reenabling SD swap after 700MB written).

malkavian 2012-07-14 13:26

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

Originally Posted by sixwheeledbeast (Post 1237218)
What do you think of my version of scripts on the wiki page?
Do they work for everyone?

Well, scripts look nice, but maybe "sudo" won't work for everybody. Mines must be used as root.

Quote:

Originally Posted by sixwheeledbeast (Post 1237218)
I started a GUI for ereswap but it got well out of my league.
Feel free to take the reigns on the project.

Out of my league too :S.

malkavian 2012-07-14 13:36

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

Originally Posted by Estel (Post 1237217)
due to flawed implementation, there are still writes occurring on lower-priority (=fragmented) swap:

Ummm, and I am thinking that there isn't a command to modify swap priorities without disabling and re-enabling it. Altought the lower priority possible is 0 and the higher 32767, so we would have long time to increase priorities XD. We'd be able to to 32767 swap refreshings before having problems.

sixwheeledbeast 2012-07-14 15:10

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

Originally Posted by malkavian (Post 1237427)
Well, scripts look nice, but maybe "sudo" won't work for everybody. Mines must be used as root.

I was thinking this I have sudser installed. I suppose the better way is to remove the sudo part of the script and call the script with
Code:

run-standalone.sh /home/user/.myscript/swapswitch.sh | sudo gainroot
Edit--

I am certain I have seen some script that is
"if not root - sudo me"

Android_808 2012-07-15 08:20

Re: [DISCUSS] SDCard Swap Partition Methods..
 
i've seen several posts here regarding problems with swap implementation and multiple swap locations/files. are there any patches from meego/mainline we could backport to help?

peterleinchen 2012-07-15 20:28

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

Originally Posted by malkavian (Post 1237430)
Ummm, and I am thinking that there isn't a command to modify swap priorities without disabling and re-enabling it.

Unfortunately yes. But for real defragmenting you still need to dis-/reenable the swap location.

Quote:

Originally Posted by sixwheeledbeast (Post 1237450)
I am certain I have seen some script that is
"if not root - sudo me"

Sure there is. Here, for your convenience ;)
Code:

#!/bin/sh
# executing a shell script given as parameter(s) as root

if [ `id -u` != 0 ] ; then
      exec sudo gainroot <<EOF
exec sh $0 $*
EOF
      exit $?
fi

# own shell code from here


l4m3rx 2012-07-16 17:40

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Hey guys, I got intrested in the swap switching idea that you have and i'm currently testing it (thou without the scripts, I prefer doing it manualy 'till i'm in testing phase) ..anyway I have few suggestion:

1. As you already said, it needs GUI ... not that i'm really good at GUI programming ...i kind of hate writing GUI stuff, but i'll try to find some free time to help out with that.
2. Adding the possability of automatic reswaping.
3. Don't edit startup scripts! It's a bad idea.... it think it will be better if you add the (or switch to) second swap at a later stage (maybe after Xstart with sleep for $user_defined seconds before X an then doing it) This way you'll only add dbus scripts.
4. Some changes in the scripts..... first one shoud only check if it is time to do the reswaping, and call the seconds one (if needed). The second one will do the actual reswaping. (not sure but I think that currently both scripts can do some of the same stuff, correct me if i'm wrong.... i'm to lazy to check it out right now)
5. About the automatic reswaping... one way to go is to start a script after phone is locked, sleep for 3-4-5 minutes (this can be user defined too) then check if the load is below some value (for example 0.5) and start reswaping if it is time. if the load is grater -> loop on the sleep and check again. Ofc kill the script on phone unlock.


Anyway those are just my thoughts on the matter, tell me what you think and (if any) with what can I help :)

sixwheeledbeast 2012-07-16 18:14

Re: [DISCUSS] SDCard Swap Partition Methods..
 
True a GUI would be good that's why I started one, but it needs a lot of work.

Automatic Re-swapping can cause problems if your in the middle of something.

My method has a separate event.d file (which I personally prefer over editing rcS-late)

The two scripts you mention in your method are the same as Ereswap (currently in devel) wiki.maemo.org/Ereswap

My method has one script to switch swap (automatically forcing onto uSD if not already)
The other script is to switch to internal swap so the uSD/back cover can be removed.
If you have Swap on uSD removing the back cover will (in the words of vi_) insta-unmount your swap, which is like pulling a RAM stick out of a desktop. My script is useful for if I need to get in the back while powered up.

IIRC (from something I read on TMO) the swapon/swapoff is better done with the N900 unlocked.

OMOIKANE 2012-07-17 12:36

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

Originally Posted by peterleinchen (Post 1237164)
I do not have the truth for you, just assumption, that disabling eMMC swap for some N900s leads to unpredictable behaviour.
Please see my posts in compcache/ramzwap thread.

Thanks. But glitch is disappears after setting 768 mb swap partition on SD.
Was 384.

peterleinchen 2012-07-17 21:04

Re: [DISCUSS] SDCard Swap Partition Methods..
 
But there is no reason for "glitch" to disappear :confused:
I have atm another SD card with real partition and my glitch appeared again once, but only once. It is a class 2 card, whereas the other was/is a class4.
So totally confusing...

misiak 2012-07-18 06:40

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

Originally Posted by OMOIKANE (Post 1238696)
Thanks. But glitch is disappears after setting 768 mb swap partition on SD.
Was 384.

Quote:

Originally Posted by peterleinchen (Post 1238966)
But there is no reason for "glitch" to disappear :confused:
I have atm another SD card with real partition and my glitch appeared again once, but only once. It is a class 2 card, whereas the other was/is a class4.
So totally confusing...

Fremantle was designed to run with 1 gb ram, if OMOIKANE had 384 swap, it was 640mb alltogether, I think this was the case (as changing it back to 768 = 1gb alltogether) made it work again.

OMOIKANE 2012-07-18 07:33

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

Originally Posted by peterleinchen (Post 1238966)
But there is no reason for "glitch" to disappear :confused:
I have atm another SD card with real partition and my glitch appeared again once, but only once. It is a class 2 card, whereas the other was/is a class4.
So totally confusing...

I dunno why but 384 and 512 linux-swaps leads to that glitch - "appname-resuming" on top and reloading the page.
My sdcard is class 10.
Also I can open (with 384 mb swap) 8-9 pages only in microb. After that system tells me about "pause and low memory". But conky shows about 100 mb of swap usage.

sixwheeledbeast 2012-07-18 17:15

Re: [DISCUSS] SDCard Swap Partition Methods..
 
It's seems silly to make your swap smaller than the standard 768mb.

I would be using between 3-4 times RAM amount upto 4GB swap, then on larger desktops over 4GB, 1:1 ratio is usually more than enough.

Too much and too little will only cause problems.

Estel 2012-07-20 11:41

Re: [DISCUSS] SDCard Swap Partition Methods..
 
This is known glitch - 600 or more swap is sufficient for having everything working OK, but no less.

Of course, using 1.5GB swap (or more) makes it *much* more comfortable, as times between required reswaps increase considerably.

BTW, I've just grasped real SanDisk class 4 microSD 32GB (for 17 USD :D), so I'm going to exploit big swaps very soon ;)

/Estel

peterleinchen 2012-07-20 20:31

Re: [DISCUSS] SDCard Swap Partition Methods..
 
ORLY?

Did not know that, thanks. Some more info/link to that?

But it does not explain my SGX-alike UI-total-freezes, as I always had 768 MB on SD. And these freezes just came up when I had my eMMC swap fully disabled. Now I again have it online with lesser priority and everything is fine again (yippie).
Code:

~# cat /proc/swaps
Filename                                Type                Size        Used        Priority
/dev/mmcblk0p3                          partition        786424        12680        -1
/dev/mmcblk1p3                          partition        786424        261084        2


sixwheeledbeast 2012-07-22 19:12

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

Originally Posted by peterleinchen (Post 1237913)
Sure there is. Here, for your convenience ;)
Code:

if [ `id -u` != 0 ] ; then
      exec sudo gainroot <<EOF
exec sh $0 $*
EOF
      exit $?
fi


Thanks had to make a small change to get it working tho.

Code:

if [ `id -u` != 0 ] ; then
      exec | sudo gainroot <<EOF
exec sh $0 $*
EOF
      exit $?
fi

Updated my scripts on the discussion page
Although this "gainroot" script seems to make the banner repeat twice on the eject sd script, not sure how to fix.

I don't think large swaps have a benefit.
When fragmentation occurs, swapoff will take forever.

peterleinchen 2012-07-22 21:55

Re: [DISCUSS] SDCard Swap Partition Methods..
 
@sixwheeledbeast

Did not yet check your scripts completely, but for the multiple banner I do have explanation:
please check out last line of my template
Code:

#!/bin/sh
# executing a shell script given as parameter(s) as root

if [ `id -u` != 0 ] ; then
      exec sudo gainroot <<EOF
exec sh $0 $*
EOF
      exit $?
fi

# own shell code from here

You have to type your code below that line, as this will detect if you already have root privileges or not and call the script again with su privileges. so everything above that will be executed twice.

And for need to change the code by you. I never had the need as i always followed the above rule. So change back, put everything below and test again.

About
Quote:

I don't think large swaps have a benefit.
When fragmentation occurs, swapoff will take forever.
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)

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 04:56.

vBulletin® Version 3.8.8