![]() |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
I'm getting really tired of the whole educate-yourself mentality. I mean, really, if it was that achievable, wouldn't you see more users doing what's needed? Anyway, off to Samsung SGS3, wanted to contribute for one last time.. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Amount of written bytes should be ok, although You may want to use 700 MB instead of 768 - to reswap it before fragmentation hit You, not after.
BTW, I'm currently working on providing solution to reswap and few other things to repositories. /Estel |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
This is the root of the problem I've seen in my own country and countless others around the planet. Why put for the effort to learn anything at all. Better to go buy something where all the thinking and learning was done for you, so you can simply click a button and it does one thing you want (while losing the ability to 50 other things you may want to do but don't even consider an option). Tired of the "whole educate-yourself mentality"? I'm tired of the mentality that you shouldn't have to think at all for yourself. Or that education is bad or damaging in some way. Our political process just had a slew of would-be leaders bad-mouthing college education, claiming it leads to "liberal thinking" and other "evils". (This despite every one of them being a college graduate.) Btw: Whining is not a contribution. Remaining uneducated is not a contribution. Encouraging others to remain uneducated is not a contribution. Good luck with your SGS3. Enjoy your locked-in garden-fenced device if you can. But please don't insist that the rest of us live in the little kept zoo cell you call home. |
Re: [DISCUSS] SDCard Swap Partition Methods..
For starters you might want to read the wiki article about repartitioning of the emmc http://wiki.maemo.org/Repartitioning_the_flash . Although it was written for increased space in optfs, the technique of partitioning, editing system files is essential to get space for an external swap partition.
Try to digest this content, google for some more info, or ask specific questions here in the forum, may be in a separate thread. I am sure, you will get help along the way. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
BUT: I do not get it all! What is your thinking here? Quote:
Quote:
Quote:
@Bert Have fun with your malicious code running dumb "smart phone". |
Re: [DISCUSS] SDCard Swap Partition Methods..
So, ok, I was out of line and I'm sorry for upsetting you guys. I had a small laugh when I was reading the comments; I can remember countless occasions where I responded in quite the same fashion. :rolleyes:
The thing I was pointing at - and I didn't get across - was that, in order for all of this coding magic, skill and effort to help create a workable user experience for the regular user (noobs, in other words), it would really help out if best practices where to be gathered and to be put into safe-to-use packages. I think Swappolube and CSSU are key examples of this, and the thing I wanted to discuss is how we could get to such a thing. So, really, I was trying to help out. The point that upset me, is the short and oh-so-elite answer: 'well, this thing here does that, go enjoy' while, at that point, this didn't seem to meet the thing I was trying to contribute to/achieve. -- short offtopic thing on education and mentality: I'm a Mechanical Engineer, trying to work on a sustainable energy future. I'm involved in political organisations, do some volunteer work, active member of our local Church and I'm this guy really keen on discussing Linux and open-source at birthday parties. So I think you guys would actually, you know, like me, but that's something you sometimes just can't get across in these internet discussions.. So, back to the topic. I would like to create a guide for getting swap-to-microSD to work, achievable for the average user, of which I am a prime example. I'm starting from a Windows 7 environment, the wiki on repartitioning, swapset and will try to create this. TL;DR: apologies, and I'll try to create this guide myself. |
Re: [DISCUSS] SDCard Swap Partition Methods..
And you should have all the answers almost already in here.
If you still have questions, we will help you. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Read throught the sources for SwapSet and it's a great tool - was actually disappointed to find out I already had SwapSet installed, and thus I was already enjoying compcache on every start of the device ..
So, I'm trying to use Windows 7 or the N900 to do the repartitioning of the microSD. I have not been able to find a guide doing this, and I'm hoping to offer a solution without going the LiveCD->Gparted route. So, I'm trying to do this on the N900 using a script. That script could possibly be incorporated in SwapSet, and on installation or update the user could be requested whether or not the user wanted to use the micro-SD for this. I'm thinking something like: {PSEUDO-CODE ALERT} Code:
If not swap_found_on_SD Next topic, about unmounting the Swap partition before the whole microSD gets unmounted - what's the best route here? I was thinking either use dbus or any other event thing to unmount the swap and re-prioritize the swap, or to alter the behaviour so that the swap doesn't get unmounted. This last solution would require loads of big-text red lines screaming not to release the microSD before turning off the device. However, there's mixed reports on this issue, as sulu pointed out that the partition does not get unmounted when the cover is taken off. Anybody? |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
I guess, but I cannot confirm, that when pulling out the cover any mounted partition (perhaps even only VFAT, but I don't know) gets unmounted, but that's all. Swap is by definition not a mounted partition, so nothing happens. Obviously, if you do pull the CARD with swap on it you get an instant crash. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Hm, strange. I would say I remember people saying that they've tried removing cover with swap on microSD and seeing instant crash... Well, either they've lied, or there is inconsistency between device's behavior.
/Estel |
Re: [DISCUSS] SDCard Swap Partition Methods..
As promised, I've uploaded tool to fight swap fragmentation to extras-devel (in fact, doing more than that). For more info and/or discussion about it, see:
http://talk.maemo.org/showthread.php?t=84413 /Estel |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Even I may use lazy umount to make the partition unreadable to N900, I do not get USB mass mode available. So I need modified osso-mmc-umount (removing loop devices) to get the partition really accesible and mass storage mode available. So I assumed same as reinob, that removing back cover will also work. BUT, indeed I do get an instant crash. :( So, Estel, here is one occurance. Maybe I do need the magnet glued? But hey, I do know not to do so ;) (and I will never throw it to the floor, so the back cover will spring open) |
Re: [DISCUSS] SDCard Swap Partition Methods..
@peterleinchen,
Well you can't have everything in this world. There no way you can possibly allow a PC exclusive access to a partition while the N900 uses a chunk of that partition as memory. So either you use SSH/NFS/CIFS/whatever or you create a separate partition for swap. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
;) No serious, it is absolutely clear. Thanks for reply anyway. But I just wanted to test it. And there are posts about people able to mount simultaneosly (mostly using ubuntu?). I just wanted to check wether this mass-storage-not-possible possibly also made my back cover removing stable. But: no. For my HW the SD gets completely disabled, it seems. And for SD unmounting I already have a script. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Maybe just vfast partitions are cut-off? It seems, that people using native linux partition on SD and/or any ext, doesn't get it unmounted during cover removal.
as for glueing magnet, I'm using this for ages and haven't noticed any regressions. I'm just able to take cover out at any time, which suit me, as I've glued a cut-off part of microSD box (this one with small holder for SD) and I hold backup microSD inside cover. /Estel |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Thanks |
Re: [DISCUSS] SDCard Swap Partition Methods..
Unfortunately not. |The workings of Systemui.xml is completely undocumented.
However if you study the code of tablet/phone mode button you will see it is entirely possible to run scripts/dbus calls directly from systemui.xml. Also you can relay the status of things with icons etc as per a file, again see tablet/phone mode button. BIG FAT WARNING!! If you screw up systemui.xml your N900 WILL become unbootable until you undo whatever you messed up. This can be done with backupmenu/rescue OS/rescue console. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
I'm seriously getting tired of a lot of Maemo-crap that happens to be loaded in our loved N900s. Thanks to @Estel I have my third N900 which I'm basically r4aping by removing lots of preinstalled stuff and cleaninng up the boot process a bit. I will see if I can completely get rid of ke-recv and related GNOMEish-Windows-ish-user-is-too-dumb-to-do-this-by-himself stuff. My aim is to make a minimal Maemo (I might even remove hildon desktop) which I can then "easily" move to the eMMC (and use U-boot to boot it) and then pack everything in a flashable image. Anyway, next step is ke-recv. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
|
Re: [DISCUSS] SDCard Swap Partition Methods..
Would there be any benefits in having 2 swap spaces on Micro SD?
Leaving the standard swap space as backup (for no card inserted). Maybe use cron to Swap between the SD Swaps at night? Getting a 64GB card soon and going to partition it up to get stuff off the phones memory (mainly Music and Docs). Looking for best way to partition off and sizes. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
If you don't need these additional 768MB on your emmc it doesn't hurt to keep the stock swap partition anyway. Changing between swap partitions via a cron essentially does what Estel's ereswap does if you set it up to automatically switch the partition, so it has the same pros and cons: pro: You get a "fresh" swap every morning. con: Each copy of the swap contents means another writing process on a fairly limited amount of flash cells, eventually decreasing the cell's lifetime. But I don't think that's an issue unless you intend to keep your N900 for a decade or so. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Now I'm working on making a version of KP50 with many modules built-in so that it can boot via U-boot without needing an initrd or anything from the NAND chip. That'll take some time though.. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
If there both on the SD, I only have to switch between the swaps (swap2 on, swap1 off) compared to a full reswap (swap2 on, swap1 off, swap1 on then swap2 off). On my 64Gb card I am thinking 2x 800Mb swap spaces, 5Gb Document partition and whatever's left for a Music partition. Can anybody see any issues I may come across with this? With music on the card I am hoping for smooth multi tasking while playing music under heavy load. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
|
Re: [DISCUSS] SDCard Swap Partition Methods..
Music (read-only) and documents (small files, very few writes) shouldn't cause much trouble if they are on the SD card with the swap partition. Of course there may still be conflicts but the device should be able to handle them.
I have swap and (mostly) music on my SD card and almost never experience any hickups. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Quote:
I can test the different methods and check for conflicts. Starting with ideal for less N900 wear and adjust until happy. Time will tell. Are there any recommendations for Swappolube settings with swap on uSD or will it depend on the card? |
Re: [DISCUSS] SDCard Swap Partition Methods..
Well my 64GB card arrived and so far so good.
No issues with lag and the system feels snapier at the moment. I made two swaps of 800mb (1p2 and 1p3) and the rest FAT32 (1p1). To start swap on MMC I created a file in event.d etc/event.d/relocateswap Code:
description "Micro SD Swap Location on Startup" Also I have added three QBW to view current swaps and swap between swap spaces. Check Swaps Code:
cat /proc/swaps | awk '/dev/ {print $1}' I am hoping when I have time to turn this into one script that can be run from cron or QBW etc. Ideally something like: if swap = 1p2 then swap on 1p3, swap off 1p2 if swap =1p3 then swap on 1p2, swap off 1p3 if swap = 0p3 then swap on 1p2, swap off 0p3 with some way of knowing if it's failed or not possible. I would just use ereswap but that would defeat the object of lowering flash wear by only swapping one way. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Hee, that's a nice looping swap. Not just wear, this also should shorten the swapoff/on refresh slowness a fair bit since this ring moves the swap one way.
|
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
/Estel |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Quote:
My idea of having two swaps on microSD is so they can be used equally. With ereswap IINM you can only have a primary and a temporary swap space. I wish to have two swaps which I can "flip/flop" to. The benefit's are quicker swap refresh and reduced, equal cell usage. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
If you enable another flop location and disbable the flip location, all data will be moved from flip to flop. Enabling both swaps with same priority does not make sense. Nad enable them with different priority even less, as only higher priority will be used (except you reach 800MB swap usage, very unlikely). Only advantage I see is fully omitting swap space (wear) on eMMC. |
Re: [DISCUSS] SDCard Swap Partition Methods..
With ereswap you have 2 swap partitions, one on eMMC for backup and one on the SD card for main usage. When ereswap refresh the swap it put on the backup, put off the main and then backwards, put on the main, and put of the backup. These are 4 steps and 2 data movings, using backup swap for the transition.
If you would have 3 swap partitions you would have eMMC one for backup (only if you haven't the SD card or it's broken), and two in the SD card to alternate. When you want to refresh you just put on the swap2 and put off the swap1, and thats all. (Next swap refresh you will put off swap2 and put on swap1). Backup eMMC swap is never used (saving of damage his cells and damaging SD ones) and you only need 2 steps and one data moving. And 2 swap partitions share the damage to sd cells. I prefer the second method and I will try to modify ereswap to use it. I hope Estel likes the modification and integrates it in ereswap. Maybe could be make an option to use one or two swap partitions on SD Card, as user wants. |
Re: [DISCUSS] SDCard Swap Partition Methods..
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? |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
I was not aware of second moving back, as I just have my SD swap as higher priority and only disf/enable it. So all data is moved once to eMMC and then read /forgotten from there and all new swap is located again on SD. Maybe not the best approach, but for me it works nicely. But two swaps on SD is also good approach to save eMMC wear. Maybe I add another swap file ... |
Re: [DISCUSS] SDCard Swap Partition Methods..
2 Attachment(s)
Quote:
I could do with a little help with the scripts I am making to complete the rest of my idea in post 67. Using some of the source of ereswap I have two scripts one for Swapping and one for Switching to Internal (to eject SD safely) but I can't work out how to get the current swaps and use them in the script. Bit new to the more involved scripting. If they work it would be possible to make a small app or be incorporated with ereswap somehow. |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Sorry no time to look in your scripts, but cat /proc/swaps should give you info what swap is enabled... |
Re: [DISCUSS] SDCard Swap Partition Methods..
Quote:
Using Code:
cat /proc/swaps | awk '/dev/ {print $1}' |
Re: [DISCUSS] SDCard Swap Partition Methods..
You want output to store in a variable?
Normally I use version c Code:
cat /proc/swaps | awk '/dev/ {print $1}' |
Re: [DISCUSS] SDCard Swap Partition Methods..
@peterleinchen So when you put off SD swap, all data there is moved to eMMC swap, and afterwards when you put on SD swap, old data is on eMMC one and new data is writed to SD one.
I see a problem: eMMC will be used to have the old data after the refresh, and while your programs need that old data to be readed and loaded in RAM, you will be using some of the eMMC, so your mobile will be a bit slower (remember we use swap on SD for never using eMMC for swap and at the same time data from /home or /MyDocs (in eMMC too), soo we get less stress in eMMC). It's not a big problem, but well, would be better if you only use SD always. |
Re: [DISCUSS] SDCard Swap Partition Methods..
This toggles between SD/eMMC:
Code:
#!/bin/sh Code:
#!/bin/sh |
All times are GMT. The time now is 05:00. |
vBulletin® Version 3.8.8