gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 25/189: io load reduced, synchronous_commit seems to be t


From: gnunet
Subject: [taler-grid5k] 25/189: io load reduced, synchronous_commit seems to be the load issue
Date: Thu, 28 Apr 2022 10:46:35 +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 3342905a7a288c2b858854de3dadaf179ff1281e
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Feb 23 15:05:38 2022 +0100

    io load reduced, synchronous_commit seems to be the load issue
---
 additional/persist.sh          |  2 +-
 experiment/scripts/database.sh | 56 ++++++++++++++++++++++++++++++++++--------
 experiment/scripts/dns.sh      | 14 +++++++++++
 experiment/scripts/run.sh      |  3 +--
 4 files changed, 62 insertions(+), 13 deletions(-)

diff --git a/additional/persist.sh b/additional/persist.sh
index 9fe358e..c43e5e7 100755
--- a/additional/persist.sh
+++ b/additional/persist.sh
@@ -33,7 +33,7 @@ else
   done
 fi
 
-if [[ $(ssh-add -L | wc -l) == "0" ]]; then
+if [[ $(ssh-add -L) =~ "The agent has no" ]]; then
   echo "No ssh key added, aborting"
   exit 1
 fi
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 1f39c5c..1c6e7c2 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -66,13 +66,14 @@ function setup_config() {
   echo "
   listen_addresses='*'
   log_destination=syslog
+  log_error_verbosity=terse
   syslog_ident='taler-database'
-  log_min_duration_statement=500
-  shared_preload_libraries='pg_stat_statements,auto_explain'
-  auto_explain.log_min_duration='300ms'
-  auto_explain.log_analyze=true
-  auto_explain.log_buffers=true
-  auto_explain.log_wal=true
+  log_min_duration_statement=300
+  shared_preload_libraries='pg_stat_statements' #,auto_explain'
+  # auto_explain.log_min_duration='300ms'
+  # auto_explain.log_analyze=true
+  # auto_explain.log_buffers=true
+  # auto_explain.log_wal=true
   
   # use 25% of the available memory 
   # (https://www.postgresql.org/docs/13/runtime-config-resource.html)
@@ -91,6 +92,41 @@ function setup_config() {
   checkpoint_completion_target=0.9
   random_page_cost=1.1
   
+  # Default 2kB
+  bgwriter_flush_after = 2MB
+
+  # Default 0
+  # 
https://www.cybertec-postgresql.com/en/the-mysterious-backend_flush_after-configuration-setting/
+  # backend_flush_after = 0
+
+  # Too much results in CPU load
+  # 
https://www.postgresql.org/docs/13/runtime-config-resource.html#GUC-EFFECTIVE-IO-CONCURRENCY
+  effective_io_concurrency = 100
+
+  # Bad when turned off - Recovering db may not be possible
+  # https://www.postgresql.org/docs/13/runtime-config-wal.html#GUC-FSYNC
+  fsync = on
+
+  # Not so bad as when turning off fsync, but single transactions might get 
lost on crash - but
+  # like they would have aborted cleanly
+  # 
https://www.postgresql.org/docs/13/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT
+  # When having replication, this one can be changed (in local only on and off 
are of use)
+  # 
https://www.postgresql.org/docs/13/runtime-config-replication.html#GUC-SYNCHRONOUS-STANDBY-NAMES
+  # on causes us to get 100% IO load
+  synchronous_commit = off
+
+  # Default off
+  wal_compression = off
+
+  wal_sync_method = fsync
+
+  # Bad to turn off, may lead to inconcistency
+  # 
https://www.postgresql.org/docs/13/runtime-config-wal.html#GUC-FULL-PAGE-WRITES
+  # Write full pages to WAL while partial are written to disk, helpful in case 
of crash, then
+  # partially written pages can be recovered.
+  # Can be disabled if FS does not support partial written pages (such as ZFS)
+  full_page_writes = on
+
   max_worker_processes=${NUM_CPU}
   max_parallel_workers=${NUM_CPU}
   max_connections=500
@@ -100,9 +136,9 @@ function setup_config() {
   # out of shared memory
   max_locks_per_transaction=85
   
-  # Increase work mem to lower I/O utilization (max used =~ work_mem * 
max_connections)
+  # (max used =~ work_mem * max_connections)
   # NOTE: This formula is not completely correct 
-  work_mem=265MB
+  work_mem=128MB
   maintenance_work_mem=2GB
   # 1 min
   idle_in_transaction_session_timeout=60000
@@ -248,8 +284,8 @@ EOF
 case ${1} in 
   init)
     setup_config
-    # setup_disks
-    setup_ram_storage
+    setup_disks
+    # setup_ram_storage
     init_db
     setup_pgbouncer
     restart_rsyslog
diff --git a/experiment/scripts/dns.sh b/experiment/scripts/dns.sh
new file mode 100644
index 0000000..7c6706a
--- /dev/null
+++ b/experiment/scripts/dns.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -eux
+
+# Backup used nodes for experiment
+cp ~/nodes.json ${LOG_DIR}/nodes.json
+
+# Clean the file so it is cleanly updated in each run
+rm ${LOG_DIR}/commits.txt || true
+
+for DIR in $(ls ~/taler); do
+  cd ~/taler/${DIR}
+  echo "${DIR}: $(git rev-parse HEAD)" >> ${LOG_DIR}/commits.txt
+  cd -
+done
diff --git a/experiment/scripts/run.sh b/experiment/scripts/run.sh
index a2979d5..df938e6 100644
--- a/experiment/scripts/run.sh
+++ b/experiment/scripts/run.sh
@@ -56,8 +56,7 @@ elif [[ "${HOSTNAME}" =~ ${PROXY_HOSTS} ]]; then
     exec ~/scripts/proxy.sh init
 elif [[ "${HOSTNAME}" =~ ${DNS_HOSTS} ]]; then 
     set_host dns
-    # backup used nodes for experiment
-    cp ~/nodes.json ${LOG_DIR}/nodes.json
+    exec ~/scripts/dns.sh
 else
     set_host wallet
     set_ddn "${WALLET_DOMAIN//\*/${HOST}}"

-- 
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]