EnterpriseDB / pg_nosql_benchmark

A tool which can be used to benchmark PostgreSQL (JSONB) and MongoDB (BSON)
Other
217 stars 44 forks source link

pg_nosql_benchmark

This is tool for benchmarking Postgres (JSONB) and MongoDB (BSON)

Introduction

This is a benchmarking tool developed by EnterpriseDB to benchmark MongoDB 2.6 (BSON) and Postgres 9.4 (JSONB) database using JSON data. The current version focuses on data ingestion and simple select operations in single-instance environments - later versions will include a complete range of workloads (including deleting, updating, appending, and complex select operations) and they will also evaluate multi-server configurations.

This tool performs the following tasks to compare of MongoDB and PostgreSQL:

Requirements

   MONGO="/usr/bin/mongo"             # Complete path of mongo Command binary
   MONGOIMPORT="/usr/bin/mongoimport" # complete path of mongoimport binary
   MONGOHOST="172.17.0.3"             # Hostname/IP address of MongoDB
   MONGOPORT="27017"                  # Port number on which MongoDB is running.
   MONGOUSER="mongo"                  # Mongo database username
   MONGOPASSWORD="mongo"              # MongoDB database username's password
   MONGODBNAME="benchmark"            # mongoDB database name.

For more information on CREATE USER command in PostgreSQL, please check: http://www.postgresql.org/docs/9.4/static/sql-createuser.html

Recommended modules

The following packages are needed to run the benchmark tool:

  1. mongodb-org-2.6.3-1.x86_64
  2. postgresql94-9.4beta1-1PGDG.rhel6.x86_64
  3. bc-1.06.95-1.el6.x86_64
  4. git-1.7.1-3.el6_4.1.x86_64

Installation

To install this tool on the load generating server, use the following command:

  1. git clone https://github.com/EnterpriseDB/pg_nosql_benchmark.git
  2. cd pg_mongo_benchmark
  3. chmod +x pg_nosql_benchmark