gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 47/73: fix stupid bug and fix arguments for bank


From: gnunet
Subject: [taler-grid5k] 47/73: fix stupid bug and fix arguments for bank
Date: Tue, 14 Dec 2021 15:10:29 +0100

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

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

commit 682015d921e4b2e1b8c4d36e55437304d2f838b9
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Dec 2 19:47:56 2021 +0100

    fix stupid bug and fix arguments for bank
---
 configs/etc/postgresql/13/main/exchange.conf       | 25 ------------------
 .../usr/lib/systemd/system/taler-fakebank.service  |  2 +-
 experiment/env                                     |  1 +
 experiment/scripts/database.sh                     | 30 +++++++++++++++++++++-
 4 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/configs/etc/postgresql/13/main/exchange.conf 
b/configs/etc/postgresql/13/main/exchange.conf
deleted file mode 100644
index 7054c3a..0000000
--- a/configs/etc/postgresql/13/main/exchange.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-listen_addresses='*'
-log_destination=syslog
-syslog_ident='taler-database'
-log_min_duration_statement=500
-shared_preload_libraries='pg_stat_statements,auto_explain'
-
-# use 25% of the available memory 
-# (https://www.postgresql.org/docs/13/runtime-config-resource.html)
-shared_buffers=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) / 4 ))kB
-effective_cache_size=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) * 3/4))kB
-
-# 
(https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-MAX-WAL-SIZE)
-max_wal_size=2GB 
-wal_buffers=16MB
-
-max_worker_processes=$(lscpu | grep "CPU(s)" | head -n 1 | awk '{print $2}')
-max_connections=300
-
-# out of shared memory
-max_locks_per_transaction=85
-
-# Increase work mem to lower I/O utilization (max used =~ work_mem * 
max_connections)
-# NOTE: This formula is not completely correct 
-# work_mem=128MB
-# idle_in_transaction_session_timeout=10000
diff --git a/configs/usr/lib/systemd/system/taler-fakebank.service 
b/configs/usr/lib/systemd/system/taler-fakebank.service
index 3e295a8..074e917 100644
--- a/configs/usr/lib/systemd/system/taler-fakebank.service
+++ b/configs/usr/lib/systemd/system/taler-fakebank.service
@@ -4,7 +4,7 @@ Description=GNU Taler fake bank
 [Service]
 Type=simple
 EnvironmentFile=/etc/environment
-ExecStart=/usr/bin/taler-fakebank-run -c /etc/taler/taler.conf -n 100 
$EXCHANGE_ARGS
+ExecStart=/usr/bin/taler-fakebank-run -c /etc/taler/taler.conf -n 100 
$TALER_ARGS $BANK_ARGS
 StandardOutput=journal
 StandardError=journal
 
diff --git a/experiment/env b/experiment/env
index 2f5875a..b9b9f33 100644
--- a/experiment/env
+++ b/experiment/env
@@ -28,6 +28,7 @@ MERCHANT_DOMAIN=merchant.${DNS_ZONE}
      TALER_ARGS="-L INFO"
 # Service specific arguments to pass at startup
 AGGREGATOR_ARGS="-y"
+      BANK_ARGS=""
     CLOSER_ARGS=""
   EXCHANGE_ARGS=""
   TRANSFER_ARGS=""
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 737a2c3..c1d0296 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -17,9 +17,37 @@ function setup_config() {
   host all postgres 172.16.0.0/12 trust
   " >> /etc/postgresql/13/main/pg_hba.conf
 
+  echo "
+  listen_addresses='*'
+  log_destination=syslog
+  syslog_ident='taler-database'
+  log_min_duration_statement=500
+  shared_preload_libraries='pg_stat_statements,auto_explain'
+  
+  # use 25% of the available memory 
+  # (https://www.postgresql.org/docs/13/runtime-config-resource.html)
+  shared_buffers=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) / 4 ))kB
+  effective_cache_size=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) * 
3/4))kB
+  
+  # 
(https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-MAX-WAL-SIZE)
+  max_wal_size=2GB 
+  wal_buffers=16MB
+  
+  max_worker_processes=$(lscpu | grep "CPU(s)" | head -n 1 | awk '{print $2}')
+  max_connections=300
+  
+  # out of shared memory
+  max_locks_per_transaction=85
+  
+  # Increase work mem to lower I/O utilization (max used =~ work_mem * 
max_connections)
+  # NOTE: This formula is not completely correct 
+  # work_mem=128MB
+  # idle_in_transaction_session_timeout=10000
+  " > /etc/postgresql/13/main/exchange.conf
+
   if ! grep -q "include = 'exchange.conf'" \
          /etc/postgresql/13/main/postgresql.conf; then
-    echo "include = 'exchange.conf'" >>
+    echo "include = 'exchange.conf'" >> \
           /etc/postgresql/13/main/postgresql.conf
   fi
 

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