Skip to content

Conversation

@ADustyOldMuffin
Copy link
Collaborator

This will run a perf test on a given S3 bucket reading a set amount of objects in 16KiB blocks to simulate a real world workload on an object store.

@github-actions
Copy link

github-actions bot commented Mar 6, 2025

This will run a perf test on a given S3 bucket reading a set amount of objects in 16KiB blocks to simulate a real world workload on an object store.
@ADustyOldMuffin ADustyOldMuffin force-pushed the dhix/add-s3-perf-test branch from 41c4de8 to ad7d764 Compare March 6, 2025 17:38
@github-actions
Copy link

github-actions bot commented Mar 6, 2025

@github-actions
Copy link

github-actions bot commented Mar 6, 2025

@ADustyOldMuffin ADustyOldMuffin force-pushed the dhix/add-s3-perf-test branch from 73eb297 to ec41135 Compare March 7, 2025 23:55
@github-actions
Copy link

github-actions bot commented Mar 7, 2025

@ADustyOldMuffin ADustyOldMuffin force-pushed the dhix/add-s3-perf-test branch from ec41135 to 90ad860 Compare March 8, 2025 00:41
@github-actions
Copy link

github-actions bot commented Mar 8, 2025

@ADustyOldMuffin ADustyOldMuffin force-pushed the dhix/add-s3-perf-test branch from 90ad860 to c99ba0c Compare March 8, 2025 00:55
@github-actions
Copy link

github-actions bot commented Mar 8, 2025

Copy link

@codyohl codyohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!


"github.com/hashicorp/go-cleanhttp"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/minio/minio-go/v7"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious: why the minio client?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Far more convenient essentially! No code for endpoint resolvers, pointers, etc. Per is more or less the same since they both use the underlying net/http.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, makes sense!

for i := range threads {
wg.Add(1)
go func() {
result := runTest(ctx, params, i)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something that's nice is the ability for all the tests on different nodes to coordinate enough to gang-schedule themselves at approximately the exact same time in the cluster (esp. for various types of workloads)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sort of like a sync barrier almost?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sort of like a sync barrier almost?

yes, precisely that (we use NFS for coordination, since it needs to be low-dep / cluster agnostic ideally)

continue
}

amount, err := io.Copy(io.Discard, resp)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if developing write workloads as well, I've found pooling/buffer reuse helpful

s3Client, err := minio.New(endpoint, &minio.Options{
Creds: credentials.NewStaticV4(accessKeyID, secretKey, ""),
Secure: ssl,
Transport: transport,
Copy link

@codyohl codyohl Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious, why this http transport implementation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanhttp just sets sane defaults on the normal golang net/http. I then took some known good defaults for specifically load testing and then overwrite the defaults that the cleanhttp doesn't set/sets to something I don't want. Essentially its just a quicker short hand, but realistically not needed.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, thx!

@wbrown
Copy link
Contributor

wbrown commented Apr 11, 2025

@ADustyOldMuffin Are we done with this? Merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants