3 ms·
V8 has a very impressive garbage collector (stop-the-world, generational, accurate) and the GC is probably a part the Google team have spent a lot of time tunin
by amix 16y ago
V8 has a very impressive garbage collector (stop-the-world, generational, accurate) and the GC is probably a part the Google team have spent a lot of time tuning and working on as it's one of the harder and most important parts of building a VM...
My guess is that node's GC configuration isn't finely tuned for 25KB structures or maybe the GC is called prematurely.
Some suggestions: try to turn off the GC and re-do the benchmark, try with smaller JSON datastructures, try with different versions of node. Each of these would give more evidence where the problem is.
Btw. in that benchmark: which versions of RingoJS and node.js are used? How much memory does each server use in the end?
Edit:
What type of garbage collector does RingoJS/Rhino use - how is the GC configured for RingoJS?
- hannesw 16y agoMost of these questions are answered in my original, longer post: http://hns.github.com/2010/09/21/benchmark.html http://hns.github.com/2010/09/21/benchmark.html. The JSON I'm parsing is just objects with short string properties (around 10 characters). There's just one longer 25kb JSON string but that is never collected. As to Node configuration, can you provide some specific options to use? I've been asking about this on #node.js (and ryan) and I'm open to any suggestions. Ringo is running with the server hotspot JVM without any further options.
- xearl 16y agoPer default, Java 6 uses a generational collector with multi-threaded stop-the-world copying for the young generation and single-threaded stop-the-world mark-sweep-compact for the tenured generation.