update to 1.4

The API formerly known as Tera-WURFL
notalifeform
Posts: 15
Joined: Tue Nov 15, 2011 2:34 am

update to 1.4

Postby notalifeform » Mon Apr 23, 2012 8:39 am

Hi There,

We have been trying a test-upgrade of the Tera-Wurfl database API from 1.3 to 1.4. We did this by just symlinking to the new php code and by using our previous config and database, since we didn't see any release notes telling us to do anything specific. To our surprise the API seemed rather slower than faster. Is there anything that we might have done wrong? It is supposed to be faster isn't it?

regards,

Robert

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: update to 1.4

Postby kamermans » Mon Apr 23, 2012 12:50 pm

Hi Robert,

The API has been changed significantly, with many improvements made for accuracy and performance; however, the total performance difference depends largely on the type of traffic you are serving, and whether or not you have SIMPLE_DESKTOP_ENGINE_ENABLE = true in your config. With mostly mobile traffic, I could see how the performance may be marginally slower, but not significantly. Do you have any numbers for comparison? Also, did you notice that it took considerably longer to update the data? This could point to a MySQL encoding issue that we've seen before.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

notalifeform
Posts: 15
Joined: Tue Nov 15, 2011 2:34 am

Re: update to 1.4

Postby notalifeform » Mon Apr 23, 2012 2:52 pm

HI Steve,

The loading process takes a bit bit longer, but that is not due to the cache update, but to the 'patch time' (see below). What we saw in our tests is that when using a low amount of threads it seems to perform similar, but if we "hurt" our server with a lot of threads it seems that 1.3 out performs 1.4

version threads req/sec
1.3 Tera-Wurfl 10 36.9
1.4 Tera-Wurfl 10 35.6
1.3 Tera-Wurfl 80 233.6
1.4 Tera-Wurfl 80 120.2

the tests are done using jmeter and a set of mobile-only useragents. (the SIMPLE_DESKTOP_ENGINE_ENABLE = true ) but that probably doesn't matter in that case).

I'm not too worried about the results, since it will take us a while before we're at these number, but the result was a bit surprising to me. Did you do similar tests?

regards.

Robert


root@bm-dexter:/var/www/play/framework/terawurfl-1.3# sudo -u www-data php ./admin/cmd_line_admin.php --update=remote
Downloading WURFL from http://www.scientiamobile.com/wurfl/xxxxxxxx.zip ...

done (/var/www/play/framework/terawurfl-1.3/data/wurfl.xml: 19.32 MB [1.18 MB compressed])
Downloaded in 2.4805378913879 sec @ 3.99 Mbps

Database Update OK
Total Time: 53.084020853043
Parse Time: 3.8985579013824 (TeraWurflXMLParser_XMLReader)
Validate Time: 0.055650949478149
Sort Time: 1.4405529499054
Patch Time: 42.966210126877
Database Time: 4.5554521083832
Cache Rebuild Time: 0.1675968170166
Number of Queries: 426
PHP Memory Usage: 41.09 MB
--------------------------------
WURFL Version: db.scientiamobile.com - 2012-04-22 00:00:01 (Sun Apr 22 00:01:51 -0400 2012)
WURFL Devices: 16773
PATCH New Devices: 3
PATCH Merged Devices: 679
root@bm-dexter:/var/www/play/framework/terawurfl-1.4# sudo -u www-data php ./admin/cmd_line_admin.php --update=remote --force
Local WURFL Date: Mon, 23 Apr 2012 15:01:24 +0200
Remote WURFL Date: Sun, 22 Apr 2012 17:12:04 +0200
Your WURFL Data is up to date.
Downloading WURFL from http://www.scientiamobile.com/wurfl/xxxxl.zip ...

done (/var/www/play/framework/terawurfl-1.4/data/wurfl.xml: 19.32 MB [1.18 MB compressed])
Downloaded in 2.2624268531799 sec @ 4.37 Mbps

Database Update OK
Total Time: 126.87785792351
Parse Time: 4.9549059867859 (TeraWurflXMLParser_XMLReader)
Validate Time: 0.073335886001587
Sort Time: 6.8936340808868
Patch Time: 109.91844391823
Database Time: 5.0291061401367
Cache Rebuild Time: 0.0084319114685059
Number of Queries: 384
PHP Memory Usage: 43.86 MB
--------------------------------
WURFL Version: db.scientiamobile.com - 2012-04-22 00:00:01 (Sun Apr 22 00:01:51 -0400 2012)
WURFL Devices: 16773
PATCH New Devices: 3
PATCH Merged Devices: 674

(4 patches were ignored...)

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: update to 1.4

Postby kamermans » Mon Apr 23, 2012 3:11 pm

Ah I see. There have been improvements to both the desktop categorization code (SimpleDesktop) and the mobile matchers (particularly Android). What this means is that web traffic is faster and mobile traffic is slower but more accurate. In a mixed web/mobile environment (like we test in for internal benchmarking), the performance is better with the new API (v1.4) since many more desktop UAs are detected without going to WURFL. Mobile UAs, on the other hand, can spend more time in the matchers in order to find a match, so using mobile only traffic, you may see a decrease in performance. This is probably due to a new Android matching system that causes longer reduction in string comparisons in MySQL for unmatched UAs. Anyway, there are some optimizations that need to be made in the API that should bring performance back up to par. We are currently porting the best features from the DB API to the traditional WURFL APIs and vice-versa, so expect things to improve in the coming releases. If you are particularly interested in performance, you may want to check out the MySQL5_NestedSet DB adapter as well - this may improve performance a bit. Note that the rebuild process is a little slower due to indexing.
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!


Who is online

Users browsing this forum: No registered users and 2 guests