Active Topics

 


Reply
Thread Tools
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#1
Latest version: 0.2.1
Hi all.

I present to you - SwapSet. Its hijacked enough other threads, it's long overdue to have one of it's own, and here it is. Anyway, it's been in the devel repo for quite a while, and I haven't created a thread as I wanted some small-scale testing to be done before unleashing it on the masses using devel when they should probably be using extras.

It's basically a few shell scripts that manage your swap partitions for you, along with the compressed ram cache (compcache). It's all fully configurable, so tinker away. It supports multiple EMMC and SD swap partitions, and you can configure priorities for each type of swap (for best results consider installing busybox-power so the swapon command has working priorities support - without this it will prioritise RAM > SD > EMMC, though I will make it order them by your configured priorities without it in a later version).

I have added in preliminary ram defrag support ('swapset defrag') based upon the ideas and excellent work of estel. It does work, ( I would really recommend only using it when you have a decent-sized SD swap partition though), but I have to say that I have experienced during testing the device rarely becoming unhappy and rebooting even when there was sufficient swap and ram available. Eventually once this is resolved I intend it to call this feature periodically when the device is idle for extended periods of time (i.e. overnight) to prevent the fragmentation slowdowns he identified.

Please report bugs to maemo@jamie-thompson.co.uk.

Changelog:
  • (0.2.1)
    • Fixed minor bug in UI
    • Added in sanity checks for usage - Don't disable if remaining swap isn't big enough.
  • (0.2)
    • NOTE: Compcache will be disabled by default (i.e. for users just wanting SD swap). Enable it by editing the settings file /etc/default/swapset. A GUI will be added later.
    • Added settings support using /etc/default/swapset
    • Added in a semaphore to prevent boot loops
    • Added in VM tuning support
    • Added in early manual defrag support
    • Fixed some minor bugs
  • (0.1.1)
    • Tweaking packaging.
  • (0.1)
    • Initial release.
 

The Following 19 Users Say Thank You to mr_jrt For This Useful Post:
Posts: 250 | Thanked: 126 times | Joined on Dec 2010
#2
So this replaces "estelsīs ereswap or are they compatible and can be used toghether?
 
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#3
Originally Posted by guilledoc View Post
So this replaces "estelsīs ereswap or are they compatible and can be used toghether?
I think Estel is correct in this post, the two shouldn't step on each other's toes. Swapset will only execute at startup to mount swap and or if you explicitly call 'swapset mount' (or 'unmount') to manage the SD swap. I don't personally use ereswap, so I can't say for certain that they are fine...I will however install it on my test N900 and see if I can find any problems...I don't expect I will though.

I only really decided to look at fragmentation as I already had most of the functionality of enabling/disabling devices sitting there. Never hurts to have a couple of different ways of achieving the same goals to see if one is better than the other - it will always be optional in swapset so you will be able to use ereswap to manage fragmentation if you so choose.

Last edited by mr_jrt; 2012-08-01 at 14:32.
 

The Following 3 Users Say Thank You to mr_jrt For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#4
Or DIY and make it your own way
As I did "aeons" before

I personally would say, this should be in one package (ereswapset with two maintainers?), but if you leave it open to user decision and it works, it is okay that way.

Do you still use compcache automatically?
Or is it configurable to use? Just curious, do not need it, but for others it *may* cause problems...

Oops, reading helps, sorry.

Last edited by peterleinchen; 2012-08-01 at 15:23.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 250 | Thanked: 126 times | Joined on Dec 2010
#5
Installed both
I see I have now 1.5gb of swap a half in sd and a half in emmc no problems till now and primary swaps seems to be the one in sd also no improvments that I can notice(allready had ereswap and de sd swap enabled
I`ll let you know if something goes wrong
Hope not!!!
Thanks
 
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#6
Originally Posted by peterleinchen View Post
Or DIY and make it your own way
As I did "aeons" before

[...]
peterleinchen,

as a weathered GNU/Linux user, both privately and professionally, i'm familiar with swap on, swap off mkfs.swap & all
only, with a 16GB machine @ home and servers where i gladly hear the sys admins telling that swap in on a SATA3 SSD i never cared to look into Maemo's swap.
would you mind sharing whatever it is you do.
i always despised ereswap since i had to reflash my dev N900 after trying it out (and attribute it to the origin of the package...)
guess a reflash was needed any way so i didn't bother.

just alluding to whatever it is you do is like...
well, you catch my drift here, i hope
__________________
information is a necessary though no sufficient condition to rationality...
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#7
misterc,
I just put together what I found here on TMO and my very old unix knowledge and put some very personally adapted scripts in /etc/event.d. So much tuned to my needs, I did not spit it out to the world. And as there were already packages out ...
One for starting up all my stuff (incl. swap) and one for checking the written data amount of swap (to trigger defragmenting).

So nothing special compared to swapset or ereswap.
I did not take a deeper look into latest versions of both, but assume they are working. So you may go well with these packages.
Or take a look
here
or
here.
anything else you need to know, just post in general swap thread or PM me.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#8
Originally Posted by peterleinchen View Post
misterc,
I just put together what I found here on TMO and my very old unix knowledge and put some very personally adapted scripts in /etc/event.d. So much tuned to my needs, I did not spit it out to the world. And as there were already packages out ...
One for starting up all my stuff (incl. swap) and one for checking the written data amount of swap (to trigger defragmenting).

So nothing special compared to swapset or ereswap.
I did not take a deeper look into latest versions of both, but assume they are working. So you may go well with these packages.
Or take a look
here
or
here.
anything else you need to know, just post in general swap thread or PM me.
peterleinchen,

thank you for the crash intro
i'm switching from t-mob to voda this week-end and my prod N900 is having trouble with battery & hangs itself if i let some calls be ended by the other party
plus, after 2 years, conversation is a drag to open, of course.
so will make a fresh start
wanted to wait 'til i get my Sandisk 64 msxd back (the 1st one wasn't formatted properly ) but i guess the 32GB mcsd c10 will have to do
will see if i get around to write a couple SQLs to archive conversations or just start from scratch (after a full backup).

will report back if a "custom build" swap solution brings advantages compared to swapset ~:-}
hope won't have to bother you
__________________
information is a necessary though no sufficient condition to rationality...
 
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#9
Basically, Swapset was just the scripts I rolled out for myself that I bothered to package up to get some practice doing so ...and I kinda figured someone might find them useful.
 

The Following 3 Users Say Thank You to mr_jrt For This Useful Post:
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#10
Thanks for the great work!
Do I need to change something or even uninstall Swappolube?
SwapSet overides Swappolube settings (and uses vi_)?
 
Reply

Tags
memory, swapfile, swapset


 
Forum Jump


All times are GMT. The time now is 13:46.