| Mobile browser wars: Nokia microB vs. Firefox FennecPosted on January 2, 2010 by Mikko OhtamaaFiled Under Business, browser, fennec, maemo, mobile, mozilla, n900, nokia Begun, this mobile browser war, has. When mobile internet is growing 8x faster than desktop internet everyone wants to have a share of it. In the core of this fight is the mobile browser – the doorway to the mobile internet. Usually phone comes with a browser from the phone manufacturer: Safari ships with iPhone, Android ships with WebKit based browser and Maemo comes with Nokia microB. Besides the default browser, open platforms have seen third party browsers created for them: Opera Mini has 30 million users and several browsers have been created for Symbian platforms. (Note that iPhone is not really open platform regarding this as Apple developer terms specifically forbid creating alternative browser engines for their Safari – all iPhone “browsers” are just the same Safari with new toppings). Now Mozilla foundation is releasing Firefox Fennec (RC1 version is available for Nokia N900), touted as the most innovative mobile browser this far. New user interface ideas, desktop syncronization and vibrant add-on community are something yet to be seen for mobile browsers. Mozilla did an amazing thing with Firefox when it actually managed to push Internet experience forward and compete against Microsoft’s bundled Internet Explorer with sheer quality. Can Mozilla repeat the same thing it did for desktop browsing for mobile browsing too? Is Fennec good? I installed the release candidate and conducted some tests by visiting on popular sites. It is especially fruitful to compare Fennec against Nokia’s own microB browser as they both are based on the same Gecko rendering engine beneath the hood. The differences of the browsers are, actually surprisingly, not limited to branding and user interface shell. Fennec is portable browser – Mozilla hopes to run Fennec on other mobile platforms beside Maemo in the future. Fennec user interface is based on Mozilla’s XUL library and you can actually run Fennec on your desktop computer too. Nokia’s interest, on the other hand, is have an optimized browser for their own mobile phones: microB user interface is using native Maemo user interface components. Below are some aspects of the browsers compared against each other. Start up time
This is a pain for Fennec. Loading all that XUL Javascript needed to run Fennec is just too much. You really don’t want to start Fennec for a quick browsing session, unless you have the patience of a cow. I am not sure whether N900 keeps microB loaded on the background all the time or what’s causing the difference. User interfaceThis is really where Fennec shines. Nokia enjoys some reputation of being a boring engineer house with little innovation left to stir. After learning the trick of left and right sweep, which is cleverly demostrated on the start page, Fennec user interface instantly feels intuitive. microB, on the other hand, uses somehow clumsy “bottom right corner full-screen button” to access buttons and left-right sweep is not very well thought. For example, switching a tab/browser window takes three “clicks” on microB (show menu – switch application – choose next browser window) when Fennec does it with one sweep and click. Also, backward navigation is much more intuitive on Fennec and takes too many gestures on microB. Both browsers have search integrated to the navigation bar. Fennec start screen is more clever, showing the history and shortcuts, while microB shows only the bookmarks. Fennec navigation bar also is a combination of title and navigation bar, saving the precious screen estate on small physical form factor. Fennec zooms to text fields automatically when you start to input text into them and also have soft “tab keys” to navigate to next and previous input field. Page reading and speedOn sites with above average layout complexity, Fennec is unbearable slow compared to microB, up to the point the browser is next to unusable in its current incarnation. As they both use the same rendering engine, I have hard time to understand how microB manages even the heaviest dynamic pages (Facebook profile page) when Fennec becomes unusable even on a moderate complex page (slashdot.org). The thing with Fennec is that for some of the the time it does not register your interaction and does not have any indicator showing if it is responding – it has grinded to halt, little bit like desktop computer when swapping. And even when Fennec is responding the scrolling of the page refreshment is sluggish compared to microB. This makes the page reading experience unusable. A normal user won’t stand 1-3 second frequent responsivity pauses or page movement which cannot be controlled. microB must do the rendering somehow different - is it hardware acceleration on font rendering, smarter management of images or some other trick?. However, until Fennec reaches the smoothiness of microB, there is no way I would switch to Fennec over microB. (Note: You can press CTRL-Backspace from N900 keyboard to force application switch if you cannot exit from halted Fennec otherwise) Mobile browsingThough N900 has 800 pixel wide screen, it is still a mobile phone. Small physical size, low bandwidth with high latency and limited CPU power might make you to pick a mobile internet version of the site when it is available. However, since the screen has exceptional high Dots-Per-Inch value, this poses a problem for rendering sites with the default font sizes. Fennec does not seem to have a shortcut for setting a large text size. This is something one would hope to see on such high DPI device as the most of the time default web site fonts are too small to be usable. Also, Fennec does not use the shoulder plus and minus volume buttons for zooming – microB does it and it is very natural place for this function. Fennec seems to have some difficulties with mobile site rendering: for example touch.facebook.com and yle.mobi are not scaled to full width. Instead a narrow colum of 1/3 screen width is displayed. BugginessmicroB is very solid piece of software. It crashes more rarely than Safari on iPhone (might this be because of more memory – low memory conditions seem to be a normal crashing condition for Safari?). Fennec is still in its first version and have some issues. (Note: I managed to get Fennec to zombie state – I had to go to terminal and type killall fennec command to make the browser become launchable again). Sites testedSlashdot.org Geek discussion site microB: no problems Fennec: slow, frequent pauses, not smooth scrolling slashdot.org/palm Very simple mobile version of the above. microB: Font too small Fennec: Scales correctly Facebook.com High profile social networking site microB: Sometimes little slow, but seems to work perfectly Fennec: Unusable slow touch.facebook.com microB: Perfect (at least when scaling font up a little) Fennec: Does not scale correctly (default scale uses only 1/3 of screen width, double click zooming scales too much) yle.fi Finnish national broadcasting company site microB: Ok. Readable and usable with text size large. Fennec: Ok. The default view is navigable, but not readable. You need to double-click zoom to read the text (Fennec doesn’t seem to have text size large option)- yle.mobi The mobile version of above. microB: Perfect with text size large, ok otherwise (need to double click to zoom and then click to choose a link to follow). Fennec: Ok – font size too small GMail HTML version The default Javascript version of GMail is too heavy for both the browsers. GMail still provides “Basic HTML” view as the fallback for devices with less CPU power and network bandwidth. microB: Ok – you can do some basic emailing Fennec: Ok. Does not seem to be affected by as much of “slugginess” as other sites are (might the slugginess be a Javascript issue?) Youtube.com The web version of flash based video sharing site. microB: Plays Flash movies ok – smooth scrolling even whilst a Flash movie is playing Fennec: Frequent grinds to halt, sluggish, unusable. Manages to open Flash video, though. m.google.com/youtube The mobile version of above. microB: Youtube claims the browser is unsuppoted Fennec: Cannot enter the site – shows only the page of Youtube Mobile instructions twitter.com (web site) microB: Perfect Fennec: Ok. Sluggish when opening new pages, but still usable. Fennec start view ships with Twitter button, so one might assume this site is well tested for Fennec. m.twitter.com The mobile site of above. microB: Ok – the default font size too small, but when settings text size large works well Fennec: Ok – the default font size too small. Double click zoom does not work well on the twit feed, making reading difficult. plone.org A community site with relatively simple layout. microB: Ok – minor rendering errors Fennec: Ok – minor rendering errors iltalehti.fi Finnish tabloid web site with lots of images. microB: Ok Fennec: Grinds to halt, unusable slow SummaryThough having nice promise of innovation, the advise for Fennec development team would be “back to the basics”. The slugginess and response times of Fennec are such an issue that one would not yet consider it as an real alternative for Nokia’s default microB browser. With Fennec’s user interface and microB’s speed one could have a near perfect mobile browser. Depending what kind of future co-operation Nokia and Mozilla foundation will have, we might live to see it. Zope Zeo vs. standalone setupsPosted on July 7, 2008 by Tuukka MustonenFiled Under Plone (old), Red innovation, apache, database, linux, performance, ubuntu, zope We do some Plone development here at Redi. As known, Plone is a powerful, but unfortunately quite a heavy CMS which is best suited for Intranets. Thus, we are always looking for speed increase. Enter Zeo cluster – a feature that nowadays comes bundled with Zope and allows one database (practically Data.fs) to be used by multiple Zope instances, or more accurately Zeo clients. In standalone installation only one CPU / CPU core can be used for processing requests (as Zope / Python implementation is single-threaded AFAIK). So if there are any concurrent requests the database (ZODB, the Zope Object Database) usually has to wait for the request processing before it is asked for the data and only part of the processing power is used as requests are queued. Using Zeo server-client architecture however, each Zeo client can do the processing on their own CPU/core (thus efficiently using the whole CPU prosessing power available) and also minimize the hard disk idle time by asking for data in an ~asynchronous manner (in separate queues). Actually ZODB even serves the same object simultaneously to different client processes for performance reasons. This might raise database ConflictErrors, which are nothing to fear of, however, as noted some paragraphs below. Similarly, you could also deploy Zeo clients on different computers in local network (or wherever you want), but that’s not the scope of this article. Having clients running on different machines is a similar case with the same performance basis, but there are connection lags, bandwith limits and such that decrease performance. Theory vs. practiceDeploying a Zeo cluster instead of standalone Zope instance should theoretically increase the performance by factor of extra available CPUs / CPU cores. There might be some overheads from this setup though, so we tested it out using ApacheBenchmark – the benchmarking module that comes bundled with Apache nowadays. But first something about… Setting up Zeo & converting from standalone modeIn the easiest scenario, setting Zeo up is rather easy: the unified installer supports Zeo-server setup out of the box (=there is a recipe for it). Just run the unified installer like: $ ./install.sh zeo Luckily, the unified installer uses buildout from Plone 3.1 onwards. Thus, converting your current buildout instances to Zeo cluster is nothing but change of buildout configuration. Where you would normally need ‘instance’ section in your buildout.cfg you will now need the following: [zeoserver]
recipe = plone.recipe.zope2zeoserver
zope2-location = ${zope2:location}
zeo-address = 127.0.0.1:12000
#effective-user = __EFFECTIVE_USER__
[client1]
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
zeo-client = true
zeo-address = ${zeoserver:zeo-address}
# The line below sets only the initial password. It will not change an
# existing password.
user = admin:mysecretpassword
http-address = 12001
#effective-user = __EFFECTIVE_USER__
#debug-mode = on
#verbose-security = on
# If you want Zope to know about any additional eggs, list them here.
# This should include any development eggs you listed in develop-eggs above,
# e.g. eggs = ${buildout:eggs} ${plone:eggs} my.package
eggs =
${buildout:eggs}
${plone:eggs}
# If you want to register ZCML slugs for any packages, list them here.
# e.g. zcml = my.package my.other.package
zcml =
products =
${buildout:directory}/products
${productdistros:location}
${plone:products}
To add more clients (which is quite the point here), append as many times the extra client sections like this: [client2]
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
zeo-client = true
zeo-address = ${zeoserver:zeo-address}
user = ${client1:user}
http-address = 12002
#effective-user = __EFFECTIVE_USER__
#debug-mode = on
#verbose-security = on
eggs = ${client1:eggs}
zcml = ${client1:zcml}
products = ${client1:products}
That minimizes the need for retyping user names, password etc. These examples were taken from Plone unified installer buildout.cfg with ports changed. Starting, stopping & restartingNow, to start your Zeo-powered Plon clients you could type: bin/zeoserver start bin/client1 start bin/client2 start ...same for all the clients... However, the unified installer has a recipe which automatically generates nice and simple shell scripts to control your cluster. In the end of your buildout.cfg, add: [unifiedinstaller]
recipe = plone.recipe.unifiedinstaller
user = ${client1:user}
primary-port = ${client1:http-address}
That should generate the scripts. In fact, it propably does also something else, something which I’m not aware of. However, I didn’t bump into any problems, yet bin/startcluster.sh And that does it (it start server and the clients). Shut it down via: bin/shutdowncluster.sh And restart: bin/restartcluster.sh ConflictErrors – not that errerousAs noted before, in Zeo mode the ZODB might serve the same objects to two more clients at the same time. If one client manipulates the object before others (ie. edits values and saves changes) the other requests will propably fail. This raises ConflicError which looks like this: ConflictError: database conflict error (oid 0x0f39, class HelpSys.HelpSys.ProductHelp) In this case ZODB tries to reprocess the failed requests. This should be common database approach and thus a feature, not a bug (although Zope might want to tell that in error message!). For more accurate explanation see Plone discussion. Parsing it together with web serverThe Zeo components (server and clients) talk to each other via standard Internet protocols (TCP or UDP, not sure). In the default setup, the Zeo server listens to port 8100 and Zeo clients to 8080, 8081, etc. Thus, to access the separate clients as ‘one site’ we need to serve the requests to multiple clients. This can be achieved with load balancers. Apache has at least one: mod_proxy_balancer which should do exactly what we need. Apache isn’t the best choice for achieving high requests per second values, but it will do for our tests (compare to more lightweight but also more limited lighttpd). Just remember that there are other alternatives/methods available, like using squid as load balancer. Our configuration is as follows (inside VirtualHost-directive): <Proxy balancer://lb>
BalancerMember http://127.0.0.1:12001/
BalancerMember http://127.0.0.1:12002/
BalancerMember http://127.0.0.1:12003/
BalancerMember http://127.0.0.1:12004/
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all
</Location>
ProxyPass /balancer-manager !
ProxyPass / balancer://lb/http://localhost/VirtualHostBase/http/www.mydomain.com:80/plonesite/VirtualHostRoot/
ProxyPassReverse / balancer://lb/http://localhost/VirtualHostBase/http/www.mydomain.com:80/plonesite/VirtualHostRoot/
This setup also allows us to use the balancer-manager (accessible at /balancer-manager) that comes with mod_proxy_balancer. It’s useful for checking if the configuration is working and balancer is dividing the requests equally. In my setup the balancer is using the default Request Counting -algorithm which divides the requests numerically equally between the instances, but you might want to also try Weighted Traffic Counting, which should be for actual use. In our test only the frontpage is accessed however, so each request’s data transfer is equal and the weighted traffic counting isn’t of use. The testThe server machine
The setup
The tests where run locally in development environment to minimize the network lag (was 0-1ms). The test commandsApacheBenchmark commands: $ ab -n N -c C myurl where N was either 1000 or 9000 (requests) and C 1, 10, 100 or 1000 (concurrent requests). The resultsYou can download the more in-depth test sheet Plone Standalone vs. Zeo installation (PDF). To put it simple: theory and practise meet well – Zeo server is a lot more powerful with concurrent requests. On non-concurrent requests the results are about the same. Having as many Zeo clients as CPUs / CPU cores can boost the performance up to number of extra CPUs/cores. For example, in our quad-core server with Zeo setup we gained nearly 4 times the requests per second of standalone installation (~370% to be accurate). Increasing Zeo clients to 6 didn’t help any as there’s no processing power left from 4 heavily stressed client processes. Also to be noted is that the waiting times for clients nearly tripled (median jumped from 126 to 305 ms) when raising concurrency from 1 to 10. This isn’t bad though – those are still low figures compared to standalone’s median of 1215 ms! Only when raising concurrency to 100 we began to see some 3,6 seconds waiting times (6 seconds for standalone). Increasing concurrency didn’t bring down the requests/second rates much (less than 5%) as expected. Overall, the results were expected, but now we have evidence of it: under concurrent request load Zeo server is a good option to multiply the performance of your site. With very low traffic sites which rarely get more than 1 request at time this doesn’t matter. One bad word about the resource requirements though: The used RAM increase for 6 client Zeo setup (standard Plone 3.1.2 + 12 additional Products) was whopping 621 MB (1132 MB -> 1753 MB). That means about 100 MB per Zeo client as the Zeo server memory intake was only about 12-15 MB. Thus, only use as many Zeo clients as absolutely necessary or you might find your beloved server machine under very serious Zope flu! |
