YCSB/dynamodb
Álvaro Hernández 5a12972c07 [dynamodb] Improve endpoint and region config
* Upgrade AWS SDK from version 1.10.48 to 1.11.812.

* Introduce a new configuration parameter, dynamodb.region, which
  represents a valid AWS region code (see
  https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions
  for example). If specifying the region, it is not necessary to specify
  the dynamodb.endpoint parameter.

* Introduce support for non-standard endpoints. Before this commit,
  setting the endpoint to a non-standard one, like a proxy, but
  ultimately connecting to a region different from 'us-east-1' would
  lead to a credential errors due to bad signature:

  ERROR site.ycsb.db.DynamoDBClient
  -com.amazonaws.AmazonServiceException: Credential should be scoped to
  a valid region, not 'us-east-1'.  (Service: AmazonDynamoDBv2; Status
  Code: 400; Error Code: InvalidSignatureException;

  With this commit, if using a proxy as an endpoint, by setting also the
  region via dynamodb.region, it will work with no error.

* Set TCP Keep-Alive to true. Even it makes sense to be used by YCSB, it
  apparently doesn't improve performance notably given the connection
  reuse that the DynamoDB client is doing.

* Update the example config file with the endpoint and region parameters
  and behavior.
2020-11-26 21:48:33 -06:00
..
conf [dynamodb] Improve endpoint and region config 2020-11-26 21:48:33 -06:00
src/main [dynamodb] Improve endpoint and region config 2020-11-26 21:48:33 -06:00
README.md [license] Apply results of Apache Rat check 2015-11-04 10:25:46 -08:00
pom.xml [dynamodb] Improve endpoint and region config 2020-11-26 21:48:33 -06:00

README.md

DynamoDB Binding

http://aws.amazon.com/documentation/dynamodb/

Configure

YCSB_HOME - YCSB home directory
DYNAMODB_HOME - Amazon DynamoDB package files

Please refer to https://github.com/brianfrankcooper/YCSB/wiki/Using-the-Database-Libraries for more information on setup.

Benchmark

$YCSB_HOME/bin/ycsb load dynamodb -P workloads/workloada -P dynamodb.properties
$YCSB_HOME/bin/ycsb run dynamodb -P workloads/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/