Fix for slab buffer retention, leading to large memory consumption - #153
Conversation
|
Putting this on hold as I believe that a node core fix is the most appropriate. Buffer can also retain an 8k slab on it's own, ideally node core should emit a buffer that is not backed by any slab. |
|
Thanks for looking into it, though. Have you sent a pullreq to the joyent/node repo? |
|
Not getting very far at the moment though. If you feel this should be a node core change then please add your comments. Thanks. |
|
@einaros I think it makes sense to pull this anyways, as it's probably going to take a while before node fixes their shit. I've seen great reduction in memory usage for the |
|
@3rd-Eden, I'm good with that. I'll merge it later today. Also, you've got push access to the repo now, so you are free to make such changes as well :) |
Fix for slab buffer retention, leading to large memory consumption
|
@einaros Yeah, thanks for that :) Just wanted to get your opinion on this. |
|
Note that this is being worked on in node core: nodejs/node-v0.x-archive#4964. The buffer copy in this fix may not be required once node core buffer is fixed. The fix here shouldn't hurt performance if left in, but worth checking once node core is updated. |
|
for anyone who might want to test, the SlabAllocator has been completely removed from my working branch (https://github.com/trevnorris/node/tree/buffer-buffet). Would be interested to know if this fixes the memory leak. |
See: https://github.com/jmatthewsr-ms/node-slab-memory-issues