Skip to content

DynamoDb Enhanced perf testing #1726

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

Merged
merged 4 commits into from
Mar 26, 2020
Merged

Conversation

dagnir
Copy link
Contributor

@dagnir dagnir commented Mar 19, 2020

Description

Tests overhead of GET and PUT item over the low level client, as well as
performance of those operations compared to the V1 mapper.

Motivation and Context

Testing

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Sorry, something went wrong.

@dagnir dagnir force-pushed the ddb-enh-perf-testing branch from 8c7102a to f02489a Compare March 19, 2020 16:41
@dagnir
Copy link
Contributor Author

dagnir commented Mar 19, 2020

Benchmark                                       (testItem)   Mode  Cnt      Score    Error  Units
EnhancedClientPutOverheadBenchmark.enhPutHuge          N/A  thrpt    8   6178.310 ± 21.855  ops/s
EnhancedClientPutOverheadBenchmark.enhPutSmall         N/A  thrpt    8  21834.816 ± 62.910  ops/s
EnhancedClientPutOverheadBenchmark.enhPutTiny          N/A  thrpt    8  24995.407 ± 49.975  ops/s
EnhancedClientPutOverheadBenchmark.llPut              TINY  thrpt    8  25125.061 ± 71.506  ops/s
EnhancedClientPutOverheadBenchmark.llPut             SMALL  thrpt    8  23217.554 ± 89.430  ops/s
EnhancedClientPutOverheadBenchmark.llPut              HUGE  thrpt    8   8534.843 ± 25.766  ops/s

@dagnir dagnir force-pushed the ddb-enh-perf-testing branch from f02489a to 32fb142 Compare March 19, 2020 20:14
@dagnir
Copy link
Contributor Author

dagnir commented Mar 19, 2020

Benchmark                                       (testItem)   Mode  Cnt      Score     Error  Units
EnhancedClientGetOverheadBenchmark.enhGet             TINY  thrpt    8  21985.693 ±  70.213  ops/s
EnhancedClientGetOverheadBenchmark.enhGet            SMALL  thrpt    8  18645.558 ± 129.404  ops/s
EnhancedClientGetOverheadBenchmark.enhGet             HUGE  thrpt    8   4751.360 ±  12.167  ops/s
EnhancedClientGetOverheadBenchmark.llGet              TINY  thrpt    8  23480.263 ±  79.170  ops/s
EnhancedClientGetOverheadBenchmark.llGet             SMALL  thrpt    8  21336.071 ±  63.168  ops/s
EnhancedClientGetOverheadBenchmark.llGet              HUGE  thrpt    8   6619.252 ±  20.321  ops/s
EnhancedClientPutOverheadBenchmark.enhPutHuge          N/A  thrpt    8   5905.032 ±  25.948  ops/s
EnhancedClientPutOverheadBenchmark.enhPutSmall         N/A  thrpt    8  20660.983 ±  63.780  ops/s
EnhancedClientPutOverheadBenchmark.enhPutTiny          N/A  thrpt    8  23994.051 ±  74.239  ops/s
EnhancedClientPutOverheadBenchmark.llPut              TINY  thrpt    8  24335.511 ±  88.384  ops/s
EnhancedClientPutOverheadBenchmark.llPut             SMALL  thrpt    8  21922.118 ±  31.407  ops/s
EnhancedClientPutOverheadBenchmark.llPut              HUGE  thrpt    8   8064.792 ±  22.985  ops/s

@dagnir dagnir force-pushed the ddb-enh-perf-testing branch 2 times, most recently from 868da82 to c801b53 Compare March 24, 2020 17:24
@dagnir dagnir changed the title [Do Not Merge]: WIP DynamoDb Enhanced perf testing DynamoDb Enhanced perf testing Mar 24, 2020
@dagnir dagnir marked this pull request as ready for review March 24, 2020 17:27
@dagnir dagnir force-pushed the ddb-enh-perf-testing branch 2 times, most recently from 4786064 to 77948bb Compare March 24, 2020 20:49
@dagnir dagnir requested a review from spfink March 24, 2020 20:57
@dagnir dagnir force-pushed the ddb-enh-perf-testing branch from 77948bb to 667b130 Compare March 24, 2020 22:05
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb-enhanced</artifactId>
<version>${awsjavasdk.version}-PREVIEW</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a TODO here so we don't forget?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

private static final AwsJsonProtocolFactory JSON_PROTOCOL_FACTORY = AwsJsonProtocolFactory
.builder()
.clientConfiguration(SdkClientConfiguration.builder()
.option(ENDPOINT, URI.create("https://dynamodb.amazonaws.com"))
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was to stop the numerous profile loader related log messages



@Benchmark
public Object llGet(TestState s) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can write out better method names here

b.setListAttr(Arrays.asList(randomS(),
randomS(),
randomS(),

Copy link
Contributor

Choose a reason for hiding this comment

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

Why the seemingly random new lines? Also can we just for loop something here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The lines break them up in to powers of 2. I can change to using a loop

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.11.748</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need v1 here long term? Once we have a good baseline for v2, can we just track v2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can remove it in the future, but while we're iterating on the performance we should have this in here.

@dagnir dagnir force-pushed the ddb-enh-perf-testing branch from 667b130 to edd33dc Compare March 24, 2020 22:18
- java -jar target/benchmarks.jar -f 1 -wi 8 -i 8 software.amazon.awssdk.benchmark.enhanced.dynamodb
Copy link
Contributor

Choose a reason for hiding this comment

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

intended change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just while I'm testing these changes in codebuild

@@ -74,6 +83,7 @@ public static void main(String... args) throws RunnerException, JsonProcessingEx
benchmarksToRun.addAll(ASYNC_BENCHMARKS);
benchmarksToRun.addAll(PROTOCOL_BENCHMARKS);
benchmarksToRun.addAll(COLD_START_BENCHMARKS);
benchmarksToRun.addAll(MAPPER_BENCHMARKS);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add ddb enhanced client data to baseline.json for regression detection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See previous comment for getting baseline

dagnir added 2 commits March 24, 2020 15:47
Tests overhead of GET and PUT item over the low level client, as well as
performance of those operations compared to the V1 mapper.
@dagnir dagnir force-pushed the ddb-enh-perf-testing branch from 695d7f0 to 967340f Compare March 24, 2020 22:47
@dagnir dagnir force-pushed the ddb-enh-perf-testing branch from 36f641b to f2f9c58 Compare March 26, 2020 22:34
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 4 Security Hotspots to review)
Code Smell A 20 Code Smells

0.0% 0.0% Coverage
5.9% 5.9% Duplication

@dagnir dagnir merged commit 5ea0d1d into aws:master Mar 26, 2020
@dagnir dagnir deleted the ddb-enh-perf-testing branch March 26, 2020 23:11
aws-sdk-java-automation added a commit that referenced this pull request Sep 30, 2021
…36b8fe8a9

Pull request: release <- staging/ad96181a-3fdb-429c-89f6-a2836b8fe8a9
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.

None yet

3 participants