README.md

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:

The tool generates a large set of JSON documents (the number of documents is defined by the value of the variable json_rows in pg_nosql_benchmark)

The data set is loaded into MongoDB and PostgreSQL using mongoimport and PostgreSQL's COPY command.

The same data is loaded into MongoDB and PostgreSQL using the INSERT command.

The tool executes 4 SELECT Queries in MongoDB & PostgreSQL.

Requirements

pg_nosql_benchmark uses CentOS 6.4 or later, and is designed for PostgreSQL 9.4 beta server and MongoDB 2.6.

The configuration requires three servers

Load generating server

MongoDB server

PostgreSQL server

The MongoDB server and the PostgreSQL server should be configured identically

The script is designed to run from the central load-generating server, which must have access to the MongoDB and PostgreSQL servers.

The following environment variables in pg_nosql_benchmark control the execution: