Update default pgbench and postgresql settings
authorMark Wong <mark@2ndQuadrant.com>
Tue, 6 Feb 2018 19:19:09 +0000 (11:19 -0800)
committerMark Wong <mark@2ndQuadrant.com>
Tue, 6 Feb 2018 19:19:09 +0000 (11:19 -0800)
Make the default settings what we want to be tested.  The idea is to
minimize setup on the clients.

client/examples/settings_test.py [new file with mode: 0644]
client/settings.py

diff --git a/client/examples/settings_test.py b/client/examples/settings_test.py
new file mode 100644 (file)
index 0000000..d9590cf
--- /dev/null
@@ -0,0 +1,46 @@
+import os
+import sys
+
+# global configuration
+GIT_URL = 'https://github.com/postgres/postgres.git'
+REPOSITORY_PATH = '/tmp/git-postgres'
+BUILD_PATH = '/tmp/bin-postgres'
+BIN_PATH = os.path.join(BUILD_PATH, 'bin')
+DATADIR_PATH = '/tmp/data-postgres'
+
+POSTGRES_CONFIG = {
+    'shared_buffers': '1GB',
+    'work_mem': '64MB',
+    'maintenance_work_mem': '128MB',
+    'min_wal_size': '2GB',
+    'max_wal_size': '4GB',
+    'log_line_prefix': '%t [%p]: [%l-1] db=%d,user=%u,app=%a,client=%h ',
+    'log_checkpoints': 'on',
+    'log_autovacuum_min_duration': '0',
+    'log_temp_files': '32',
+    'checkpoint_timeout': '30min',
+    'checkpoint_completion_target': '0.9',
+}
+
+DATABASE_NAME = 'perf'
+
+OUTPUT_DIR = '/tmp/perf-output'
+
+# configuration for PgBench
+#
+# runs     - number of repetitions (including test for all client counts)
+# duration - duration (in seconds) of a single benchmark (per client count)
+#
+PGBENCH_CONFIG = {
+    'runs': 1,
+    'duration': 60,
+    'csv': False
+}
+
+# ignore missing file with local config
+try:
+    from settings_local import *
+except Exception as e:
+    print >> sys.stderr, "ERROR: local configuration (settings_local.py) " \
+                         "not found"
+    sys.exit(1)
index 338a70cc64d399432d72e67f0370a5d05c75521c..1afdfc2da0f8c0e883a2699a1a00bfc49bd33d70 100644 (file)
@@ -8,17 +8,19 @@ BUILD_PATH = '/tmp/bin-postgres'
 BIN_PATH = os.path.join(BUILD_PATH, 'bin')
 DATADIR_PATH = '/tmp/data-postgres'
 
-POSTGRES_CONFIG = {'shared_buffers': '1GB',
-                   'work_mem': '64MB',
-                   'maintenance_work_mem': '128MB',
-                   'min_wal_size': '2GB',
-                   'max_wal_size': '4GB',
-                   'log_line_prefix': '%n %t ',
-                   'log_checkpoints': 'on',
-                   'log_autovacuum_min_duration': '0',
-                   'log_temp_files': '32',
-                   'checkpoint_timeout': '15min',
-                   'checkpoint_completion_target': '0.9'}
+POSTGRES_CONFIG = {
+    'shared_buffers': '1GB',
+    'work_mem': '64MB',
+    'maintenance_work_mem': '128MB',
+    'min_wal_size': '2GB',
+    'max_wal_size': '4GB',
+    'log_line_prefix': '%t [%p]: [%l-1] db=%d,user=%u,app=%a,client=%h ',
+    'log_checkpoints': 'on',
+    'log_autovacuum_min_duration': '0',
+    'log_temp_files': '32',
+    'checkpoint_timeout': '30min',
+    'checkpoint_completion_target': '0.9',
+}
 
 DATABASE_NAME = 'perf'
 
@@ -31,7 +33,7 @@ OUTPUT_DIR = '/tmp/perf-output'
 #
 PGBENCH_CONFIG = {
     'runs': 3,
-    'duration': 60,    # duration of per-client-count benchmark
+    'duration': 600,
     'csv': False
 }