Open mwiget opened 5 years ago
Hmm, not clear the issue is within config load. After trying to load a new config a few times, I ran out of hugepages and get the following errors from the running snabb instances being reconfigured:
hugetlb mmap failed (Cannot allocate memory), falling back.
hugetlb mmap failed (Cannot allocate memory), falling back.
hugetlb mmap failed (Cannot allocate memory), falling back.
hugetlb mmap failed (Cannot allocate memory), falling back.
Yeah, the hugepages are released once the target snabb process and workers have terminated. This makes be believe, the issue is within the target snabb process or my false understanding on how to use snabb config ;-).
Running
snabb config load
consumes 16 x 1GB hugepages during the process but doesn't free them when finished. Runningsnabb lwaftr compile-configuration
also consumes hugepages but they are properly released:Now running
compile-configuration
:Running snabb version with this latest commit:
I do see Mem:grow_buffer() being called many times (lib/stream/mem.lua) asking for 1024 bytes, which is handled by the func new_buffer(), which is in fact calling ffi.new('uint8_t[?]', len).