The sounds of TCmalloc in QtLauncher

It took a while but now I'm happy to announce that all core classes are inherited from FastAllocBase in WebCore. Further the previous changes in JavaScriptCore, by now almost the whole world is a subclass of FastAllocBase. :-)

Now, I want to show you the effect of TCmalloc on some bencmhark suites... In the most cases I used QtLauncher (QtWebKit, Qt-4.6.0) to measure the results. All performace results are in msecs and the memory consumption shows the maximum resident set size (RSS) in kbytes.

QtWebKit Performance Utilities - loading tests


The first benchmark is a modified version of the QtWebKitPerformanceUtilities which is maintained by Zecke. I benchmark, the loading tests which measure the loading time of web pages without rendering. This benchmark suite uses a special webserver, which mirrors real web content and serves the benchmark. All benchmarks run on the offical r53510 WebKit revison.

As the chart shows, the loading is faster a bit with TCmalloc than with the system allocator, but it uses more memory to achive this performance gain. This tendency suits for all of my measurements, the question is on the rates only. Is it worth to use TCmalloc?

Methanol (BBB) JavaScript benchmark


The second benchmark is Gabor Loki's JavaScript-based tool called Methanol, which loads and renders web pages one by one (currently, 9pages in 5 iterations). The time results are measured with this JavaScript tool as well.

TCmalloc performs better than System malloc with more than 7% speedup, but the memory consumption grows by 11% (it's only ~6Mbytes for 9 pages...). I think we could say that this is a good and acceptable result...

Now, I want to show you the results of the popular JavaScriptCore benchmarks suites, running in QtLauncher.

SunSpider in QtLauncher


Let's see the results of the SunSpider online benchmark:

TCmalloc yields almost 7% performance improvement on this benchmark also, but on the other side memory consumption grows by 15%.

V8 in QtLauncher


Changes on V8 benchmark:

In this case, TCmallos doesn't achive a real performance gain, but the memory consumption grows by 3.5% which means more than 5MB plus memory.

WindScorpion in QtLauncher


And now... Let's see our great really real-life benchmark collection (collected from public sites' JavaScripts) called WindScorpion.

TCmalloc gives a 13% better performance result than the system's default allocator and the memory loss is only 6.9%, which means only 3MB plus used memory.



I've put all results into the table below:

  Loading Methanol SunSpider V8 WindScorpion
perf. TCmalloc 999 ms 1 344 ms 571 ms 2 630 ms 15 034 ms
System malloc 1 029 ms 1 448 ms 608 ms 2 647 ms 16 975 ms
mem. TCmalloc 59 432 kB 61 807 kB 36 738 kB 151 100 kB 46 892 kB
System malloc 55 202 kB 55 622 kB 32 485 kB 145 772 kB 43 844 kB

The next steps will be to tweak TCmalloc parameters or try out some other allocators. :-)

İsmail Dönmez (not verified) - 02/02/2010 - 16:09

Benchmarking jemalloc on Windows would be interesting. Thanks!

zoltan.horvath - 02/02/2010 - 16:19

Actually, I'm benchmarking JEmalloc on Linux. I'll write soon about the results.

balazs.kelemen - 02/02/2010 - 17:24

BBB has been renamed to Methanol, and now it is available at gitorious: Pretty stable and effective benchmark.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • No HTML tags allowed
  • Lines and paragraphs break automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank