-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-88 YCSB client for Amazon DynamoDB
- Loading branch information
1 parent
b39ffb5
commit a78618b
Showing
9 changed files
with
459 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +0,0 @@ | ||
.classpath | ||
.project | ||
.settings | ||
db/*/lib/*.jar | ||
db/*/lib/*.zip | ||
*.iml | ||
.idea | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
CONFIGURE | ||
|
||
YCSB_HOME - YCSB home directory | ||
DYNAMODB_HOME - Amazon DynamoDB package files | ||
|
||
BENCHMARK | ||
|
||
$YCSB_HOME/bin/ycsb load dynamodb -P worklaods/workloada -P dynamodb.properties | ||
$YCSB_HOME/bin/ycsb run dynamodb -P worklaods/workloada -P dynamodb.properties | ||
|
||
PROPERTIES | ||
|
||
$DYNAMODB_HOME/conf/dynamodb.properties | ||
$DYNAMODB_HOME/conf/AWSCredentials.properties | ||
|
||
FAQs | ||
* Why is the recommended workload distribution set to 'uniform'? | ||
This is to conform with the best practices for using DynamoDB - uniform, | ||
evenly distributed workload is the recommended pattern for scaling and | ||
getting predictable performance out of DynamoDB | ||
|
||
For more information refer to | ||
http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/BestPractices.html | ||
|
||
* How does workload size affect provisioned throughput? | ||
The default payload size requires double the provisioned throughput to execute | ||
the workload. This translates to double the provisioned throughput cost for testing. | ||
The default item size in YCSB are 1000 bytes plus metadata overhead, which makes the | ||
item exceed 1024 bytes. DynamoDB charges one capacity unit per 1024 bytes for read | ||
or writes. An item that is greater than 1024 bytes but less than or equal to 2048 bytes | ||
would cost 2 capacity units. With the change in payload size, each request would cost | ||
1 capacity unit as opposed to 2, saving the cost of running the benchmark. | ||
|
||
For more information refer to | ||
http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/WorkingWithDDTables.html | ||
|
||
* How do you know if DynamoDB throttling is affecting benchmarking? | ||
Monitor CloudWatch for ThrottledRequests and if ThrottledRequests is greater | ||
than zero, either increase the DynamoDB table provisioned throughput or reduce | ||
YCSB throughput by reducing YCSB target throughput, adjusting the number of YCSB | ||
client threads, or combination of both. | ||
|
||
For more information please refer to | ||
https://github.com/brianfrankcooper/YCSB/blob/master/doc/tipsfaq.html | ||
|
||
When requests are throttled, latency measurements by YCSB can increase. | ||
|
||
Please refer to http://aws.amazon.com/dynamodb/faqs/ for more information. | ||
|
||
Please refer to Amazon DynamoDB docs here: | ||
http://aws.amazon.com/documentation/dynamodb/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Fill in your AWS Access Key ID and Secret Access Key | ||
# http://aws.amazon.com/security-credentials | ||
#accessKey = | ||
#secretKey = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Sample property file for Amazon DynamoDB database client | ||
|
||
## Mandatory parameters | ||
|
||
# AWS credentials associated with your aws account. | ||
#dynamodb.awsCredentialsFile = <path to AWSCredentials.properties> | ||
|
||
# Primarykey of table 'usertable' | ||
#dynamodb.primaryKey = <firstname> | ||
|
||
## Optional parameters | ||
|
||
# Endpoint to connect to.For best latency, it is recommended | ||
# to choose the endpoint which is closer to the client. | ||
# Default is us-east-1 | ||
#dynamodb.endpoint = http://dynamodb.us-east-1.amazonaws.com | ||
|
||
# Strongly recommended to set to uniform.Refer FAQs in README | ||
#requestdistribution = uniform | ||
|
||
# Enable/disable debug messages.Defaults to false | ||
# "true" or "false" | ||
#dynamodb.debug = false | ||
|
||
# Maximum number of concurrent connections | ||
#dynamodb.connectMax = 50 | ||
|
||
# Read consistency.Consistent reads are expensive and consume twice | ||
# as many resources as eventually consistent reads. Defaults to false. | ||
# "true" or "false" | ||
#dynamodb.consistentReads = false | ||
|
||
# Workload size has implications on provisioned read and write | ||
# capacity units.Refer FAQs in README | ||
#fieldcount = 10 | ||
#fieldlength = 90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.yahoo.ycsb</groupId> | ||
<artifactId>root</artifactId> | ||
<version>0.1.4</version> | ||
</parent> | ||
|
||
<artifactId>dynamodb-binding</artifactId> | ||
<name>DynamoDB DB Binding</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk</artifactId> | ||
<version>1.3.14</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.17</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.yahoo.ycsb</groupId> | ||
<artifactId>core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>${maven.assembly.version}</version> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.