-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RAM leakage in blobfuse2 > 2.3.0 #1639
Comments
How many files do you have in your container which shall list as part of this mount ? |
Hi, Per one test (around 4000 tasks), we are producing ~10 small files per task with 800 tasks per minute ratio One container is used for writing and reading of small files, mostly JSONs (reads are performed only after write is done, there is no integrity issue). |
As you are using block-cache and you have not set any upper limit on the cache usage, each blobfuse instance running will try to use 80% of the available memory by default. Dur to multiple instnaces your memory is running low. You need to set a max memory usage limit for blockc-cahe using |
I thought about it, but for version 2.3.0 limit was set to 4GB and process was using constantly 500-600 MB memory under load and it never reached this 4GB limit. |
With autoconfig we reserve 80% of memory space in single instance, assuming all resources are at our dispersal. If you are running multiple instances then you will need to manually restrict the memory usage. This might solve the problem. Try it out and let us know if that helps. |
We are testing However it is a bit concerning that this limit is out of scope on Kubernetes. How do I make sure that my node doesn't die due to OOM when |
By default it asks OS about the total memory available on the system and then takes 80% of it. So if there are multiple instances are started in parallel then all may end up having the same value and thus they may end up over running the total limits. Restricting it manually might be the only option here I feel. |
Ok I get it, question is why does it keeps allocating so much memory and doesn't release any in newest versions. In version With Should I expect significant performance issues if I set all PV to Was there some different memory management for block cache back in |
In either version it shall not continuously rise. At certain point it shall stablize. Some of the memory related issues we have found recently are due to Go version upgrade and we are actively working on those. |
Please refrain from using 2.3.0, there are many known data integrity issues, I suggest using the latest release. |
In our use case it doesn't stabilize for
Thanks for explanation, appreciate it. Just last one thing I would love to understand is how setting We are working mostly with small files. Would setting this value to higher number be required if we would operate on blobs bigger than 600 MB? I am trying to understand what would work best for our use case and what impact this setting has on performance of the node (considering we have few |
No, doing operations on bigger blobs dont need more memory size Do you see any perf difference when using 600M as memsize for your usecase in the latest release? |
We did few rounds of testing today. Each performance test takes around 15 minutes and produces around 120k files. 2.3.0 -> no We will also perform more tests in upcoming days on bigger nodes, but results look good. A note from my observation for version However logic for default limit of 80% host memory seems a bit off. I am not Go expert, but I checked the code and I don't see any guard that prevents OOM on the system in situation similar to described above. In containerized environment it most likely would happen on all nodes at the same time since traffic is distributed evenly in most commons scenarios and it blows up entire worker node pool. Cluster recovery in our case takes up to 1 hour. |
Constraints were placed in the code taking the fact that only one blobfuse instance would run per VM but after looking into your scenario, I think we should reconsider some things. Thanks for pointing out. |
Thanks! Would be great, since - best to my knowledge - it is considered best practice to split data between multiple containers instead of putting everything to single one and it means running more than one blobfuse process on the node. |
Hello,
Related to previously closed issue: #1617
We are using blobfuse2 on AKS via CSI blob driver, latest version.
Few days ago we upgraded node pool to latest image and it automatically installed blobfuse version 2.4.0
When we ran our performance tests, nodes started to transition to NotReady state after very short period of time.
After conducting debug session, we realized
blobfuse2
is not freeing RAM at all. It just keep growing until host becomes unresponsive due to lack of memory.I conducted tests on following blobfuse2 versions:
We are using Blob CSI via PV (RBAC UAMI auth) using below mount options:
We are using blob cache due to file cache limit (it doesn't clean up folders and inode limit is reached)
We tried
-o direct_io
but performance was very poor and not acceptable by our SLAAny suggestions are welcome, thanks!
The text was updated successfully, but these errors were encountered: