Memory limits

977 views
Skip to first unread message

leei

unread,
May 26, 2011, 3:27:44 PM5/26/11
to nodejs
How concerning is the small (512M for 32bit and 1GB for 64bit) V8/
node.js address space for you all. It's bitten me a couple of times
and since it wasn't explicit anywhere in the documentation (either for
V8 or node.js) it lead to some serious time wasting behaviour trying
to track down leaks and/or means of extending the limit.

Is it worth anyone in the community's trouble to fix this seriously
broken constraint in the GC?

Aaron Krill

unread,
May 26, 2011, 3:33:34 PM5/26/11
to nod...@googlegroups.com
"meh"


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.


Bradley Meck

unread,
May 26, 2011, 3:36:44 PM5/26/11
to nod...@googlegroups.com
just spawn up some workers / separate out your logic from your persistent memory (use a db of some kind if you need mass storage generally). I have abused node pretty bad, and have not seen an out of memory caused error if I was not doing something wrong. on the plus side, if you do separate out persistent memory / logic, scaling across multiple machines is pretty darn easy.

Mariano Iglesias

unread,
May 26, 2011, 3:48:13 PM5/26/11
to nod...@googlegroups.com
child_process.fork() is particularly useful for spawning node.js
workers in separate v8 instances:

https://github.com/joyent/node/blob/master/doc/api/child_processes.markdown

Vyacheslav Egorov

unread,
May 26, 2011, 3:50:34 PM5/26/11
to nod...@googlegroups.com
> How concerning is the small (512M for 32bit and 1GB for 64bit) V8/
> node.js address space for you all.

"Hard" limit is ~1gb on ia32 and ~1.7gb on x64.

512mb (1gb) are just default "soft" limits; they are configurable
through --max-old-space-size

--
Vyacheslav Egorov

Ted Young

unread,
May 26, 2011, 4:10:42 PM5/26/11
to nod...@googlegroups.com
I added this to the FAQ: https://github.com/joyent/node/wiki/FAQ

Where do you set --max-old-space-size? When compiling node?

Ted Young
radicalDesigns
(415) 738 0456
t...@radicaldesigns.org

Vyacheslav Egorov

unread,
May 26, 2011, 4:14:48 PM5/26/11
to nod...@googlegroups.com
This is the flag to pass when you start node.

--
Vyacheslav Egorov

leei

unread,
May 26, 2011, 5:48:17 PM5/26/11
to nodejs


On May 26, 12:50 pm, Vyacheslav Egorov <vego...@chromium.org> wrote:
> > How concerning is the small (512M for 32bit and 1GB for 64bit) V8/
> > node.js address space for you all.
>
> "Hard" limit is ~1gb on ia32 and ~1.7gb on x64.
>
> 512mb (1gb) are just default "soft" limits; they are configurable
> through --max-old-space-size

OK, but still... A big part of the whole 64bit world is much larger
memory space. Sometimes I really do want 2GB in an array, and when
I'm sitting on 16GB of RAM, there's no good reason to say "oh, just
break it up into smaller chunks". Programming time costs a lot more
money than a little bit of core mem.

Matt

unread,
May 26, 2011, 6:33:59 PM5/26/11
to nod...@googlegroups.com
I agree. I'd like to see this limit removed too. 

Marcel Laverdet

unread,
May 28, 2011, 12:54:50 PM5/28/11
to nod...@googlegroups.com
This issue is being tracked in v8's tracker:

> There is an experimental GC (developed on experimental/gc branch) which does not have any inherent limitations and is expected to have better throughput/lower pauses on large heaps but it still under active development.

Joran Greef

unread,
Aug 10, 2011, 8:34:18 AM8/10/11
to nod...@googlegroups.com
That's good news. I'm writing a database in Node that keeps indexes in memory. Removing the memory limit would help greatly.
Reply all
Reply to author
Forward
0 new messages