Allow to pass custom gRPC chunk size for object put #79

Merged
fyrchik merged 1 commits from dstepanov-yadro/xk6-frostfs:feat/put-chunk-size into master 2023-07-26 21:08:04 +00:00

Relates TrueCloudLab/frostfs-node#77

Also removed buf size variable. Now we use constant for get requests. For put requests default value used if not chunk size provided. If chunk size provided, then it will be used as buf size.

Relates https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/77 Also removed buf size variable. Now we use constant for get requests. For put requests default value used if not chunk size provided. If chunk size provided, then it will be used as buf size.
dstepanov-yadro force-pushed feat/put-chunk-size from f8cfc0710c to 65043620b5 2023-07-05 12:37:40 +00:00 Compare
dstepanov-yadro force-pushed feat/put-chunk-size from 65043620b5 to 896749c568 2023-07-05 12:48:10 +00:00 Compare
dstepanov-yadro force-pushed feat/put-chunk-size from 896749c568 to c5e7a41bfd 2023-07-05 12:50:42 +00:00 Compare
dstepanov-yadro changed title from Allow to pass custom gRPC chunk size for object put to WIP: Allow to pass custom gRPC chunk size for object put 2023-07-05 12:51:39 +00:00
fyrchik approved these changes 2023-07-05 13:00:42 +00:00
@ -130,3 +130,3 @@
const { payload, hash } = generator.genPayload(registry_enabled);
const resp = grpc_client.put(container, headers, payload);
const resp = grpc_client.put(container, headers, payload, __ENV.GRPC_CHUNK_SIZE ? parseInt(__ENV.GRPC_CHUNK_SIZE) : 0);

Can we move it to the init stage? Otherwise we are parsing this on each PUT.

Can we move it to the init stage? Otherwise we are parsing this on each `PUT`.
Poster
Collaborator

done

done
dstepanov-yadro force-pushed feat/put-chunk-size from c5e7a41bfd to 4ba50f65e7 2023-07-05 13:05:33 +00:00 Compare
dstepanov-yadro force-pushed feat/put-chunk-size from 4ba50f65e7 to d1bbd11fd4 2023-07-05 13:13:27 +00:00 Compare
dstepanov-yadro force-pushed feat/put-chunk-size from d1bbd11fd4 to 3ef8cd8322 2023-07-05 13:14:26 +00:00 Compare
dstepanov-yadro requested review from storage-core-committers 2023-07-05 13:35:45 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-07-05 13:35:45 +00:00
dstepanov-yadro changed title from WIP: Allow to pass custom gRPC chunk size for object put to Allow to pass custom gRPC chunk size for object put 2023-07-05 13:35:49 +00:00
dstepanov-yadro requested review from anikeev-yadro 2023-07-05 13:35:58 +00:00
fyrchik reviewed 2023-07-05 13:58:06 +00:00
@ -67,6 +67,7 @@ if (write_rate > 0) {
gracefulStop: '5s',
};
}
const write_grpc_chunk_size = 1024 * parseInt(__ENV.GRPC_CHUNK_SIZE || '0')

It is related to write, maybe put it close to other declarations, before the if?

It is related to write, maybe put it close to other declarations, before the `if`?
Poster
Collaborator
const pre_alloc_write_vus = parseInt(__ENV.PRE_ALLOC_WRITERS || '0');
const max_write_vus = parseInt(__ENV.MAX_WRITERS || pre_alloc_write_vus);
const write_rate = parseInt(__ENV.WRITE_RATE || '0');
if (write_rate > 0) {
    scenarios.write = {
        executor: 'constant-arrival-rate',
        duration: `${duration}s`,
        preAllocatedVUs: pre_alloc_write_vus,
        maxVUs: max_write_vus,
        rate: write_rate,
        timeUnit: time_unit,
        exec: 'obj_write', 
        gracefulStop: '5s',
    };
}
const write_grpc_chunk_size = 1024 * parseInt(__ENV.GRPC_CHUNK_SIZE || '0')

This is already next to the other write consts.

``` const pre_alloc_write_vus = parseInt(__ENV.PRE_ALLOC_WRITERS || '0'); const max_write_vus = parseInt(__ENV.MAX_WRITERS || pre_alloc_write_vus); const write_rate = parseInt(__ENV.WRITE_RATE || '0'); if (write_rate > 0) { scenarios.write = { executor: 'constant-arrival-rate', duration: `${duration}s`, preAllocatedVUs: pre_alloc_write_vus, maxVUs: max_write_vus, rate: write_rate, timeUnit: time_unit, exec: 'obj_write', gracefulStop: '5s', }; } const write_grpc_chunk_size = 1024 * parseInt(__ENV.GRPC_CHUNK_SIZE || '0') ``` This is already next to the other `write` consts.
fyrchik approved these changes 2023-07-05 13:58:10 +00:00
dstepanov-yadro force-pushed feat/put-chunk-size from 8631939162 to b4f2954034 2023-07-05 14:31:41 +00:00 Compare
acid-ant approved these changes 2023-07-06 07:42:38 +00:00
dstepanov-yadro force-pushed feat/put-chunk-size from b4f2954034 to 7ec6a4287d 2023-07-06 08:26:35 +00:00 Compare
dstepanov-yadro force-pushed feat/put-chunk-size from 7ec6a4287d to f633f9a64a 2023-07-06 08:27:40 +00:00 Compare
fyrchik approved these changes 2023-07-06 08:27:47 +00:00
fyrchik approved these changes 2023-07-06 08:28:16 +00:00
fyrchik merged commit f633f9a64a into master 2023-07-06 08:28:20 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
3 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/xk6-frostfs#79
There is no content yet.