Guest Posted September 17, 2009 Report Posted September 17, 2009 Everything appears to have gone over to my MicroSD but I keep seeing people mentioning Swap partitions when Apps2SD is mentioned and I only have a Fat32 and EXT3 partitions. Do I need to make another? Why? Sorry if this is very obvious or common knowledge, I did search, honest.
Guest Roton Posted September 20, 2009 Report Posted September 20, 2009 Anyone at all? You probably already have the 32MB linux swap space. You can check by booting the phone into recovery then using the following adb commands: adb shell parted /dev/block/mmcblk0 print
Guest Posted September 20, 2009 Report Posted September 20, 2009 I did the partitioning manually. I'm doing the swap file anyway (32Meg isn't going to hurt) but I was curious.
Guest Roton Posted September 20, 2009 Report Posted September 20, 2009 I did the partitioning manually. I'm doing the swap file anyway (32Meg isn't going to hurt) but I was curious. Well when you run lots of different apps at once you'll need it since once the OS runs out of physical memory it uses the swap space. It will make the phone run faster and smoother in such an instance.
Guest Posted September 20, 2009 Report Posted September 20, 2009 Is 32MB the recommended size? Would more be better?
Guest arclife Posted September 20, 2009 Report Posted September 20, 2009 can i tap on the end here? My Hero is running the modified boot image and modaco 2.0, I'm guessing apps2sd will put all my apps onto the SD card? What about the swap file, i understand the point of one - does the Hero make one on it's own if its running without apps2sd? I want to squeeze as much speed out of my phone as possible :)
Guest Dr Hotdog Posted September 21, 2009 Report Posted September 21, 2009 Well when you run lots of different apps at once you'll need it since once the OS runs out of physical memory it uses the swap space. It will make the phone run faster and smoother in such an instance. I'm not convinced swap for Hero (or Android in general, for that matter) is actually a good idea. Swap is basically using SD card storage as a substitute for more physical memory (the same as Windows 'virtual memory'), but the problem is that SD card access is slooooooooooooow compared to access to RAM so it's not a very good substitute. If you want a fast, responsive system then what you actually want to be doing is avoiding getting into a situation where you need swap, i.e. don't run out of physical memory. Fortunately the Android OS is designed to do this for you, when it runs low on free memory it starts closing apps based on a ranking system for deciding which is 'least important' to avoid actually running out. If you later switch back to an app that the OS has removed from memory it will be reloaded from internal storage which won't be as quick as if the app was still in memory, but on the other hand it won't be any slower than if it was being loaded into RAM from the swap partition on the SD card. Basically, I can't see swap helping. Either the Android OS will avoid running out of physical memory as it's supposed to and never actually use the swap partition, or worse it does actually use it as if it was extra physical memory (unlikely, I think) which will interfere with the sophisticated memory management scheme that's already there. There's a reason why Android phones don't ship configured for swap, in my opinion it's because the OS is already doing something better that makes swap unnecessary. PC's are different, there it's not a bad idea to have some swap/virtual memory as an emergency safety measure. If a PC runs out of memory completely it's forced to kill applications, losing any unsaved data, and swap can prevent this by allowing the OS to use disc space as a substitute for physical memory. It's still something best avoided though, heavy use of swap will make the system very sluggish due to the need to continually move data back and forth between physical memory and disc storage, which is a slow process. Swap isn't a necessity for Android because Android apps automatically save any unsaved data when they get moved to the background, so if the OS kills them to free up memory no data is lost and when they are next reloaded they resume exactly how they were before.
Guest Posted September 21, 2009 Report Posted September 21, 2009 Interesting read, Dr Hotdog, thanks very much.
Guest Roton Posted September 21, 2009 Report Posted September 21, 2009 (edited) Is 32MB the recommended size? Would more be better? Most places I've read say 32MB. By the way, thanks Roton! No worries :) I'm not convinced swap for Hero (or Android in general, for that matter) is actually a good idea. Swap is basically using SD card storage as a substitute for more physical memory (the same as Windows 'virtual memory'), but the problem is that SD card access is slooooooooooooow compared to access to RAM so it's not a very good substitute. If you want a fast, responsive system then what you actually want to be doing is avoiding getting into a situation where you need swap, i.e. don't run out of physical memory. Fortunately the Android OS is designed to do this for you, when it runs low on free memory it starts closing apps based on a ranking system for deciding which is 'least important' to avoid actually running out. If you later switch back to an app that the OS has removed from memory it will be reloaded from internal storage which won't be as quick as if the app was still in memory, but on the other hand it won't be any slower than if it was being loaded into RAM from the swap partition on the SD card. Basically, I can't see swap helping. Either the Android OS will avoid running out of physical memory as it's supposed to and never actually use the swap partition, or worse it does actually use it as if it was extra physical memory (unlikely, I think) which will interfere with the sophisticated memory management scheme that's already there. There's a reason why Android phones don't ship configured for swap, in my opinion it's because the OS is already doing something better that makes swap unnecessary. PC's are different, there it's not a bad idea to have some swap/virtual memory as an emergency safety measure. If a PC runs out of memory completely it's forced to kill applications, losing any unsaved data, and swap can prevent this by allowing the OS to use disc space as a substitute for physical memory. It's still something best avoided though, heavy use of swap will make the system very sluggish due to the need to continually move data back and forth between physical memory and disc storage, which is a slow process. Swap isn't a necessity for Android because Android apps automatically save any unsaved data when they get moved to the background, so if the OS kills them to free up memory no data is lost and when they are next reloaded they resume exactly how they were before. Firstly I doubt you'd notice much (if any) speed difference using a class 6 microsd card. These aren't large apps we're talking about, most are only a few 100k. Even if the sd card takes 0.5 seconds longer to load I personally don't see that as an issue. I wonder if anyone on here has done some time comparisons. If any of you guys know someone else with a hero it would be cool to see if the difference between load times is much. Swap space depends on the build. If the build is configured to use swap space it will be sluggish without it. If it doesn't need swap space then having a swap partition won't matter because it won't be used. Imo it would be better to keep the partition in case any of these releases have it as a requirement. Edited September 21, 2009 by Roton
Guest Posted September 22, 2009 Report Posted September 22, 2009 For everyone's information, since creating the swapfile I haven't noticed any change in performance ASIDE from a distinct lack of Force Close notifications. I'm not sure if that's related to formatting the card, repartitioning it and reinstalling my apps (likely) but it might be worth a go if you're having issues.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now