Forum.ArchosFans.com
http://forum.archosfans.com/

Is it possible to resize the swap partition?
http://forum.archosfans.com/viewtopic.php?f=76&t=59801
Page 1 of 1

Author:  dougeeebear [ Mon Dec 05, 2011 11:02 pm ]
Post subject:  Is it possible to resize the swap partition?

I have implemented Harfainx's [GUIDE] Change app space with stock ROM (it's awesome, by the way), and now I'm thinking with the limited ram on the Gen8, why wouldn't a similar procedure work for increasing the size of the swap partition?

I've checked the xda-developers forum, and about all I can find is how to set up a swapfile on the sd-card.
Apparently the performance is greatly improved with the swapfile, but I would rather have a larger swap partition.

I'm sure this would work by creating a partition for swap at the same time as creating the increased app space partition (create two partitions).
It would basically involve creating the partition and editing init.rc to point to the new swap partition (I don't know what line to edit for the swap).

This is my thinking, anyway.

Anyone have any thoughts on this?

Author:  jfmcbrayer [ Tue Dec 06, 2011 3:27 pm ]
Post subject:  Re: Is it possible to resize the swap partition?

I think you're right that the process should be similar to resizing the app partition. I haven't looked, but you'll want to look for a 'swapon' line in init.rc, I guess.

I kind of think it might not be worth it, depending on your usage, though. More swap will let you keep more apps open, so you have less of a hit when you switch back to them, but at the cost of slowing everything down, and the occasional near-lockup when everything gets bottlenecked on swap.

Author:  dougeeebear [ Tue Dec 06, 2011 4:31 pm ]
Post subject:  Re: Is it possible to resize the swap partition?

There is this line in init.rc
Code:
on property:persist.sys.archos.swapctl.en=1
exec /system/bin/logwrapper /usr/bin/swap_ctl.sh start

There is this line in /usr/bin/swap_ctl.sh
Code:
LOCAL_SWAP=/dev/block/mmcblk0p3

It may just be a matter of editing the line in swap_ctl.sh to point to /dev/block/mmcblk1p3 (to be determined).

My wife's 101 has a gazillion games on it, and after awhile the launcher will take forever to redraw all the icons.

I've tried this workaround
http://www.launcherpro.com/forum/viewto ... f=6&t=2652
but not much joy.

zeppelinrox's V6 Supercharger
http://forum.xda-developers.com/showthread.php?t=991276
doesn't really appeal to me at this time.

I may just experiment with this on my 43 and see what happens.

I think 512MB swap space should be more than sufficient.

Author:  dougeeebear [ Tue Dec 06, 2011 6:48 pm ]
Post subject:  Re: Is it possible to resize the swap partition?

I added a new swap partition keeping the resized app partition intact, but now I find I'm not allowed to edit or change permissions on /usr/bin/swap_ctl.sh

Also, I wasn't sure if the swap partition should be logical or primary.
I chose logical, which may or may not be correct.

Back to the drawing board.

Author:  jfmcbrayer [ Wed Dec 07, 2011 6:20 pm ]
Post subject:  Re: Is it possible to resize the swap partition?

dougeeebear wrote:
I added a new swap partition keeping the resized app partition intact, but now I find I'm not allowed to edit or change permissions on /usr/bin/swap_ctl.sh


I assume you've tried all the usual methods (copy as root to sdcard, edit, copy back as root), adb pull/edit/push, or edit with vi as root in a terminal? That's strange, because I was able to edit it (added a comment) with vi. Are you using Chulri's +rw root?

dougeeebear wrote:

Also, I wasn't sure if the swap partition should be logical or primary.
I chose logical, which may or may not be correct.


It doesn't matter whether it's logical or primary, though that may affect the naming (numbering) of the device. To be honest, it wouldn't even matter if it were a file; on Linux 2.6 an (unfragmented) swap file is almost exactly the same speed as a swap partition.

Author:  dougeeebear [ Wed Dec 07, 2011 6:35 pm ]
Post subject:  Re: Is it possible to resize the swap partition?

jfmcbrayer wrote:
I assume you've tried all the usual methods (copy as root to sdcard, edit, copy back as root), adb pull/edit/push, or edit with vi as root in a terminal? That's strange, because I was able to edit it (added a comment) with vi. Are you using Chulri's +rw root?

I couldn't edit it with the swap partition created, why I don't know.
I have since redone it back to the way it was and now I can edit it.
And yes, I am using Chulri's +rw root.

Quote:
It doesn't matter whether it's logical or primary
Ok, thanks.

I'll get back to it sometime later.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/