sh start_server.sh
export PGDATA=/mnt/ssd/mahendra.thalor/data
export PGPORT=54321

for threads in 1 32 56 60 64 66 70 74
do
		./postgres -c shared_buffers=512MB -c max_wal_size=20GB -c checkpoint_timeout=12min -p 54321&
		sleep 5
		#drop and recreate database
		./dropdb postgres
		./createdb postgres
		#initialize database
		./pgbench -i -s 1 postgres
		./psql -d postgres -c "\i table_create.sql"
		sleep 5
		./pgbench -c $threads -j $threads -T 180 -f insert1.sql@1 -f insert2.sql@1 -f insert3.sql@1 -f insert4.sql@1 postgres >> test_results.txt
		sleep 10
		./psql -d postgres -c "SELECT count(*) FROM test" >> test_results.txt
		./psql -d postgres -c "drop table test"
		./psql -d postgres -c "checkpoint" >> test_results.txt
		./pg_ctl stop
done

