Editing Ereswap

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
===Partition Requirements===
===Partition Requirements===
-
To work properly, ereswap require existence of 2 swap partitions (on microSD or eMMC, all combinations allowed). For maximum performance of Maemo, using swap on microSD *only* and keeping backup, unused swap on eMMC is recommended - the later can be of default size (768 MB), or anything of 200MB or more (in case someone want to repartition and reclaim space for other partitions).
+
To work properly, ereswap require existence of 2 swap partitions (on microSD or eMMC, all combinations allowed). For maximum performance of Maemo, using swap on microSD *only* and keeping backup, unused swap on eMMC is recommended - the later can be of default size (768 MB), or anything of 100MB or more (in case someone want to repartition and reclaim space for other partitions).
===Fragmentation===
===Fragmentation===
Line 15: Line 15:
ereswap achieve it, by counting - via iostat - number of megabytes saved to swap partition during runtime (*not* current swap usage) and comparing it to adjacent numbers during last reswap (or boot). If it's higher than set value, swap is re-enabled, and user informed via Maemo notification system. In case of failure, the same notification system is used to inform user about step, that created problems. Location of swaps and it's sizes are fully configurable.
ereswap achieve it, by counting - via iostat - number of megabytes saved to swap partition during runtime (*not* current swap usage) and comparing it to adjacent numbers during last reswap (or boot). If it's higher than set value, swap is re-enabled, and user informed via Maemo notification system. In case of failure, the same notification system is used to inform user about step, that created problems. Location of swaps and it's sizes are fully configurable.
-
 
-
===Main Swap Partition on Micro SD===
 
-
Putting the Main Swap space on your microSD saves the device from I/O conflicts between swap and /opt requests.
 
-
Also flash based devices don't handle simultaneous, autonomous requests very well.
 
-
Another huge advantage is that it reduces a large amount of wear & tear from the devices non-replaceable flash device, at expense of a cheap and replaceable microSD card.
 
-
 
-
More information on [[http://wiki.maemo.org/Swap_on_microSD Swap on Micro SD]]
 
-
 
-
''Please note:- Some parts of the Swap on Micro SD wiki are baised towards Easy Debian installation and may not be applicable.''
 
===More===
===More===
Line 42: Line 33:
edit:
edit:
-
  /home/user/.config/ereswap/config
+
  /home/user/.ereswap/config
...providing locations for main swap, it's size, and backup swap.  
...providing locations for main swap, it's size, and backup swap.  
'''Then, run:'''
'''Then, run:'''
-
  /home/user/.config/ereswap/adjust-rcS-late.sh
+
  /home/user/.ereswap/adjust-rcS-late.sh
It will adjust Your "/etc/event.d/rcS-late", to - during boot - enable Your main swap and to reset Mb's-written-to-swap counter. This step must be done only once.
It will adjust Your "/etc/event.d/rcS-late", to - during boot - enable Your main swap and to reset Mb's-written-to-swap counter. This step must be done only once.
'''Now, at any time, invoke:'''
'''Now, at any time, invoke:'''
-
  ereswap
+
  ereswap.sh
-
...from terminal. It will check counter and inform You about amount of data left before hitting swap fragmentation (or any arbitrary value set in config file), or, how many Mb's after it You are. In second case, it will also re-enable swap.
+
...from terminal. It will check counter and inform You about ammount of data left before hitting swap fragmentation (or any arbitrary value set in config file), or, how many Mb's after it You are. In second case, it will also re-enable swap.
'''To re-enable swap at any time, unconditionally, invoke:'''
'''To re-enable swap at any time, unconditionally, invoke:'''
-
  freswap
+
  freswap.sh
...it's useful, if You're close to hit limit, and planning to do memory-hungry stuff.
...it's useful, if You're close to hit limit, and planning to do memory-hungry stuff.
'''If You ever change Your swap's location, just edit config file and invoke:'''
'''If You ever change Your swap's location, just edit config file and invoke:'''
-
  /home/user/.config/ereswap/update-rcS-late.sh
+
  /home/user/.ereswap/update-rcS-late.sh
It will update Your rcS-late with respect to new swap locations and/or size.
It will update Your rcS-late with respect to new swap locations and/or size.
Line 88: Line 79:
'''Q: Something went wrong with my main swap, and backup swap got enabled. Why ereswap doesn't properly count Mb's to hit swap fragmentation?'''
'''Q: Something went wrong with my main swap, and backup swap got enabled. Why ereswap doesn't properly count Mb's to hit swap fragmentation?'''
-
''A: It's by design - written data counter is *always* set to Your main swap. Using backup swap is just a failsafe, and everything is done to make You know about it, the sooner, the better. If You can't fix issue with main swap quickly, yet, you desperately need capabilities to refresh swap, either use freswap, or edit config, and enable Your backup swap as main.''
+
''A: It's by design - written data counter is *always* set to Your main swap. Using backup swap is just a failsafe, and everything is done to make You know about it, the sooner, the better. If You can't fix issue with main swap quickly, yet, you desperately need capabilities to refresh swap, either use freswap.sh, or edit config, and enable Your backup swap as main.''
'''Q: I changed my swap layout, so I wanted to run update-rcS-late.sh, but, by mistake, I've executed adjust-rcS-late.sh, on already patched rcS-late! Is my rcS-late damaged? will I get into bootloop, after reboot?'''
'''Q: I changed my swap layout, so I wanted to run update-rcS-late.sh, but, by mistake, I've executed adjust-rcS-late.sh, on already patched rcS-late! Is my rcS-late damaged? will I get into bootloop, after reboot?'''
Line 98: Line 89:
==License/Disclaimer==
==License/Disclaimer==
-
ereswap is licensed under terms of GPL (latest). It is provided as-is, without any warranty whatsoever. Using it, You're able to modify critical system components, responsible for booting device - doing it all on your risk. You've been warned.
+
ereswap is licensed under terms of GPL. It is provided as-is, without any warranty whatsoever. Using it, You're able to modify critical system components, responsible for booting device - doing it all on your risk. You've been warned.
==Credits==
==Credits==
Line 106: Line 97:
*Huge thanks for merlin1991, DocScrutinizer, Sicelo and everyone else answering my countless questions and providing working code samples on #maemo. Guys, You rox! Also, thanks to merlin1991 (again) and X-Fade, for help with proper packaging.
*Huge thanks for merlin1991, DocScrutinizer, Sicelo and everyone else answering my countless questions and providing working code samples on #maemo. Guys, You rox! Also, thanks to merlin1991 (again) and X-Fade, for help with proper packaging.
*Especially huge thanks for Sc0rpius, for sitting with me for hours and working to fix sed's commands in update/adjust-rcS-late.sh scripts. I would be nowhere, without Your help!
*Especially huge thanks for Sc0rpius, for sitting with me for hours and working to fix sed's commands in update/adjust-rcS-late.sh scripts. I would be nowhere, without Your help!
-
*Thanks to sixwheeledbeast, for creating this wiki page.
 
=Versions/Change Log=
=Versions/Change Log=
-
'''1.2  ''(Current Devel)'''''
+
===0.1 (Initial Release)===
-
* Fix to another issue preventing system from boot ;) (tried to save reswap stat on optfs, before it's mounted...)
+
'''0.1.0'' (Current Devel)'''''
-
* Another try to add busybox-power as dependency
+
-
 
+
-
'''1.1'''
+
-
* Fix for method of validating swap, that could lead to non-bootable device (via faulthy /etc/event.d/rcS-late)
+
-
* Program's folder changed to "/home/user/.config/ereswap/config". Config and rcS-late's adjusters now live there. Changed, due to popular request.
+
-
* Program's executables changed from "ereswap.sh" and "freswap.sh" to "ereswap" and "freswap". Changed, due to popular request.
+
-
* Depends on busybox-power[/list]
+
-
 
+
-
'''1.0'''
+
* Initial Release.
* Initial Release.
=Wiki Update Info=
=Wiki Update Info=
-
:'''''Last Updated - sixwheeledbeast - 28 May 2012 17:47 UTC'''''
+
:'''''Last Updated - sixwheeledbeast - 24 May 2012 20:20 UTC'''''
:''Wiki Created - sixwheeledbeast - 24 May 2012 20:20 UTC''
:''Wiki Created - sixwheeledbeast - 24 May 2012 20:20 UTC''
-
 
-
[[Category:Software]]
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)