Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
We eliminated 99% of networking memory allocations with enhanced buffer pooling (gvisor.dev)
45 points by todsacerdoti on Oct 26, 2022 | hide | past | favorite | 4 comments


The buffer pool structure introduced here is really interesting, it's the second one I've read of lately that introduces a tiered frame-size architecture.

So rather than each frame slot being, say, PAGE_SIZE, you have multiple frame slot sizes in the buffer pool.

What is different about this gVisor implementation is that the frame sizes seemed to be all mixed up with each other?

IE, from the example image, the below seems like a valid layout:

  [1024, 512, 256]
The other implementation that I am aware of (Umbra, a research DB) uses multiple, independent pools which are overlayed on top of each other using independent mmap() anonymous calls.

https://db.in.tum.de/~freitag/papers/p29-neumann-cidr20.pdf

This is more understandable (to me) because you can use a hash map look up (well, more likely in production, some kind of "&" with hash keys) to index into the size tier you want, like:

  > buffer_pool_frames[size_3][frame_10]


I don't see the benefit of this except in extreme memory confined areas which are probably not the best place for a object/buffer pool anyway


Isn't this the same sort of concept as a slab allocator?


This could also be Titled: Allocating memory once is faster than allocating memory more than once




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: