Arangobench

Arangobench is ArangoDB’s benchmark and test tool. It can be used to issue testrequests to the database for performance and server function testing.It supports parallel querying and batch requests.

Related blog posts:

Startup options

  • —async: Send asynchronous requests. The default value is false.

  • —batch-size: Number of operations to send per batch. Use 0 to disablebatching (this is the default).

  • —collection: Name of collection to use in test (only relevant for teststhat invoke collections).

  • —replication-factor: In case of a cluster, the replication factor of thecreated collections.

  • —number-of-shards: In case of a cluster, the number of shards of thecreated collections.

  • —wait-for-sync: The value of waitForSync for created collections.

  • —complexity: Complexity value for test case (default: 1). Meaning dependson test case.

  • —concurrency: Number of parallel threads that will issue requests(default: 1).

  • —configuration: Read configuration from file.

  • —delay: Use a startup delay. This is only necessary when run in series.The default value is false.

  • —keep-alive: Use HTTP keep-alive (default: true).

  • —progress: Show progress of benchmark, on every 20th request. Set tofalse to disable intermediate logging. The default value is true.

  • —requests: Total number of requests to perform (default: 1000).

  • —server.endpoint: Server endpoint to connect to, consisting of protocol, IPaddress and port. Defaults to tcp://localhost:8529.

  • —server.database: Database name to use when connecting (default: “_system”).

  • —server.username: Username to use when connecting (default: “root”).

  • —server.password: Password to use when connecting. Don’t specify thisoption to get a password prompt.

  • —server.authentication: Wether or not to show the password prompt anduse authentication when connecting to the server (default: true).

  • —test-case: Name of test case to perform (default: “version”).Possible values:

    • version : requests /_api/version
    • document : creates documents
    • collection : creates collections
    • import-document : creates documents via the import API
    • hash : Create/Read/Update/Read documents indexed by a hash index
    • skiplist : Create/Read/Update/Read documents indexed by a skiplist
    • edge : Create/Read/Update edge documents
    • shapes : Create & Delete documents with heterogeneous attribute names
    • shapes-append : Create documents with heterogeneous attribute names
    • random-shapes : Create/Read/Delete heterogeneous documents with random values
    • crud : Create/Read/Update/Delete
    • crud-append : Create/Read/Update/Read again
    • crud-write-read : Create/Read Documents
    • aqltrx : AQL Transactions with deep nested AQL FOR - loops
    • counttrx : uses JS transactions to count the documents and insert the result again
    • multitrx : multiple transactions combining reads & writes from js
    • multi-collection : multiple transactions combining reads & writes from js on multiple collections
    • aqlinsert : insert documents via AQL
    • aqlv8 : execute AQL with V8 functions to insert random documents
  • —verbose: Print out replies if the HTTP header indicates DB errors.(default: false).

Examples

  1. arangobench

Starts Arangobench with the default user and server endpoint.

  1. --test-case version --requests 1000 --concurrency 1

Runs the ‘version’ test case with 1000 requests, without concurrency.

  1. --test-case document --requests 1000 --concurrency 2

Runs the ‘document’ test case with 2000 requests, with two concurrent threads.

  1. --test-case document --requests 1000 --concurrency 2 --async true

Runs the ‘document’ test case with 2000 requests, with concurrency 2,with async requests.

  1. --test-case document --requests 1000 --concurrency 2 --batch-size 10

Runs the ‘document’ test case with 2000 requests, with concurrency 2,using batch requests.