Storing large buffers in memory

17 views
Skip to first unread message

quantum

unread,
Dec 8, 2010, 4:18:32 AM12/8/10
to nodejs
I'm storing relatively large buffers (1Kb - 250Kb) in memory (eg. in a
list of buffers).
The buffers are discarded after being sent to clients, they generally
live not more than 2 minutes.

The number of buffers stored in-memory can be up to several thousands
in the production version.

Has anyone tried something similar ?
How does recycling large buffers impact performance and actual memory
usage of node?
Will the script get clogged in garbage collection from time to time ?

Thanks,
Florin

Matt Ranney

unread,
Dec 8, 2010, 5:05:33 PM12/8/10
to nod...@googlegroups.com
The good news here is that buffers are allocated outside of the V8 heap.  The GC cost you pay with buffers seems to correspond more to the number of buffers rather than the size of them.
Reply all
Reply to author
Forward
0 new messages