• Stars
    star
    217
  • Rank 182,446 (Top 4 %)
  • Language
    Shell
  • License
    Other
  • Created over 10 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tool which can be used to benchmark PostgreSQL (JSONB) and MongoDB (BSON)

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:

    PostgreSQL Variables:

   PGHOME=/usr/pgsql-9.4    # Installation location of PostgreSQL binaries.
   PGHOST="172.17.0.2"      # Hostname/IP address of PostgreSQL
   PGPORT="5432"            # Port number on which PostgreSQL is running.
   PGUSER="postgres"        # PostgreSQL database username.
   PGPASSWORD="postgres"    # PostgreSQL database users password.
   PGBIN=/usr/pgsql-9.4/bin # PostgreSQL binary location.

MongoDB Variables:

   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.
  • To create the admin user in MongoDB use the following command on the MongoDB server:
   > db.createUser({ user: "mongo",
                     pwd: "mongo",
                     roles:[{ role: "userAdmin",
                              db: "benchmark"
                            }]
                    })
  • To create the super user in PostgreSQL use the following command:
CREATE USER postgres PASSWORD '<password>' WITH SUPERUSER;

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

More Repositories

1

repmgr

A lightweight replication manager for PostgreSQL (Postgres)
C
1,556
star
2

mysql_fdw

PostgreSQL foreign data wrapper for MySQL
C
477
star
3

zheap

new heap with in-place update, powered by undo, for eventual integration into PostgreSQL
C
226
star
4

hdfs_fdw

PostgreSQL foreign data wrapper for HDFS
C
133
star
5

pg_catcheck

Postgres Catalog Checker
C
77
star
6

pg_failover_slots

PG Failover Slots extension
C
76
star
7

pldebugger

Procedural Language Debugger Plugin for PostgreSQL and EDB Postgres Advanced Server
C
70
star
8

system_stats

A Postgres extension for exposing system metrics such as CPU, memory and disk information
C
70
star
9

postgres-deployment

EDB Postgres Deployment
Python
62
star
10

edb-ansible

Ansible code for deploying EDB Postgres database clusters and related products.
Python
59
star
11

tpa

Trusted Postgres Architect
Python
57
star
12

cnp-bench

Benchmarking guidelines for Cloud Native PostgreSQL
Smarty
25
star
13

docs

EDB Docs
MDX
17
star
14

docker-postgresql

Repo for PostgreSQL containers.
Shell
17
star
15

edb-ref-archs

EDB Reference Architectures
15
star
16

benchmark-framework

Ansible based configurable framework for running consistent pgbench, TPROC-C and TPROC-H benchmarks
Shell
15
star
17

benchmarking-postgres

Scripts to benchmark PostgreSQL database server using pgbench and HammerDB.
Shell
12
star
18

terraform-provider-biganimal

A terraform provider that uses the BigAnimal.com API in order to manage postgres clusters in the cloud
Go
12
star
19

cnp-sandbox

Sandbox for Cloud Native PostgreSQL in Kubernetes environments
11
star
20

edb-installers

PostgreSQL installers packaged by EDB
C
9
star
21

edb-postgres-for-kubernetes-charts

Helm charts to deploy Cloud Native PostgreSQL
Smarty
8
star
22

sslutils

A Postgres extension for managing SSL certificates through SQL.
C
7
star
23

edb-cnpg-gke-autopilot-deployer

Deployer image for the CNP GKE Autopilot integration
Shell
5
star
24

pgldapsync

A tool for syncing LDAP users to Postgres Roles
Python
5
star
25

cloud-utilities

Shell
5
star
26

kubectl-cnp

Plugin for kubectl to manage a Cloud Native PostgreSQL cluster in Kubernetes
Shell
4
star
27

pgworkload

A workload generator for Postgres.
C++
4
star
28

k8s-api-docgen

Reads Go source files to extract metadata about Kubernetes API custom resources defined by the developer in Godoc and produces different kinds of output - such as JSON or Markdown.
Go
4
star
29

edb-terraform

Terraform templates aimed to provide easy to use YAML configuration file describing the target cloud infrastructure.
HCL
3
star
30

barman-tutorial

Shell
3
star
31

pg-backup-api

A server that provides an HTTP API to interact with Postgres backups
Python
3
star
32

docker-pgbouncer

Repo for PgBouncer image containers
Dockerfile
2
star
33

bdr-benchmark-kit

BDR Benchmark Kit based on Terraform and Ansible
Python
2
star
34

cto-tproc-results

CTO Team TPROC benchmark results
2
star
35

efm-api-node-state

HTTP service and REST API exposing the state of the current EFM node
Rust
2
star
36

ciclops

Project moved to https://github.com/cloudnative-pg/ciclops
2
star
37

edb-partner-docs

JavaScript
1
star
38

edb-benchmarks

Benchmark execution scripts
Shell
1
star
39

cto-tproc-scripts

CTO Team TPROC benchmark scripts
1
star