Closed pauldeng closed 1 month ago
@pauldeng
The OS can take a while to release memory or may not release it until it needs too. There is nothing specific here and its likely just what your os is setup to do. Its quite common to see memory increases like this. You can try to use valgrind to see if there are actually any leaks.
The following test can prove whether dufs has a memory leak:
Run dufs with docker and limit the memory to 20m
docker run -d --name dufs -p 5000:5000 -m 20m sigoden/dufs
Generate loads
while true; do ab -n 20000 -c 30 http://localhost:5000/; done
If dufs has a memory leak, the docker container will be killed due to OOM. But from my own actual test, this is not the case.
So dufs does not have a memory leak.
Problem
Thank you for the great project.
I see that memory usage growing gradually and never released until I restart the application. This could be memory leak but need your help to guide me on how to debug.
My application is data collection from thousands of embedded devices. Embedded devices HTTP Post file to DUFS.
Memory usage increase rate is like 0.5MB per minute. Last time, it reached 2.1GB of usage out of 4GB total and DUFS CPU usage skyrocket. Restart DUFS fix the problem temporarily. Configuration
Log
Not sure if this is the root cause of the problem:
Environment: