Pre-allocate memory in the replicator #463

Closed
opened 2023-06-25 10:54:18 +00:00 by fyrchik · 0 comments

We read an object, we decompress it and just throw all the memory in the GC.
We can preallocate thread-local slice and read/decompress in them.
After TrueCloudLab/frostfs-api#9 it could even be made zero-alloc (for the uncompressed case).

We probably need to use workers instead of a pool here. The trickiest part here is to allow changing the number of workers depending on the load. May be we can remove this logic now: current implementation has some quirks. For example, using only half of object.put.pool_size_remote threads tells replicator that is node is 50% loaded, but in reality we could be putting lot's of big objects. This is hard to fix until we have proper queues.

We read an object, we decompress it and just throw all the memory in the GC. We can preallocate thread-local slice and read/decompress in them. After https://git.frostfs.info/TrueCloudLab/frostfs-api/issues/9 it could even be made zero-alloc (for the uncompressed case). We probably need to use workers instead of a pool here. The trickiest part here is to allow changing the number of workers depending on the load. May be we can remove this logic now: current implementation has some quirks. For example, using only half of `object.put.pool_size_remote` threads tells replicator that is node is 50% loaded, but in reality we could be putting lot's of big objects. This is hard to fix until we have proper queues.
fyrchik added the
enhancement
discussion
frostfs-node
triage
labels 2023-06-25 10:54:18 +00:00
fyrchik added this to the v0.38.0 milestone 2023-06-27 06:53:58 +00:00
dstepanov-yadro self-assigned this 2023-07-07 14:59:42 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#463
There is no content yet.