Giter VIP home page Giter VIP logo

melaniesifen / dynamodb-python-query-speed-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matwerber1/dynamodb-python-query-speed-test

0.0 0.0 0.0 39 KB

In this post, we demonstrate how Amazon DynamoDB table structure can affect scan performance and offer techniques for optimizing table scan times.

Home Page: https://aws.amazon.com/blogs/database/optimizing-amazon-dynamodb-scan-latency-through-schema-design/

License: MIT License

Python 100.00%

dynamodb-python-query-speed-test's Introduction

dynamodb-python-query-speed-test

Purpose

Test effect of many vs. fewer columns of data on client-side speed of queries against Amazon DynamoDB.

Results

Refer to the write-up at https://aws.amazon.com/blogs/database/optimizing-amazon-dynamodb-scan-latency-through-schema-design/

Thanks to switch180 & Chad Tindel for their contributions and suggestions.

Disclaimer

  • There are many variables to consider when measuring latency, such as distance between server and client, available CPU & memory, bandwidth, etc. Testing in your own environment is the most reliable benchmark.

Usage

usage: run.py [-h] [--table TABLE] [--schema SCHEMA] [--seed SEED]
              [--query QUERY] [--region REGION] [--endpoint ENDPOINT]
              [--rounds ROUNDS] [--skip-seed] [--mode MODE] [--rcu RCU]
              [--wcu WCU]

Test DynamoDB query API speed.

optional arguments:
  -h, --help           show this help message and exit
  --table TABLE        dynamodb table to use for testing
  --schema SCHEMA
  --seed SEED          number of items to write to table
  --query QUERY        number of items to query per API call
  --region REGION      Region name for auth and endpoint construction
  --endpoint ENDPOINT  Override endpoint
  --rounds ROUNDS      Number of rounds
  --skip-seed
  --mode MODE          Table capacity mode = 'PAY_PER_REQUEST' or
                       'PROVISIONED')
  --rcu RCU            Read capacity units (RCUs) (only for provisioned
                       capacity mode)
  --wcu WCU            Write capacity units (WCUs) (only for provisioned
                       capacity mode)

Default settings

Default settings are below:

# Default settings:
# -----------------------------
# region   = us-east-1
# table    = query_testing_table
# schema   = schemas/long.schema
# seed     = 5000
# query    = 2500
# rounds   = 10
# mode     = PROVISIONED
# rcu      = 200 
# wcu      = 100
# endpoint = (blank) - only needed if running local DDB

Examples

  1. Run test with default settings:
python run.py

dynamodb-python-query-speed-test's People

Contributors

dependabot[bot] avatar matwerber1 avatar switch180 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.