[tbb-dev] Memory Allocators

Arlo Breault arlo at torproject.org
Tue May 12 04:43:24 UTC 2015


On Monday, May 11, 2015 at 11:59 AM, Tom Ritter wrote:
> ESR38 isn't going to have jemalloc3. But the code is in the FF tree,
> well-integrated, and while I wouldn't call it 'supported', the mozilla
> devs are at least pretty familiar with it. I wanted to see if there
> was anything that would stop Tor from potentially using it even if FF
> isn't.
> 
> The mozilla bug is https://bugzilla.mozilla.org/show_bug.cgi?id=762449
> 
> Their concerns are, at least:
> - mismatched calls to VirtualAlloc/Free:
> https://github.com/jemalloc/jemalloc/issues/213 (This can be resolved
> by a patch in comment #1 which is slower than they'd like)
> - performance concerns
> - I think there are issues on mobile platforms, but I'm not entirely
> clear there
> 
> There are probably more, but these were the ones I was able to
> discern. I decided to test the performance question, with and without
> the patch. I ran a slew of in-browser benchmark sites on an Ubuntu
> desktop, running mozilla-release tag FIREFOX_38_0_RELEASE.
> 
> The results are close, and it looks like the current jemalloc (2?)
> outperforms jemalloc3, but that jemalloc3 (even with the patch) is not
> significantly more painful. Both compare favorably to chromium for
> instance.
> 
> http://imgur.com/a/A6TV9
> 
> Bigger is better for all but the last chart (which labels it in the title).
> 
> 
> If Tor wanted to consider turning on jemalloc3 in TBB, I would suggest
> the following:
> 1) Seeing if the heap isolation based on class of object (e.g. js
> strings/arrays) is implemented, and if not, what it would take to do
> so. If it's not there and it's hard to do, there's not much point to
> turning to jemalloc3

Some relevant links about heap partitioning in FF,
http://guilherme-pg.com/2014/10/15/Partitioned-heap-in-Firefox-pt1.html
http://guilherme-pg.com/2015/03/03/Partitioned-heap-in-Firefox-pt2.html
 
> 2) Round up the mozilla devs and lay it out as a real possibility and
> get their input
> 
> I will work on #1 as I'm able.
> 
> -tom
> 
> 
> Benchmarks:
> http://peacekeeper.futuremark.com
> http://browsermark.rightware.com/
> http://dromaeo.com/
> http://v8.googlecode.com/svn/data/benchmarks/v7/run.html
> http://octane-benchmark.googlecode.com/svn/latest/index.html
> http://browserbench.org/Speedometer/
> http://browserbench.org/JetStream/
> http://v8.googlecode.com/svn/branches/bleeding_edge/benchmarks/spinning-balls/index.html
> http://www.webkit.org/perf/sunspider/sunspider.html
> http://krakenbenchmark.mozilla.org/index.html
> _______________________________________________
> tbb-dev mailing list
> tbb-dev at lists.torproject.org (mailto:tbb-dev at lists.torproject.org)
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tbb-dev





More information about the tbb-dev mailing list