nspcc-dev / nspcc-dev/neofs-node
Preallocate fstree directories
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when we stat/mkdir during object put.
Describe the solution you'd like
I think we can preallocate to depth 2 right at fstree init (just a bit more than 3K directories). Theoretically depth 3 can be done in background, but maybe it's not worth it, needs to be tested. If we're to perform any background directory creation fstree config can be leveraged to mark tree as completely ready (allowing to avoid directory stat), see https://github.com/nspcc-dev/neofs-node/issues/2174#issuecomment-2939337843.
Describe alternatives you've considered
Things work as is.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating fstree initialization and the object-put path that currently stats or creates directories. Evaluate depth-2 preallocation and whether deeper creation should run in the background, including the related fstree configuration behavior described in the linked discussion. Done means the chosen approach is implemented and its directory-creation behavior is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100