Improve multipart removal speed #559
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#559
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
After #63 multipart object is a list of multiple native FrostFS objects. To delete such object, gateway sends
object.Delete
request on every part consecutively. This is not very efficient for large multipart objects, which may consist up to 10 000 parts and most clients run out of time.Describe the solution you'd like
To improve removal efficiency there are some new changes.
Replace
object.Delete
operation withobject.Put
operation. Tombstone object may consist multiple objects, so it is more efficient to group them and not having separate tombstone for every object part. However there is still trade-off between tombstone size andobject.Put
duration. It will improve over time with frostfs-node#1450, though. So we have to decide on what tombstone size is suitable for different environments.Send tombstones in pool of go routines.
These two changes should improve removal speed.
Describe alternatives you've considered
Postponed removal. This might be an evolution of proposal: create an async queue and store here all parts to remove. This may be done by external services such as lifecycler service.
Just to be clear: packing everything in one tombstone is the fastest solution, because we still eventually need to remove every ID in the list. So it is 1 30-second requests vs 30 1-second requests. Experimental data obtained by @a-savchuk supports this TrueCloudLab/frostfs-node#1450 (comment)
That said, we still might hit node timeouts.
Regarding your first point, doing tombstone PUT looks a lot better to me, as it doesn't create session and may lead to a simpler APE chain set.
DeleteObject
#1572