-
Notifications
You must be signed in to change notification settings - Fork 85
chore(benchmarks): Add in optional warmup to benchmarks #2359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments, though I know this is still in draft so I know you may be aware of these already.
...arking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java
Outdated
Show resolved
Hide resolved
storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java
Outdated
Show resolved
Hide resolved
...arking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments, overall looks good to me. Thanks for your work getting this going.
| description = "Specify the path where the temporary directory should be located") | ||
| String tempDirLocation; | ||
|
|
||
| @Option(names = "-warmup", description = "Warmup in seconds", defaultValue = "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe be a little more specific about what this means.
| long startTime = System.currentTimeMillis(); | ||
| long endTime = startTime + (warmup * 1000); | ||
| // Run Warmup | ||
| while (System.currentTimeMillis() < endTime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems perhaps a little confusing to have this as just a few lines within W1R3 rather than as a separate method. Not a java expert here but maybe it's better to factor this out for ease of readability and/or sharing with other workloads?
storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java
Outdated
Show resolved
Hide resolved
...arking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM aside from the open question about number of workers. You might also want to get a review from @frankyn on Java.
...arking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sydney-munro, from our offline conversation, this PR is not yet ready, so some of my comment may not be relevant after the change is verified to work and is cleaned up.
I'll re-review once ready, but overall LGTM.
...arking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java
Show resolved
Hide resolved
...arking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sydney, a couple questions.
| List<ApiFuture<String>> workloadRuns = new ArrayList<>(); | ||
| Range objectSizeRange = Range.of(objectSize); | ||
| for (int i = 0; i < samples; i++) { | ||
| runWarmup(storageClient); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting - so if you request 5 samples, it will run the warmup for every sample?
For SSB I guess it doesn't matter, because we only request one sample (unless it were server mode, which would require other changes too and we're not sure is needed yet for Java). But in general, I would expect the application only need to warm up once in the beginning, unless there are some specifics of the Java implementation I'm not aware of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this; good catch. This line needs to be moved out of the loop;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was told when syncing with @tritone that a warmup was expected for every datapoint. am I mistaken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, it just occurred to me that on a single threaded benchmark, the connections for the later data points may be in fact less warmed than the first ones, since the warmups are done with multiple threads. But, that applies in Go, not sure for Java. The effect may also be negligible within a certain time frame.
For consistency and because we aren't sure the effect of the warmups yet in Java, I'd say move this line out of the loop. It's easier to test with the line outside of the loop, since it's not multiplying the warmup period by the number of the sample.
For SSB workload 1, yes, every data point needs to be warmed but that's because every data point runs on a fresh client. In this case the client is used across samples so it's already warmed up. Outside of the single (or perhaps low) threaded benchmarks, spending more time warming is not necessary.
No description provided.