Friday, August 2, 2019

clockworkmod recovery - Use of swap size while partitioning?


I just rooted my phone (Android 2.3.6) and partitioned the sd card using CWM recovery. While partitioning, I noticed about swap size and while searching about it, different blogs (xda developers) recommended using 0M as swap size. What is the use of it? Why is it recommended to be 0M?



Answer



Primary reasons for the no swap recommendations are the basic uselessness of swap for most devices, performance reasons, and device longevity.


As Liam mentions, modern devices have no shortage of RAM (Even my old underpowered Wildfire S has as much RAM as my previous desktop.) and that RAM is managed fairly well by the modern Android system, making a swap largely pointless.


Also, even though flash is far better than platters of spinning rust, it's still orders of magnitude slower than RAM is, hence for performance reasons, you don't want to tier down to flash if you can at all avoid it.


Furthermore, flash memory has a limit on how many times you can erase and rewrite it. While this cycle limit is typically in the thousands or tens of thousands, which combined with modern wear leveling systems, means you're unlikely to hit the limit within the useful lifespan of the device, but if you're using it as swap, with loads and loads of itty-bity writes, you will chew through those cycles needlessly and might actually bump against those limits in time.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...