{"id":6743,"date":"2010-03-25T12:46:02","date_gmt":"2010-03-25T19:46:02","guid":{"rendered":"http:\/\/wapreview.com\/?p=6743"},"modified":"2010-07-15T20:59:11","modified_gmt":"2010-07-16T03:59:11","slug":"making-the-most-of-the-android-g1-and-magic%e2%80%99s-limited-ram","status":"publish","type":"post","link":"https:\/\/wapreview.com\/6743\/","title":{"rendered":"Making the Most of the Android G1 and Magic\u2019s Limited RAM"},"content":{"rendered":"

\"Android<\/p>\n

I’ve had\u00a0 an HTC Magic (aka T-Mobile MyTouch, aka Google Ion) for close to a year now.\u00a0 The phone was a gift from Google, handled out to me and the other 3000 attendees at Google I\/O last year.\u00a0 I like the phone’s form factor. It’s slim, light, highly pocketable and has a responsive capacitive screen that works well in sunlight.\u00a0 But I’ve never used the Magic much until recently. The problem was the browser or more correctly the phone’s woeful amount of available\u00a0 RAM that caused the browser to perform poorly.<\/strong><\/p>\n

The Magic has, at most. 40 MB of free RAM at startup.\u00a0 In typical use, RAM quickly drops to 20 MB or less and the OS starts killing background process to maintain stability and responsiveness.<\/strong> This low RAM issue affects the G1 (Dream) and most Magics (the ones with the 32B main board).\u00a0 The 32A variant of the Magic shipped by some operators and most newer Android’s have an extra 100 MB of RAM and, for the most part, are unaffected by these issues. To find out if your Magic is a 32A (good) or 32B (bad) see here<\/a>.<\/p>\n

In stock form the 32B Magic’s browser seems unable to cache pages at all.\u00a0 When hitting the back button, the browser rarely if ever retrieves the previous page from the cache, reloading\u00a0 it from the server instead.\u00a0 The same thing happens when switching between tabs, every tab change forces a page reload.\u00a0 Switching between apps is also affected by the low RAM issue. If I switch from the browser to the Gmail app to read a new Email and then go back to the browser, the current page would have been cleared and will need to be reloaded.\u00a0 Switching away from the browser and then back again also tends to completely close any tabs open in the background.<\/p>\n

Not only is all this reloading a waste of time and resources, but it breaks some web apps by triggering a state change.<\/strong> For example, the Bloglines.com\/mobile<\/a> RSS reader marks items as read on load and only shows unread items.\u00a0 When the page reloads after returning from following a link in an item, Bloglines thinks that the previously loaded items have been read and doesn’t display them.\u00a0 On rapidly updating sites like a Twitter time line or a breaking news site, the unexpected page reload tends to make the user lose their place in the document because the page has changed when it reloads.<\/p>\n

These unrequested page refreshes made the Android browser almost unusable for me. I ended not using the Magic much and mostly\u00a0 using Opera Mini 4.2 for browsing when I did. Opera’s\u00a0 cache works properly and it rarely reloads a page. Plus Opera lets you save pages to the SD card or phone memory for safekeeping or offline reading.\u00a0 But the phone’s limited amount of RAM does affect Opera Mini too.\u00a0 If\u00a0 Mini is put in the background by opening another app, the OS generally kills it.\u00a0 Unlike the Android browser, Opera 4.2 doesn’t save any state information so that when it was reloads it’s on the Speed Dial startup\u00a0 page with browser history cleared.\u00a0 Opera Mini 5 for Android is a little better in that it at least saves history when it’s closed by the OS.<\/p>\n

The low RAM issue is fixed in more recent Android phones.\u00a0 The Hero, Droid\/Milestone, Cliq and Behold II all have an extra 100 MB of RAM compared with the early models, as does the latest rev 2 version of the MyTouch 3G.\u00a0 But that doesn’t help users of the first Android phones.<\/p>\n

Fortunately there is a solution.\u00a0 There several things you can do to increase free RAM on the G1 and 32B Magic.\u00a0 They are the “10MB hack<\/em><\/strong>” and the use of a swap file<\/strong>.\u00a0 In order to use either of these you need to “root” your phone and install an alternate ROM.\u00a0 I did both and was\u00a0 amazed by the difference they made.<\/p>\n

Here’s what you need to do:<\/p>\n

Root your phone and install Cyanogenmod’s ROM<\/strong>: Warning, this will void your warranty. Things can potenially go wrong and “brick” your phon<\/em>e. <\/strong> However thousands of Android users have successfully rooted their phones and most (probably all) bricked phones can be recovered.\u00a0 I’m not a rooting expert (I’ve only rooted one phone) so I’m not going to go into the details of rooting. Their are several excellent guides and tutorials on the web.\u00a0 I used and recommend the ones on the CyanogenMod Wiki<\/a> as they are through, frequently updated and well tested. There are a lot of steps, so take you time and read the tutorial carefully and completely before you do anything. Installing the latest CyanogenMod Rom (currently 4.2.15.1) also gets you the Eclair (Android 2.0) browser with multi-touch, pinch zooming, double tap zooming and support for the HTML5 Database,\u00a0 Application Cache and Geolocation APIs and the <video> tag.<\/p>\n

\"Swapper \"Tons<\/p>\n

Use a SWAP file<\/strong>: The excellent free Swapper<\/a> utility in the Android Market makes this easy.\u00a0 Simply install Swapper on your rooted phone, run it and hit the “Swap ON” button.\u00a0 One caveat, you need a fast SD card for this to work.\u00a0 I initially tried Swapper with regular speed 2 GB Kingston SD card that came with the phone and all it did was slow the phone down and made it unstable.\u00a0 I replaced the card with a (shameless affiliate link) $10 Transcend Class 6, 4GB card from Amazon<\/a> and the difference was amazing.\u00a0 With the Class 6 card, enabling swap made my phone faster than stock and at least as stable and went a long way toward solving the browser cache issues.\u00a0 While Swapper works pretty well out of the box, you can get even better performance by tweaking the settings a bit.\u00a0 Everyone has different opinions on the ideal swap configuration. Based on trial and error, I found that using a 64 MB swap partition and a “Swappiness” setting of 60 seems to work best for me.\u00a0 Setting up a swap partition requires some extra steps (Part of the Apps2SD setup,\u00a0 explained here<\/a> ).\u00a0 If that sounds like too much trouble. you can get nearly as good results with a 64 MB swap file instead of a partition.<\/p>\n

Install the 10 MB hack<\/strong>: The hack converts 10 MB of video memory into RAM.\u00a0 While 10 MB isn’t a lot it does help keep RAM above the 20 MB point where the OS starts killing off background processes. Unless you play 3D games you will never miss the video RAM.\u00a0 If you are using swap, the extra RAM means swapping will occur less frequently.\u00a0 Swap is slower than RAM so the less swapping, the faster your phone will be.\u00a0 You can also use the 10 MB hack without a swap file and with a slow SD card.\u00a0 The 10 MB hack is an addon to CyanogenMod ROMS. Absolutely Android has detailed instructions<\/a>, including a\u00a0 video and links to the hack files.\u00a0 There is a different hack file for each CyanogenMod rev so\u00a0 be sure you get the right one. The TasKiller image above shows over a dozen tasks running and still 25 MB of RAM free using a combination of swap and the 10MB hack.\u00a0 With the stock setup, only run four or five tasks could run at a time and memory was constantly hovering around 20 MB.<\/p>\n

Kill uneeded tasks<\/strong>: This is something you can do even on a stock, unmodified phone although ironically it’s more of a necessity when you are using swap and\/or the 10 MB hack. With a stock phone, the OS will only let a few tasks run at once. With swap enabled, you can easily get over a\u00a0 dozen tasks running (image above) which will slow down the phone.\u00a0 Do kill tasks you need to install a task manger utility. I like\u00a0 Advanced TasKiller<\/a> or Wing Tseng’s Task Manager<\/a>, both free apps that are available in the Market. They let you view running tasks and kill any you don’t need. Killing all tasks before starting the browser improves performance and makes more memory available for caching. The image below left shows 39 MB free with Swype, Weather Bug and Hootsuite running. Before enabling swap and the 10 MB hack I only had about 20 MB free with the same tasks running,<\/p>\n

\"TasKiller \"TasKiller<\/p>\n

With swap and the 10 MB hack, using the Android browser has become a pleasure. I can open several tabs and switch between them without reloading and can switch between the browser, Gmail and a Twitter client without worrying about my open browser tabs getting closed in the background. Opera Mini does not get terminated in the background either and the phone seems quicker overall. The image above show the browser (with two tabs open), Opera Mini 5,\u00a0 HootSuite and Swype all running at once and still 33 MB free.\u00a0 With the stock configuration running any more than two large apps like these at once was impossible.\u00a0 Swap and the 10 MB hack have transformed my Magic and I’ve actually switched to using it as my main phone instead of my Nokia N95-3.<\/p>\n","protected":false},"excerpt":{"rendered":"

I’ve had\u00a0 an HTC Magic (aka T-Mobile MyTouch, aka Google Ion) for close to a year now.\u00a0 The phone was a gift from Google, handled out to me and the other 3000 attendees at Google I\/O last year.\u00a0 I like the phone’s form factor. It’s slim, light, highly pocketable and has a responsive capacitive screen that works well in sunlight.\u00a0 But I’ve never used the Magic much until recently. The problem was the browser or more correctly the phone’s woeful … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":14619,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[72],"tags":[1057,1056,1055],"_links":{"self":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts\/6743"}],"collection":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/comments?post=6743"}],"version-history":[{"count":14,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts\/6743\/revisions"}],"predecessor-version":[{"id":6752,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts\/6743\/revisions\/6752"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/media\/14619"}],"wp:attachment":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/media?parent=6743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/categories?post=6743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/tags?post=6743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}