Add local targets #14

Closed
opened 2023-02-24 14:57:13 +00:00 by fyrchik · 9 comments
fyrchik commented 2023-02-24 14:57:13 +00:00 (Migrated from github.com)

Sometimes we want to perform benchmark on a filled cluster. Filling it with gRPC is fast, but not enough: we are talking about weeks, not hours. Writing a separate utility for this is a dead-end scenario IMO: it has only 1 use-case, maintenance costs are non-negligible, users need to learn yet another CLI interface (and, of course, inevitable bugs in the implementation).

The proposal is to use implement local client:

  1. Use engine from frostfs-node.
  2. Execute k6 on a target hardware using new local.js scenario.
  3. Policer/tree service sync will do the rest.

Pros:

  1. The results can be compared with gRPC results to see the overhead we have.
  2. Easily automated to test for regressions. Local benchmarks in the frostfs-node are not suitable for this: they are usually not long/big enough.
  3. S3 is also easily supported: engine exports all necessary machinery.

Cons:

  1. Harder to maintain compatibility: we need to update k6 each time engine is updated. However, it isn't impossible: the engine interface changes very rarely.
  2. Importing frostfs-node here is not aestethically pleasing IMO.

cc @anikeev-yadro @realloc @carpawell @alexvanin

Sometimes we want to perform benchmark on a filled cluster. Filling it with gRPC is fast, but not enough: we are talking about weeks, not hours. Writing a separate utility for this is a dead-end scenario IMO: it has only 1 use-case, maintenance costs are non-negligible, users need to learn yet another CLI interface (and, of course, inevitable bugs in the implementation). The proposal is to use implement local client: 1. Use `engine` from `frostfs-node`. 2. Execute k6 on a target hardware using new `local.js` scenario. 3. Policer/tree service sync will do the rest. Pros: 1. The results can be compared with gRPC results to see the overhead we have. 2. Easily automated to test for regressions. Local benchmarks in the `frostfs-node` are not suitable for this: they are usually not long/big enough. 4. S3 is also easily supported: engine exports all necessary machinery. Cons: 1. Harder to maintain compatibility: we need to update k6 each time engine is updated. However, it isn't impossible: the engine interface changes _very_ rarely. 2. Importing `frostfs-node` here is not aestethically pleasing IMO. cc @anikeev-yadro @realloc @carpawell @alexvanin
realloc commented 2023-02-24 17:59:10 +00:00 (Migrated from github.com)

S3 is also easily supported: engine exports all necessary machinery.

Could you please clarify here a bit? Do you mean handling both tree service calls and storage engine calls in "S3-local" case?

> S3 is also easily supported: engine exports all necessary machinery. Could you please clarify here a bit? Do you mean handling both tree service calls and storage engine calls in "S3-local" case?
fyrchik commented 2023-02-28 07:07:46 +00:00 (Migrated from github.com)

Yes. Tree service is just a wrapper over the engine, we can work with pilorama directly.
The only difficulty is knowing the tree structure for a bucket, but our bench is simple enough (flat structure, single version).

Yes. Tree service is just a wrapper over the engine, we can work with pilorama directly. The only difficulty is knowing the tree structure for a bucket, but our bench is simple enough (flat structure, single version).
realloc commented 2023-02-28 07:57:18 +00:00 (Migrated from github.com)

There is one more benchmark for versioned objects case where we put a loooong chain of versions for an object.
Ok. LGTM =)

There is one more benchmark for versioned objects case where we put a loooong chain of versions for an object. Ok. LGTM =)
ale64bit was assigned by fyrchik 2023-03-09 07:40:50 +00:00

It would be nice to allow setting NoSync for all subcomponents too.
While we could change the configuration (and then forget to change it back), a flag can make it easier.

It would be nice to allow setting `NoSync` for all subcomponents too. While we could change the configuration (and then forget to change it back), a flag can make it easier.
alexvanin added the
P0
label 2023-03-10 09:11:37 +00:00

Closed by accident, S3 still left.

Closed by accident, S3 still left.
fyrchik reopened this issue 2023-03-27 11:30:00 +00:00
Collaborator

@fyrchik Could you clarify how much of S3 would you like to actually run in the local S3 scenario? I see the following possibilities:

  1. Use only the recently merged NewTree and emulate the corresponding tree service calls using the existing local client, by directly invoking the tree service methods. This seems error prone and needs to be kept in sync.
  2. Use layer.NewLayer and provide a test implementation of frostfs.FrostFS along with a tree service implementation based on engine. This also seems error prone.
  3. Same as 2. but use the production frostfs.FrostFS. However, this requires that we are able to override the pool.Pool instance somehow.

Neither seems quite optimal to me, so hoping to hear your thoughts.

/cc @alexvanin @dkirillov

@fyrchik Could you clarify how much of S3 would you like to actually run in the local S3 scenario? I see the following possibilities: 1. Use only the recently merged [NewTree](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/branch/master/pkg/service/tree/tree.go#L107) and emulate the corresponding tree service calls using the existing `local` client, by directly invoking the tree service methods. This seems error prone and needs to be kept in sync. 2. Use [layer.NewLayer](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/5c62010331ad5771fd6787ec0e1993b69c439b32/api/layer/layer.go#L271) and provide a test implementation of `frostfs.FrostFS` along with a tree service implementation based on `engine`. This also seems error prone. 3. Same as 2. but use the production [frostfs.FrostFS](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/5c62010331ad5771fd6787ec0e1993b69c439b32/internal/frostfs/frostfs.go#L32). However, this requires that we are able to override the `pool.Pool` instance somehow. Neither seems quite optimal to me, so hoping to hear your thoughts. /cc @alexvanin @dkirillov

To me (2) is ok: we do not use a lot of methods, just PUT/GET and the hardest part here is to copy the logic for a tree service.

To me (2) is ok: we do not use a lot of methods, just PUT/GET and the hardest part here is to copy the logic for a tree service.
fyrchik referenced this issue from a commit 2023-04-13 13:00:39 +00:00
Collaborator

@fyrchik Should we close now after #48?

@fyrchik Should we close now after https://git.frostfs.info/TrueCloudLab/xk6-frostfs/pulls/48?

Closed via #35, #48.

Closed via #35, #48.
Sign in to join this conversation.
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.

Blocks
Reference: TrueCloudLab/xk6-frostfs#14
There is no content yet.