Closed aroundthfur closed 2 years ago
Possible this would fix your problem: https://github.com/pascomnet/nomad-driver-lxc/commit/d13ba27c3447e64a888fbef4ecc2600e86169cd9
You can try to compile and test this forked version. Be aware that it contains some other changes as well. I would, of course, contribute/port some of the changes if it helps you.
Thanks! I tried this but after some further testing i realized that the issue is not just releasing memory after the task is destroy/stopped, but rather that during a lifetime of the container, the driver keeps increasing memory usage.
After a while this ends up being a lot and i am not sure what is the driver actually using the memory for.
Did you ever encounter such behaviour?
Sorry, no. We're not using it in production. I would assume that it maybe leaks some bytes in the periodical stats collector.
Ahh yes, thank you for the hint! I will investigate this and report back if I manage to find something.
I have noticed that the driver never releases the memory (RAM) taken for each allocation, after the allocation (e.g. LXC Container) is destroyed and GC-ed. This leads to a very high memory consumption after a while, since the driver just accumulates the memory it "needs".
I suspect this is not a 'normal' behaviour, but I have not yet found the place where this should be fixed/implemented in the code. Comparing the Docker driver with LXC, it seems to me that the same actions are taken in the
DestroyTask(taskID string, force bool) error
(1) callback.Did anyone else experience this issue so far?
My environment:
Any advice would be appreciated. Also if you need more information from my side, let me know!
(1): https://nomadproject.io/docs/internals/plugins/task-drivers/#destroytasktaskid-string-force-bool-error