I would like to know if there is a consensus on the perfect partitons amounts and sizes. I have read that people are adding a third partititon for swapper. Does swapper even know to use this partition and if so how big should it be? Also I have an 8 gig class 6 that is set with a 3 gig fat32 and a 5 gig ext3. Is this set right or should I have less on the fat32?
i run 500 megs ext2 and the rest fat32 barley even touch filling my ext2 partition yet
WAAAAY too much on the EXT3. You really only need 1gb on the EXT3 partition because apps don't take up any space.
As for swapper I'm not really sure how big the partition needs to be, but swapper automatically locates the partition.
Thanks for the response. I am resizing and going with 500 mb for ext3 and 500 mb for the linux swap, although that is probably too much.
For SWAP use 32MB, setting it higher will put you into problems.
Related
Can't see that this has been asked already so I'll go ahead and be prepared to be flamed/ignored...
With apps2sd we don't seem to fill up our internal storage anymore so is it just being wasted? Would it have any benefit to use a bit of it for a swap file rather than have that going to the sdcard. I'm working on the assumption that the internal storage is faster than a class 6 but I may be wrong.
This is how we did it before everyone had swap partitions.. You can use a swap file on the internal memory but its slightly less efficient than a dedicated swap partition. There's really very little difference tbh.. Having the swap partition is just neater.
goldenarmZ said:
This is how we did it before everyone had swap partitions.. You can use a swap file on the internal memory but its slightly less efficient than a dedicated swap partition. There's really very little difference tbh.. Having the swap partition is just neater.
Click to expand...
Click to collapse
I see. Thanks for the reply. I find swap really bogs things down after a few days so I guess I'll continue to just use compcache (and wait for the desire to be released)
I did a search but couldn't find anything specific... so my question is, should I upgrade my ext3 to ext4? if so why? if not.. also why
gmelchert said:
I did a search but couldn't find anything specific... so my question is, should I upgrade my ext3 to ext4? if so why? if not.. also why
Click to expand...
Click to collapse
No. Most (all?) of the new 2.1 test build leak based ROMs do no support a2sd on ext4. On (most of) these same builds ext3 works automatically.
danknee said:
No. Most (all?) of the new 2.1 test build leak based ROMs do no support a2sd on ext4. On these same builds ext3 works automatically.
Click to expand...
Click to collapse
thanks thats good to know!
I know most of you are not Linux users so let me break this down for you:
EXT2: Very basic filesystem when it comes down to it -- think of it as a Unix filesystem you could place inbetween the likes of FAT32 and NTFS. I would nearly argue that this is the modern equivalent of FAT32 (which really really needs to die). We really shouldn't be using FAT32 but lack of native windows compatibility stops EXT2 from being a candidate for this usage.
EXT2 is highly recommended for your flash card. It won't over stress it and there aren't many alternatives that are better these days unless you're dealing with raw flash, which you'd then use something like YAFFS2 or JFFS2. The flash in compact flash cards is not raw flash.
EXT3: Picture EXT2 with a journal. It is backwards compatible with EXT2 (just doesn't read the journal).
A journal is NOT recommended for flash devices. (At least when the filesystem was not designed for raw flash and isn't tuned properly like YAFFS2 and JFFS2). Do you really want your phone to write all the metadata to the journal first and then to the filesystem? That's a ton of unnecessary I/O. If it has full journaling enabled you're writing all your data twice. This is not a good idea for your phone. This is one reason why NTFS has not become a standard for flash devices: Journals on flash are bad unless it's designed for flash from the ground up.
EXT4: same as EXT3 but is a copy-on-write FS with delayed allocation (holds data in memory longer before writing to disk to be more efficient / prevent fragmentation), increased number of files and size of files (more than a phone ever could need in our lifetime), etc. Some improvements across the board but not backwards compatible with EXT3 anymore if you're using the delayed allocation. Most likely to eat more memory on your phone.
This is completely unnecessary for a phone and really does not fit your needs. I don't understand why anyone would attempt to use this unless they simply thought "4 is bigger than 2 or 3 so it must be better!"
So there you have it. I may have forgotten a minor detail here or there, but this is the gist of it.
feld said:
I know most of you are not Linux users so let me break this down for you:
EXT2: Very basic filesystem when it comes down to it -- think of it as a Unix filesystem you could place inbetween the likes of FAT32 and NTFS. I would nearly argue that this is the modern equivalent of FAT32 (which really really needs to die). We really shouldn't be using FAT32 but lack of native windows compatibility stops EXT2 from being a candidate for this usage.
EXT2 is highly recommended for your flash card. It won't over stress it and there aren't many alternatives that are better these days unless you're dealing with raw flash, which you'd then use something like YAFFS2 or JFFS2. The flash in compact flash cards is not raw flash.
EXT3: Picture EXT2 with a journal. It is backwards compatible with EXT2 (just doesn't read the journal).
A journal is NOT recommended for flash devices. Do you really want your phone to write all the metadata to the journal first and then to the filesystem? That's a ton of unnecessary I/O. If it has full journaling enabled you're writing all your data twice. This is not a good idea for your phone. This is one reason why NTFS has not become a standard for flash devices.
EXT4: same as EXT3 but includes is a copy-on-write FS with delayed allocation (holds data in memory longer before writing to disk to be more efficient / prevent fragmentation), increased number of files and size of files (more than a phone ever could need in our lifetime), etc. Some improvements across the board but not backwards compatible with EXT3 anymore if you're using the delayed allocation.
This is completely unnecessary for a phone and really does not fit your needs. I don't understand why anyone would attempt to use this unless they simply thought "4 is bigger than 2 or 3 so it must be better!"
So there you have it. I may have forgotten a minor detail here or there, but this is the gist of it.
Click to expand...
Click to collapse
Nice explanation.
You left out the part about how apps load faster from RAM then they do from any sd card. The people running slower sd cards especially may potentially be experiencing a performance decrease due to a2sd.
I have abandoned a2sd because after I load every app that I use, (plus 10 random ones) I still have room left. Then I use the extra half a gig on my sd card for another 5 cds worth of music.
feld said:
I know most of you are not Linux users so let me break this down for you:
EXT2: Very basic filesystem when it comes down to it -- think of it as a Unix filesystem you could place inbetween the likes of FAT32 and NTFS. I would nearly argue that this is the modern equivalent of FAT32 (which really really needs to die). We really shouldn't be using FAT32 but lack of native windows compatibility stops EXT2 from being a candidate for this usage.
EXT2 is highly recommended for your flash card. It won't over stress it and there aren't many alternatives that are better these days unless you're dealing with raw flash, which you'd then use something like YAFFS2 or JFFS2. The flash in compact flash cards is not raw flash.
EXT3: Picture EXT2 with a journal. It is backwards compatible with EXT2 (just doesn't read the journal).
A journal is NOT recommended for flash devices. (At least when the filesystem was not designed for raw flash and isn't tuned properly like YAFFS2 and JFFS2). Do you really want your phone to write all the metadata to the journal first and then to the filesystem? That's a ton of unnecessary I/O. If it has full journaling enabled you're writing all your data twice. This is not a good idea for your phone. This is one reason why NTFS has not become a standard for flash devices: Journals on flash are bad unless it's designed for flash from the ground up.
EXT4: same as EXT3 but is a copy-on-write FS with delayed allocation (holds data in memory longer before writing to disk to be more efficient / prevent fragmentation), increased number of files and size of files (more than a phone ever could need in our lifetime), etc. Some improvements across the board but not backwards compatible with EXT3 anymore if you're using the delayed allocation. Most likely to eat more memory on your phone.
This is completely unnecessary for a phone and really does not fit your needs. I don't understand why anyone would attempt to use this unless they simply thought "4 is bigger than 2 or 3 so it must be better!"
So there you have it. I may have forgotten a minor detail here or there, but this is the gist of it.
Click to expand...
Click to collapse
I had never thought about this before. It makes a good point, flash memory dies after x ammount of Reads and Writes. Given it's mostly in the 100 millions, but it does more reading and writing than you would think it does, and you are effectivly killing the memory card twice as fast.
Good thing these things are relativly cheap.
this is all really good to know. thanks. i spent $100 on my sd card so maybe i should just foemat the whole thing to fat32.. (its class 10) while you guys are here, what exactly is the use of swap?
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
gmelchert said:
this is all really good to know. thanks. i spent $100 on my sd card so maybe i should just foemat the whole thing to fat32.. (its class 10) while you guys are here, what exactly is the use of swap?
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
SWAP = Page file in the Linux world. From what I have read (This may have changed since then) We don't have the ability to use Swap yet.
danknee said:
You left out the part about how apps load faster from RAM then they do from any sd card. The people running slower sd cards especially may potentially be experiencing a performance decrease due to a2sd.
Click to expand...
Click to collapse
You're right -- apps do load faster from RAM. However, when you're not using a2sd the applications are not on the phone in "RAM". They're in a flash chip inside the phone -- just like on your sd card. The performance should be nearly the same when you're using a2sd as it is when you're not using it.
The only reasons why a2sd should be slower are:
1) You have a cheap, slow SD card
2) The interface from the SD card to the phone is cheap and slower than the internal flash chip's interface. It was just a cheap design choice the manufacturer made.
3) The internal flash is simply faster from it being a better flash chip
feld is right. Using anything other than ext2 for the apps2sd partition boggles the mind. I have no idea why people insist on a: providing support for it and b: encouraging people to do it.
Ok, provide support for it for the people who know what they're doing/just want to do it for the hell of it, but having a journalled filesystem on an sd card makes no sense whatsoever.
As feld says ext4 uses up more RAM than ext2, which might be all well and good for things like the N1/Evo/Desire etc but not everyone has such a RAM beefy phone.
Besides that, the bottle neck in speed is the SD card/controller. No "faster filesystem" is going to improve that. Adding more IO is only going to slow things down.
Moved as not Android Development.
Hello
I have spent sometime going through some past articles on partitioning. There are still questions in my mind. I hope someone could help me clear up this.
I gather it's good to have an external partition where it is used to store apps and cache. It is stated that optimal size for it is abut 512mb - 1G as ext3/4.
Is there in fact reason to stop me from converting the whole SD to ext3/4 and get rid of fat32 altogether? I am linux based and I really don't care much about visibility of files at all. It seems that the current ROM works with 2 partitions: one fat32 and the other as ext3/4 and we typically allot a lot more for fat32. What's the primary reason behind this decision? Would there be some system stuffs that rely on fat32 to function?
As far as sizing is concerned, I would like to have some real reasons why things have to be arranged this way (with fat32 as a dominant partner) instead of going all the way to ext4
Even if You will format Your sd-card using Your phone You will see, that it will be FAT partition as well. So it's basic partition which android use to save photos, movies and all apps keep their data folders (f.ex. sms backups, apps backups etc). Ext partition is also not recognized by PC with Windows, so there isn't any way to use it as a storage device. And I think that similar is with android - I don't think if f.ex. music player will recognize Your music files on ext partition. But it's just my opinion and I may be wrog.
Just simply question guys,but I confuse about this
*swap enable/using swap partition
*using ext partition over moving apps2SD normally
Is this could be better than normal/standard SDCard?
I have Transcend 16GB Class 10 using fat32+ext4 (using link2sd)
But I felt not different with my VGen Class4 8GB
Please guys if you have experience about this,,tell whats wrong n what were I missed for
Thanks
Sent from my Spice Mi-410 using Tapatalk 2
Arya_3RDNumber said:
Just simply question guys,but I confuse about this
*swap enable/using swap partition
*using ext partition over moving apps2SD normally
Is this could be better than normal/standard SDCard?
I have Transcend 16GB Class 10 using fat32+ext4 (using link2sd)
But I felt not different with my VGen Class4 8GB
Please guys if you have experience about this,,tell whats wrong n what were I missed for
Thanks
Sent from my Spice Mi-410 using Tapatalk 2
Click to expand...
Click to collapse
I'll try to answer base from what I know....
"*swap enable/using swap partition"
About this, we have to know what is swap, swap type and do we need it?
swap is the another partition which will be used as an extra memory. As we know, memory is been accessed VERY OFTEN in a process, both read and write.
On linux PC commonly we use one partition on disk drive for linux swap. On windows it's using a file as a virtual memory.
Swap is needed when the application need large memory to be used for a process and the current ram is not enough. Well there are some priority list to be followed. Ok, I'll give an example if we run a big game in an android. we have ~350MB total user memory but let say we have 50MB free memory. Most of android BIG 3D games will not exceed 300MB of memory, the game designer will look to target phone which will run it, and they presume all user don't have swap memory. But let say the app will need about 300MB of memory to run.
1. If we have 50 MB swap partition in sdcard
Android will never deplete the real ram, so let say it will keep 10MB of free ram, it will be use for the android system rom to keep running. In this situation the app will take 40MB of free ram, 50MB of swap... and what about another 210MB? Android will take it from the real ram by kill another apps (based on priority of low memory killer setting) to reallocate the ram. So for the game, the real ram will be taken about 250MB and 50MB from swap and free ram about 10MB. another 90MB of real ram used by the system and another hidden app like framework setting, messaging and others and for app cache. About 250MB ram used by game app is accessed very fast, but 50MB of swap if very slow because of access speed of sdcard is very much slower then ram.
When exiting from the game, some hidden apps still in memory. Android will run one or two another residen apps.
2. If we have 50 MB swap zram
Zram is swap partition in real ram, not sdcard. Any data written to the zram is compressed and decompressed on the fly. For 50MB zram, let say we can get about 80MB swap because of compression. the ratio depend on data been compressed.
Just like said in point 1, android will keep 10MB of free ram for the android system rom to keep running. The app will take 40MB of free ram, 80MB of swap. The real ram is 350MB - 50MB(zram) = 300MB, 290MB will be available for apps. The app will take 80MB from zram, and use 220MB from real ram. So 290 - 220 = 70MB of ram will used by android system and for app cache.
About speed of game between those 2 swap type, zram will be faster for sure because it use ram rather then sdcard. And one thing I feel necessary to let you know. Not as in PC which using HDD as storage which almost has unlimited write cycle. But we use SDCARD which has very limited write cycle. So consider using swap partition in your sdcard, even if it has very fast write/read speed. It will significantly affect your sdcard life.
When exited from the game, few hidden app still reside in memory. Android will run few another residen apps.
3. If we not use any swap
The game will take 300MB of ram, and let 40MB of ram used by android system. More apps have to be killed by android low memory killer system.
When exited from the game, only one or two hidden app still reside in memory. Android will run some more another residen apps.
It's your decision to use swap or not. The need is depend on your behave of use of this phone and the types of apps installed, such as more widgets, tools and some residen apps. Try every option, and you will get the result. The result could be different with another user, depend on behave and the apps installed.
*using ext partition over moving apps2SD normally
If you really have your internal storage depleted, let say you have installed hundreds of apps, then yes you will need app2SD or ext partition on sdcard.
The read and write speed of internal storage and sdcard will definitely win by internal storage (You have class 10 of sdcard? just test the write speed of internal storage).
ext partition is access directly while app2SD using 3rd app, so using ext partition should be faster then app2SD.
Just 1.5 cents....
Do you understand what I've talked about???? Well.... I don't!!!
I'm a noob and it cracks my skull. Great explanation though:good:
wow??!! great explanation agan master
well I understand very much after read 1000times
Thanks a lot gan,,I must little experiment to realize
Now I understand what is "ZRAM" (sorry I really noobie )
about all this case,,is ZIPALIGN also complicate?
Well... actually my explanation hasn't completed yet. I was mentioned about priority, I didn't explained it. It about low memory killer configuration and also the priority of using swap. You can Google that .
About zipalign, it related with apk files. It intended to make it faster to load. Apk file is a compressed file. But I don't have any further knowledge regarding this. May be someone can explain it.
Sent from my bike using Tapatalk 2
Can anyone help me find, what is actually swap space means??
Swap space is a reserved space on a harddrive that acts as a "extended" RAM. When the RAM memory is full the kernel move stuff from the RAM memory to the Swap partition to free up memory. The data is later stored in the Swap until it's needed again.
The same thing or similar at least on a Windows pc is pagefile.
There are some discussions if swap files should be used or not on flash based storage devices since it increase the read/write cycles to the storage device and there by would break it faster (since flash based storage devices have a maximum of read/write cycles).
lintz said:
Swap space is a reserved space on a harddrive that acts as a "extended" RAM. When the RAM memory is full the kernel move stuff from the RAM memory to the Swap partition to free up memory. The data is later stored in the Swap until it's needed again.
The same thing or similar at least on a Windows pc is pagefile.
There are some discussions if swap files should be used or not on flash based storage devices since it increase the read/write cycles to the storage device and there by would break it faster (since flash based storage devices have a maximum of read/write cycles).
Click to expand...
Click to collapse
wow..thats a good piece of information.thanks mate +1
W/O swap
When low memory occurs kernel kill processes
With Swap
Kernel move those about to be killed process to swap space and then map them pointer with RAM so when you open that app instead of allocating new memory to psycial RAM its been read from Swap and loaded to RAM.
As mentioned many times creating swap file and/or swap partition to flash drive aka our phone memory(internal storage) is not a wise choice cause recursive read and write can damage that nodes in longer run as flash memory has limited read/write cycles.
Other choice is to make swapfile and/or partition to external mmc but as external mmmc has which could also damage mmc in longer run but it could be replaced cheap rather than internal flash memory. Issue arises with external c swapfile and/or partition is slower read and write which could degrade performance
So one for-all if swap is needed than CompCache/Zram is a wise choice which uses physical reserved RAM portion for swap. Which uses extemsive CPU to compress data and write them to swap and retrive them by decompressing and writing back to physical RAM. Which is not harmful but can use more battery and obviously its faster than swap on external mmc. Usually its faster in the beginning and slight laggy after more hours and days usage
Sent from my LG-P990 using Tapatalk 2
spica1234 said:
W/O swap
When low memory occurs kernel kill processes
With Swap
Kernel move those about to be killed process to swap space and then map them pointer with RAM so when you open that app instead of allocating new memory to psycial RAM its been read from Swap and loaded to RAM.
As mentioned many times creating swap file and/or swap partition to flash drive aka our phone memory(internal storage) is not a wise choice cause recursive read and write can damage that nodes in longer run as flash memory has limited read/write cycles.
Other choice is to make swapfile and/or partition to external mmc but as external mmmc has which could also damage mmc in longer run but it could be replaced cheap rather than internal flash memory. Issue arises with external c swapfile and/or partition is slower read and write which could degrade performance
So one for-all if swap is needed than CompCache/Zram is a wise choice which uses physical reserved RAM portion for swap. Which uses extemsive CPU to compress data and write them to swap and retrive them by decompressing and writing back to physical RAM. Which is not harmful but can use more battery and obviously its faster than swap on external mmc. Usually its faster in the beginning and slight laggy after more hours and days usage
Sent from my LG-P990 using Tapatalk 2
Click to expand...
Click to collapse
yh...this is actually what Iam looking for..thank you Spica it helped me a lot...So which is more harm less? swapfile,ZRam or CompCache?
basimsherif3 said:
yh...this is actually what Iam looking for..thank you Spica it helped me a lot...So which is more harm less? swapfile,ZRam or CompCache?
Click to expand...
Click to collapse
Compcache or zram which is fastest amongst swap
Sent from my LG-P990 using Tapatalk 2
So in cm7, if compcache/zram is disabled, will it use swap?
aldyu said:
So in cm7, if compcache/zram is disabled, will it use swap?
Click to expand...
Click to collapse
No untill and unless you have created swapfile and/or partition with an init.d startup script
Sent from my LG-P990 using Tapatalk 2