-
Notifications
You must be signed in to change notification settings - Fork 107
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
handle forget inline instead of in goroutine #30
Conversation
There are some potential performance and deadlock issues that I'm trying to
So I'm happy with this overall. Could you please make a few changes though?
|
when we are under memory pressure, or echo 3 > /proc/sys/vm/drop_caches, kernel can send us many forget ops at the same time if we have lots of inodes in memory. Running them all in goroutines can lead to even more memory usage and eventually OOM.
amended commit with comments |
Thanks! |
in jacobsa#30 forgetinode was changed into inline ServerOps, this may solove memory oom, but the performance of rm op will be very slow, and it will also hang other ops, so i think add a goroutine pool to limit the max num of forgetinode goroutines, but not affect the performance
in jacobsa#30 forgetinode was changed into inline ServerOps, this may solove memory oom, but the performance of rm op will be very slow, and it will also hang other ops, so i think limit the max num of forgetinode goroutines, this can avoid oom but not affect performance
in jacobsa#30 forgetinode was changed into inline ServerOps, this may solove memory oom, but the performance of rm op will be very slow, and it will also hang other ops, so i think limit the max num of forgetinode goroutines, this can avoid oom but not affect performance
when we are under memory pressure, or echo 3 > /proc/sys/vm/drop_caches,
kernel can send us many forget ops at the same time if we have lots of
inodes in memory. Running them all in goroutines can lead to even more
memory usage and eventually OOM.