-
Notifications
You must be signed in to change notification settings - Fork 21
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
putMany uses as many FDs as there are entries #36
Comments
|
A possible strategy to address that issue could be to rework Lines 560 to 574 in ff6502b
closer(maxOpen int) that would be called after every writes to introduce an upper bound of open files within a single large putMany . This function would close the oldest opened files (that should already be flushed on disk by now) but also keep the youngest open to leave the kernel time to flush when it makes sense.
Line 613 in ff6502b
closer(0) , sharing the same logic.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current implementation of putMany seems to open as many FDs as there are entries to put, with batches few K in size this will cause
too many files open
errors.https://github.com/ipfs/go-ds-flatfs/blob/master/flatfs.go#L422
The text was updated successfully, but these errors were encountered: