Roton, on Sep 21 2009, 00:56, said:
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.