Swap Partition When Using Apps2sd - Hero, G2 Touch General

Hey guys,
I am planning to format my sdcard to fat32/ext_ partitions for use of apps2sd. I have a few questions I would like answered first though.
-Is a swap partition required? I have little space on my sd and would rather not use one. If it is required, what size/file system would you suggest? I take it there is no invisible swap partition by default?
-Ext 2, 3 or 4 for my apps2sd partition?
- I am planning to make my apps2sd partition only about 200mb, will that work well?
Thanks.

- swap: depending on rom, but in general: no
- i would recommend ext2, you can use 3 or 4 as well. keep in mind that ext4 doesn't work on any 2.1 rom until we have the kernel sources (after official release).
- it will work, the size only determines how many apps you can install there. average size of an app is ~1mb, though can go from a few kb to several mb (i.e. copilot.apk has 14mb).

Thanks a lot Any particular advantage of ext2 over ext3?

tbman1996 said:
Thanks a lot Any particular advantage of ext2 over ext3?
Click to expand...
Click to collapse
Ext3 and ext4 wear out your sdcard quicker, because of journaling features.
Since, compared to a system or cache partition, the sdcard is not written to as much, and system crashes where the mobile is shut down during a write operation are rare for Android, journaling doesn't offer any significant advantage. The unnecessary journaling however, accounts for extra writes to the flash memory chips, which in turn equals extra wear.
http://en.wikipedia.org/wiki/Ext2 said:
ext2 is still the filesystem of choice for flash-based storage media (such as SD cards, SSDs, and USB flash drives) since its lack of a journal minimizes the number of writes and flash devices have only a limited number of write cycles.
Click to expand...
Click to collapse

Related

Partitioning the SD

Can someone please educate me on partitioning the sd? Based on what I've read and my discussions with others, ext swap is for cache, fat32 is for apps, and the remainder is for usb storage???
I have a 8 GB class 6 (supposed to be faster) Samsung sd partioned at ext swap - 0 and fat 32 - 500.
If I'm right about ext swap (please correct me if I'm wrong), I could make my phone faster if I allocated some sd space to it??? One forum I read said that the phone is usually faster but it could have been referring to a different phone and a slower card.
If I did decide to change my partition what affects would it have (wipe sd, reinstall custom rom, etc)?
Thanks for any feedback!
Partitioning the SD card allows you to utilize a2sd/app2sd and/or swap space on your SD card - if the ROM in question supports it.
Note that the ext and swap partitions are separate things, not one and the same thing.
swap is for swap - set it to 0 (you will never need it)
ext{2|3} is for the A2SD/APPS2SD space for storing applications (and dalvik-cache for some ROMs) - 512 MB will be more than you ever need.
the rest is the VFAT partition - the MS-DOS partition you see from your Windoze box when you mount it from the PC.
Note also that partitioning your card destroys all data on it - make a backup if you decide to partition.
Neither A2SD nor having swap space will speed your phone up. (Adding swap - for ROMs which support it - will actually slow your phone down, except certain pathological cases, unless you become an expert on the process trimmer configuration and experiment with swappiness controls. The reason this happens is because the as-configured process trimmer kicks in too late if you merely add swap and do not reconfigure the trimmer).
My recommendation? Keep your life simple and avoid both A2SD and especially use of a swap area on the SD card, until such a time as you "need it". You might find a practical need for A2SD if you are going to be trying out a whole bunch of new ROMs as they come out, or you are an app hoarder and run out of space in /data.
Probably you will never need to use a swap partition on your card.
Again, in neither case will you notice a perceptible gain in "performance" of the phone.
bftb0
PS Josh. Please stop putting usage questions in the Development forum. Please. Put them in the General forum.
Thanks for clearing that up......and i will stop posting in development.

[Q] NAND + 512 LEO + DesireHD + Data on Ext3/4

Hey all, I'm having a bit of a dilemma and hoping some of you can help me
So - with the introduction of NAND, we are finally able to run Android similar to a native device. Great!
I've dabbled with a large number of ROM's now and settled(ish) on a basic Desire ROM which I have to say, runs absolutely perfectly.
However, I'm missing some of the features from the DesireHD SD card days and I see there are various builds. I tried a squashedfs build and found that it was far more laggy than the unsquashed Desire build I use now.
I've just noticed that there are number of newer builds using an EXT partition on the SD card to store the apps while the ROM itself sits in the NAND.
But is it worth it is my question? Running all the apps off an SD card, surely is akin to just running the whole system from SD? Also, what's the difference between EXT3 and EXT4? I've seen a ROM which advise to use EXT3 while the other suggests 4.
Finally, if the apps run from a partition, does that mean USB Mass Storage connection is out of the question?
Phew. Thanks
NAND is suppose to have a faster read, than write when compared to SD.
NAND and SD has about 100,000 P/E cycles. SD is cheaper to replace than phone, but by the time you get to that many write cycles, your phone is an antique.
You can still use SD card when in USB Mass Storage mode. You will only see the FAT32 partition in Windows. Unless you use a 3rd party program for usb mass storage mode.
ext4
ext3
Comparison of all file systems
There isn't that much difference in ext4 and ext3, especially on a phone. ext2 is probably faster than ext3, but it doesn't have journaling, so, the data is more likely to corrupt when device is not properly turned off.
LiFE1688 said:
There isn't that much difference in ext4 and ext3, especially on a phone. ext2 is probably faster than ext3, but it doesn't have journaling, so, the data is more likely to corrupt when device is not properly turned off.
Click to expand...
Click to collapse
So in fact, if I use a DesireHD CWK Rom with the Apps stuck in EXT4 lets say, it won't be a massively notable difference to say just a Desire CWK Rom on NAND because the OS is still on NAND and it's just the apps that aren't. Furthermore, once they are in the RAM, it makes little difference anyway, right?
There is a difference in ext4 and ext3. Not all kernels support ext4 is probably the biggest. ext4 doesn't cause files fragmentation as much as ext3. Unfortunately, none of us used ext3/4 partitions in SD card long enough to notice the speed lost when files are fragmented in the ext3/4 partition.
So if you are going to use Desire build, check to see if the kernel supports ext4 in the first place. So far, I have seen MDJ's 10 Kernels supporting ext4, other than that, I don't remember seeing another.
Great, I'll see what happens! Thanks

[Q] A Noob Question, Please Help

I've been hearing a lot about partitioning sd cards and I know it's done in recovery mode.
So my question is - What's the difference between ext2, ext3, ext4 and swap partition?
Please help out!!
ext2 - Linux file system (no journaling)
ext3 - basically ext2 with journaling
ext4 - next generation of ext3 with better journaling and performance
swap - if internal memory should run full, parts would be swapped to the swap space, so it is basically an enhancement of internal memory
Check each out in the wikipedia, its worth it!
EDIT: I'd personally always go for ext4 and 128 swap
tbschommer said:
ext2 - Linux file system (no journaling)
ext3 - basically ext2 with journaling
ext4 - next generation of ext3 with better journaling and performance
swap - if internal memory should run full, parts would be swapped to the swap space, so it is basically an enhancement of internal memory
Check each out in the wikipedia, its worth it!
EDIT: I'd personally always go for ext4 and 128 swap
Click to expand...
Click to collapse
Thanks man,
But still I have few more questions..
What do you mean by "journaling"? And why do we need ext, ext2, ext4 for our mobile?
And swap is for enhancing internal memory or RAM?
Aced443 said:
Thanks man,
But still I have few more questions..
What do you mean by "journaling"? And why do we need ext, ext2, ext4 for our mobile?
And swap is for enhancing internal memory or RAM?
Click to expand...
Click to collapse
Journaling filesystem - quote from Wikipedia:
A journaling file system is a file system that keeps track of the changes that will be made in a journal (usually a circular log in a dedicated area of the file system) before committing them to the main file system. In the event of a system crash or power failure, such file systems are quicker to bring back online and less likely to become corrupted.
Click to expand...
Click to collapse
Sorry I can't elaborate on why Android uses ext4 - I only read that one reason is that it's capable of multithreading. I hope one of the experts can tell us both more
Swap - you're right, of course - is used for RAM.

[Q] MTD Memory Handling Question

My epic 4g is running ei22 Legendary v.1 with the samurai 3.3 assassin kernel. I am a bit of an app whore and have loading it up with nearly 260 apps. I have accomplished this with the use of a 2.5gb ext4 partiton on my class10 16gb sd card, the darktremor script and the a2sdgui app. With this setup I am have all the storage I need and then some.
My question is; is it possible to repartition in order for more ram as opposed to storage?
I have excluded a fair amount of apps from starting up at boot, and I aggressively manage my memory with a memory manager, but I still feel I need more ram.
dewayne25 said:
My epic 4g is running ei22 Legendary v.1 with the samurai 3.3 assassin kernel. I am a bit of an app whore and have loading it up with nearly 260 apps. I have accomplished this with the use of a 2.5gb ext4 partiton on my class10 16gb sd card, the darktremor script and the a2sdgui app. With this setup I am have all the storage I need and then some.
My question is; is it possible to repartition in order for more ram as opposed to storage?
I have excluded a fair amount of apps from starting up at boot, and I aggressively manage my memory with a memory manager, but I still feel I need more ram.
Click to expand...
Click to collapse
I believe ram is a completely different chip in the phone, opposed to the storage space, because it functions a lot differently. But I may be wrong.
Sent from my SPH-D700 using XDA App
iatedeadpeople said:
I believe ram is a completely different chip in the phone, opposed to the storage space, because it functions a lot differently. But I may be wrong.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Wait, WHAT?! The ram isn't in our SD cards?! You don't say! Although I was starting to suspect something when I noticed that if I remove the SD card (or mount it as USB storage), the phone keeps functioning, and I know that can't happen with any computer when the ram is removed...
The OP only mentioned partitioning of the SD card, not internal storage. Also, ram isn't partitioned... he is most likely referring to creating a swap partition on his sd card, which the system would then use as additional storage space for temporary data that would normally be held in ram. However, the CPU still needs the data in ram in order to interact with it, so if the required data is actually in the swap partition, then the system would need to free up some room in ram for the required data (often, by swapping places with data in ram that isn't currently needed, hence the name...
@OP - I'm fairly certain the Epic doesn't currently support swap files/partitions, but I recall seeing mention of other android phones with that ability. But it shouldn't be necessary, our phones have enough ram - if you are running out of memory (errors, not simply seeing a low amount of available ram) then you either have something wrong with your phone, or you need to stop trying to keep all of your favorite 3d games loaded at the same time, lol
Sent from my SPH-D700 using XDA App
Our phone does have the ability to support swap. Some Bonsai releases support swap. First you'd have to make sure the /sdcard was partitioned for swap to have a place to reside. Then, it'd have to be enabled in the kernel and there are tweaks to "swapiness" that sets aggressiveness of swap use - basically swap enable will try to take dormant items in RAM and move them to SWAP to free up RAM. You can run 'free' command from the terminal to see how much swap is available and in use.
All that said - I don't think the OP is referring to SWAP or RAM - as those would only help free up running memory. OP seems to be interested in more room on his OneNAND data partition and SDCard for Apps to be installed.
RE OP: CM7 MTD downsized the /cache partition in OneNAND and gave a sizeable boost to /data space for more apps (see images posted by AproSamurai showing free space). If you run the command 'df -h' from the terminal you'll see the size (total, used, available) of /system, /data, and /cache. On CM7 I have the following sizes, respectively, 268.5M, 676.5M, and 25M. Side note: The 25M cache isn't large enough for all Market apps to download though so noobnl fixed by mounting /cache/download on /data partition (MTDBlock3) to allow for larger apps to cache in download directory before install.
If you're sticking with a GB TW ROM though - I don't understand your setup. Why not just use the built in GB capability to move Apps to SD Card in Settings -> Applications (select app and "move to SD card" for those compatible/capable)? I don't get why you need to create a separate EXT4 partition and use 3rd party tools. Can you elaborate on why they wouldn't work?
Rereading your OP - NO - you can't get more RAM to fit in the phone. It's got what it's got and you can't get more from it. Enabling SWAP may help, terminating resident apps in the background MAY help, but at the end of the day you can't increase the RAM available. You'll need to better manage what you have.
Please don't confuse RAM with storage memory - that got me turned around in your OP.
Sorry for confusing you, if I did. I wasn't interested in partitioning my sd card for more ram on the sd card. My interest is in using the cache space for ram. I don't understand how a phone can be stated as having 512mb's of ram and 1gb of rom and not be. Yet all the epic can muster is 362mb of ram, most of our performance issues are due to that... If there was a way to unlock any more ram in samsung's specs claim I wanted to know.
If you're sticking with a GB TW ROM though - I don't understand your setup. Why not just use the built in GB capability to move Apps to SD Card in Settings -> Applications (select app and "move to SD card" for those compatible/capable)? I don't get why you need to create a separate EXT4 partition and use 3rd party tools. Can you elaborate on why they wouldn't work?
I would have loved to use the .android folder to save my apps but my dalvik cache would fill the internal space and limit me to about 180 apps. With the Darktremor script and a2sdgui I am able to put my Dalvik on the ext4 partition of my SD card.
I would have loved to use the .android folder to save my apps but my dalvik cache would fill the internal space and limit me to about 180 apps. With the Darktremor script and a2sdgui I am able to put my Dalvik on the ext4 partition of my SD card.

[Q] Do you suggest EXT4 over Fat32 for 16GB MicroSD??

I've an I9505 with AOSP MIUI and ChronicKernel, and I have just bought a new 16GB Sandisk Ultra HCI (1) MicroSD.
Do you suggest to format it with an EXT4 filesystem or the default FAT32?
I've done some speed test, and the writing speed of 1GB file seems the same.
I don't usually need to store single files bigger than 2GB.
I also do not need to write on it from Windows. I can in any case safety read EXT4 on Windows with many apps.
I only seen that with the EXT4 I have 1GB less of free space, caused maybe by the SU allocated space. Tune2FS -m 0 seems don't work here.
The recovery seems to work on EXT4 well.
Is EXT4 much more safe, affrodable, fast and modern to justificate the upgrade?
Are there some more good reason to chose EXT4 over the very diffuse Fat32?
The only complains regards free space and writing from Windows. Seems possible just by few software, like Ext2Fsd-0.51, but it's still not possible to erase android user created files. I have in any case few of this needs.
Thank you in advance for your kind reply.
I have not seen significant difference in performance between filesystems.
However, I do need (from time to time) to have files bigger than 2GB on my SD card, since I use it as external disc too... so I go by inertia with NTFS.
You WILL need sooner or later > 2GB file on your SD... So, in your case, EXT4...
Thank you Bodisson.
I'm still looking a way to freeup the SU allocated space, wich is so hight. 1GB of loss space on a 16GB card!!!
Bodisson said:
You WILL need sooner or later > 2GB file on your SD... So, in your case, EXT4...
Click to expand...
Click to collapse
No, Fat32 has support for files up to 4GB. So only if you need files bigger than THAT you should change filesystem.
If you don't: simply stick with Fat32 as it is way way WAY more compatible with every phone, camera, computer, whatever.
Pfeffernuss said:
No, Fat32 has support for files up to 4GB. So only if you need files bigger than THAT you should change filesystem.
If you don't: simply stick with Fat32 as it is way way WAY more compatible with every phone, camera, computer, whatever.
Click to expand...
Click to collapse
Thank you Pfeffernuss. I did a mistake. Fat32 and < 4GB file dimension, right!
In any case I would sacrifice compatibility but reliability. Fat32 is an old filesystem, and not very affrodable in case of OS crash. File recovery is also not at best. Speed for big files are the same, I admit. But the speed for small file access is much more slow.
I also use FTP and SCP for file tranfer.
I do not like to unmount MicroSD inside a full working OS to let it Windows directly compatibile. And also the internal memory is in any case Windows non accessibile.
Both can use MTP onthefly.
I like NTFS for Windows based usage. It's really much more fast and secure than Fat32.
I want to do the same in a Linux environment.
I'm finally oriented to an EXT4 ...
In any case thanks for your reply.

Categories

Resources