|
|
|
|
|
by cospaia
1593 days ago
|
|
Thanks Hacker News for helping me solve that mystery with performance in my Java program. Now I only have the problem left to solve. (And some of you might learn a thing or two about deployment of programs where performance is of utter importance.) |
|
the ByteBuffer strategy is potentially an option if they won't give you access to the numa syscalls. if you are able to test what numa node the memory is allocated on then you can just keep allocating memory until it is assigned to the correct node. the problem is working out when the allocation is on the correct node. linux has a syscall for this move_pages() which can also be used to move the memory to where you want it but this is blocked by docker as well. but at a minimum there is a difference in timing that is observable so potentially you could exploit that to try to allocate to an optimal numa node.
here is the list of syscalls you have access to by default on docker: https://github.com/moby/moby/blob/master/profiles/seccomp/de...
unfortunately, all the useful numa ones are not on the whitelist.