Comment #4 on issue 2483 by [email protected]: Creating large arrays fails
since r13237
http://code.google.com/p/v8/issues/detail?id=2483
I was using gc() to demonstrate a point but not, it would seem, clearly
enough. :-)
The behavior I'm seeing is that the maximum memory usage with 3.15.x is
much higher than with 3.11.x (what node.js v0.8 ships with) or 3.16.x.
Phrased differently: It seems the GC in 3.15.x is a lot more passive.
$ v0.8/out/Release/node --trace-gc
bisect/tmp/test-net-connect-memleak-old.js | awk '{print $4}' | sort -nr |
head -1
771.6
$ upgrade-v8/out/Release/node --trace-gc
bisect/tmp/test-net-connect-memleak-old.js | awk '{print $5}' | sort -nr |
head -1
771.2
$ master/out/Release/node --trace-gc
bisect/tmp/test-net-connect-memleak-old.js | awk '{print $5}' | sort -nr |
head -1
1283.2
$ cat bisect/tmp/test-net-connect-memleak-old.js
var common = { PORT: 12345 };
var assert = require('assert');
var net = require('net');
net.createServer(function() {}).listen(common.PORT);
function makejunk() {
// 2**26 == 64M entries
for (var i = 0, junk = [0]; i < 26; ++i) junk = junk.concat(junk);
return junk
}
(function() {
var junk = makejunk();
net.createConnection(common.PORT, '127.0.0.1', function() {
assert(junk.length != 0); // keep reference alive
setTimeout(done, 10);
});
})();
function done() {
for (var i = 0; i < 3; ++i) makejunk();
process.exit();
}
Peak memory usage is 66% higher here for no reason I can discern (I've been
going through the commit history). For the record, the V8 in master has
been upgraded to the HEAD of the 3.15 branch (r13524) for this run.
I guess the reason I'm bringing this up is part marketing, part
selfishness; I had trouble enough explaining the larger memory footprint
between v0.6 and v0.8 but back then, the GC became a lot faster because of
it. The current GC seems roughly comparable with v0.8's in terms of
throughput so that's going to be a much tougher sell. :-/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.