gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 112/189: add missing parameter hint to explain.py


From: gnunet
Subject: [taler-grid5k] 112/189: add missing parameter hint to explain.py
Date: Thu, 28 Apr 2022 10:48:02 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit cce5ea58e243f42d0561a71dad495ea7ef9310b1
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Mar 24 20:12:12 2022 +0100

    add missing parameter hint to explain.py
---
 additional/explain-visualizer/explain.py | 8 +++++++-
 experiment/env                           | 8 ++++----
 experiment/scripts/database.sh           | 9 ++++++---
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/additional/explain-visualizer/explain.py 
b/additional/explain-visualizer/explain.py
index f5eb57a..bad053f 100755
--- a/additional/explain-visualizer/explain.py
+++ b/additional/explain-visualizer/explain.py
@@ -264,11 +264,15 @@ def visualize(analyze_json):
         return
 
     plan = analyze_json['Plan']
+    if 'JIT' in analyze_json:
+        time = analyze_json['JIT']['Timing']['Total']
+    else:
+        time = analyze_json['Execution Time']
 
     print("GENERAL:\n")
     print("  {:<25} {:>10}".format("Estimated Rows:", plan['Plan Rows']))
     print("  {:<25} {:>10}".format("Actual Rows Returned:", plan['Actual 
Rows']))
-    print("  {:<25} {:>10} ms".format("Actual Execution Time:", plan['Actual 
Total Time']))
+    print("  {:<25} {:>10} ms".format("Actual Execution Time:", time))
 
     parse_plan(plan)
 
@@ -342,6 +346,7 @@ def handle_log_execute(match):
             print("Make sure to set the following in postgres.conf before 
collecting logs:\n")
             print("  'log_statement=all'")
             print("  'syslog_split_messages=off'")
+            print("  'log_error_verbosity=default'")
             print("\n")
             exit(1)
 
@@ -362,6 +367,7 @@ def handle_logs():
     Thus the following parameters must be set in postgres.conf:
       log_statement=all
       syslog_split_messages=off
+      log_error_verbosity=default
     (Syslog must be able to handle large messages)
     """
     logs = None
diff --git a/experiment/env b/experiment/env
index 7a83154..299d010 100644
--- a/experiment/env
+++ b/experiment/env
@@ -92,16 +92,16 @@ DB_USER=taler
 # Database password
 DB_PASSWORD=taler
 # The mininmum duration of a sql statement to be logged by 
log_min_duration_statement in ms
-DB_MIN_DURATION_STATEMENT=100
+DB_MIN_DURATION_STATEMENT=80
 # If exchanges should connect to pgBouncer rather than to the db directly
 USE_PGBOUNCER=false
 # If the taler-exchange database should be sharded
-SHARD_DB=true
+SHARD_DB=false
 # If the taler-exchange database should be partitioned
 # NOTE sharding and partitioning are mutually exclusive, if both are true, 
sharding will be tried
-PARTITION_DB=false
+PARTITION_DB=true
 # How many partitions of partitioned tables should be created
-NUM_PARTITIONS=10
+NUM_PARTITIONS=2
 
 # Initial number of wallets to start in parallel per host.
 # This is a bulk size with default = 10
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 09e6e05..16c28ec 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -94,6 +94,7 @@ function setup_config() {
   # For explain.py
   # syslog_split_messages=off
   # log_statement=all
+  # log_error_verbosity=default
 
   log_min_duration_statement=${DB_MIN_DURATION_STATEMENT}
 
@@ -133,7 +134,7 @@ function setup_config() {
   
   # 
(https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-MAX-WAL-SIZE)
   min_wal_size=4GB
-  max_wal_size=100GB
+  max_wal_size=16GB
   wal_buffers=1GB
 
   checkpoint_completion_target=0.9
@@ -187,8 +188,8 @@ function setup_config() {
   
   # (max used =~ work_mem * max_connections)
   # NOTE: This formula is not completely correct 
-  work_mem=128MB
-  maintenance_work_mem=2GB
+  work_mem=2GB
+  maintenance_work_mem=4GB
   # 1 min
   idle_in_transaction_session_timeout=60000
 
@@ -199,6 +200,8 @@ function setup_config() {
   data_directory='/tmp/postgresql/${POSTGRES_VERSION}/main'
   " > /etc/postgresql/${POSTGRES_VERSION}/main/exchange.conf
 
+  cp /etc/postgresql/${POSTGRES_VERSION}/main/exchange.conf 
${LOG_DIR}/postgresql.conf
+
   if ! grep -q "include = 'exchange.conf'" \
          /etc/postgresql/${POSTGRES_VERSION}/main/postgresql.conf; then
     echo "include = 'exchange.conf'" >> \

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]