This contains scripts to benchmark PostgreSQL database server using pgbench and HammerDB.
- Please note that PostgreSQL YUM repository depends on EPEL repository for some packages. RHEL/CentOS/, etc. users should install EPEL repo RPM along with PGDG repo RPMs to satisfy dependencies.
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- Download the rpm from https://yum.postgresql.org/repopackages.php#pg12
rpm -ivh pgdg-redhat-repo-latest.noarch.rpm
For edbas, install the repo as following.
sudo cp edb.repo /etc/yum.repos.d/
-
sudo yum makecache
-
sudo yum install postgresql12-server
- Download the Linux 64-bit compressed tar file for HammerDB from the following link:
https://www.hammerdb.com/download.html
- To install from the tar.gz run the command
tar -zxvf HammerDB-3.0.tar.gz
-
Edit run_tests and set the following postgres folder and hammerdb folder in the following two variables respectively:
export PGINST=/usr/pgsql-12/ export HDBINST=/home/centos/HammerDB/HammerDB-3.2
-
Add/modify the postgresql parameters in run_tests.
-
The pgbench specific parameters can be found in PGBench/run_pgbench script. If the WAL needs to be stored in separate directory, the wal_dir variable should be set with the location.
-
The HammerDB specific parameters can be found in HammerDB/run_hammerdb script. If the WAL needs to be stored in separate directory, the wal_dir variable should be set with the location.
-
Run ./run_test
-
The results will be generated in PGBench/Results and HammerDB/Results folder.