Notices


Reply
Thread Tools
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#81
Originally Posted by bipinbn View Post
The microSD card must be split into at least 2 partitions. The first one should be FAT32 (vfat) formatted and the second one must be formatted for linux swap (type 82) and about 384 MB in size

Thats the reason I made a swap partion of ~400MB. Was my understanding wrong ?
That wiki was made for Installing Easy Debian and has been hijacked and changed etc...

I do agree it's confusing.

Also IIRC with the latest updates to the kernel in testing it's going to be less important to have swap last.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#82
Originally Posted by bipinbn View Post
I think we need to update the wiki then:

http://wiki.maemo.org/Swap_on_microSD#Ereswap

I read the below there:

The microSD card must be split into at least 2 partitions. The first one should be FAT32 (vfat) formatted and the second one must be formatted for linux swap (type 82) and about 384 MB in size

Thats the reason I made a swap partion of ~400MB. Was my understanding wrong ?
The 384 MB recommendation is not for Ereswap, as I understand it. Ereswap is just pointed on that page as a possible solution for swap fragmentation. But The page describes a situation when you have:
  • 768 MB of internal storage (eMMC) swap
  • 384 MB of external storage (microSD) swap
active AT THE SAME TIME (concurrently) and system can use them both (I guess it can make swapping faster, as it reads/writes to two flash memories instead of one, but that's just a guess). Ereswap, however, uses only ONE SWAP PARTITION AT TIME and uses the second one only for reswapping (it moves all data from primary swap to secondary swap and back again to reduce fragmentation). Do you understand it a bit more now?
 

The Following 2 Users Say Thank You to misiak For This Useful Post:
Posts: 92 | Thanked: 95 times | Joined on Feb 2010 @ Smyrna, Atlanta / Bangalore, India
#83
Thanks for your answers and help guys, I had a few more questions

@peterleinchen
How can i accompish this " And the best will be to have two SD swaps (freeing eMMC from swap completely). "

Should i create two swap partitions on my microsd and make the changes in config file to point to these locations. I am not clear on this

@sixwheeledbeast
Also IIRC with the latest updates to the kernel in testing it's going to be less important to have swap last.

What does it mean. With the latest kernel power we don't need this swap on micro sd. The only reason i am chasing on this is I encouter huge lags due to swap filling up after two days of usage

@all
I see that when I pull the back cover out the mobile restarts since its basically is like unmounting the ram. Is there any workound for this, like shift back the swapping to emmc and then
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#84
I've mentioned it before, so just a reminder - using both eMMC swap and microSd swap *at the same time* is pointless, as performance gain is only theoretical. Google for "usb flash raid" or "pendrive raid" to have some fun reading, about why so

In N900 case, it's even worse, as swapping on eMMC create I/O conflicts with writes to /home and /opt (which is in eMMC, too). Flash isn't best at handling simultaneous writes to different partitions on same physical device. Result is, that having *both* eMMC flash and microSD flash active - no matter if with same priority, or microSD with higher priority - results in considerable performance drop, and possibility of watchdog reboots on heavy I/O load.

/Estel

// Edit

Originally Posted by bipinbn View Post
Should i create two swap partitions on my microsd and make the changes in config file to point to these locations. I am not clear on this
Yea, it's just about using both main and backup swap on microSD. No swap on eMMC at all.

Originally Posted by bipinbn View Post
I see that when I pull the back cover out the mobile restarts since its basically is like unmounting the ram. Is there any workound for this, like shift back the swapping to emmc and then
One workaround is to move swap into eMMC, temporally, then, remove backcover, and move it back into microSd after putting backcover back. It can be accomplished by some shell scripts (that would handle safely unmounting vfat on microSD, too).

Hoever, there is another method, prefered by me - glue'ing small magnet in approriate place of N900 body, where sensor is located. It's trivial, doesn't even require disassembling on N900, and works like charm - it's "do it and forget" solution. I'm using it for a loooong time, and never encountered any problems, + I can remove backcover whenever I want.

Of course, it would be very, very bad, if You would be stupid enough to remove microSD card from slot, without disabling swap on it and unmounting it (although, what Maemo does, when You remove backcover, is almost the same) - but, we assume some sanity of user

/Estel

// edit 2

Best source of small magnet is cheap pair of earpiece headphones, small ones, even the 0.50$ Chinese type. After tearing it apart, You will see small neodymium magnet - best one. you can cut it freely, getting very small part, that won't cause problems with attaching backcover. Just glue it with good glue, and You're good to go.
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2012-09-25 at 23:34.
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#85
@bipinbn

I think Estel covered everything.

I use my linux desktop and GParted to make:-
1x FAT Partition (blk1p1) 2x Linux Swap Partitions (blk1p2 and 1p3)

You can then change the swap spaces in config file.

As regard my comment, the reason that FAT should be the first partition is because the device shows the card as corrupt if (blk1p1) isn't FAT.
However with the testing update that are coming through this will no longer be required.

As for the back cover issue you can do as Estel (magnet method)l or swap off the card back to EMMC, this was the purpose of one of the scripts on the page mentioned before. Ereswap ATM doesn't provide a solution to this.

Edit:-

Also check out Swappolube it will help with laggy swap issues.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.

Last edited by sixwheeledbeast; 2012-09-26 at 18:24.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#86
Originally Posted by mr_pingu View Post
Seems to working fine, however got one minor issue/bug

Code:
~/.ereswap $ sudo gainroot
Root shell enabled


BusyBox v1.20.0 (Debian 1.20.0power1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user/.ereswap # ereswap.sh
cat: can't open 'reswap.stat': No such file or directory
Not needed, we have  735  MB left.
/home/user/.ereswap #
However, it functions very nice judging from conky
It happened to me too.
It just needed a reboot. After that I got the normal message of "Not needed, we have ...".
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#87
@Estel: I found a bug.

1. Mistakenly used update-rcS-late.sh
2. Used adjust-rcS-late.sh
3. Black screen without any dots appears, system refuses to boot. Reverting to swapon -a fixes.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Reply

Tags
ereswap, fragmentation, microsd, swappiness, swaps


 
Forum Jump


All times are GMT. The time now is 05:17.