[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] 29/189: fix
From: |
gnunet |
Subject: |
[taler-grid5k] 29/189: fix |
Date: |
Thu, 28 Apr 2022 10:46:39 +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 7aa1669143104e79afe33235f6ef56458e40eee5
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Feb 23 21:50:52 2022 +0100
fix
---
experiment/scripts/monitor.sh | 6 +++---
experiment/scripts/shard.sh | 44 +++++++++++++++++++++++++++++++++++++++----
2 files changed, 43 insertions(+), 7 deletions(-)
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index 2435da1..5a0041f 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -121,7 +121,7 @@ function add_shards_to_prometheus() {
for SHARD in $(get_shard_hosts); do
if ! grep -q "${SHARD}" /etc/monitor/prometheus.yaml;
then
- sed -i "/<SHARDS_HERE/a \ \ \ \ \ \ - '${SHARD_DOMAIN//\*/${SHARD}}'" \
+ sed -i "/<SHARDS_HERE/a \ \ \ \ \ \ -
'${SHARD_DOMAIN//\*/${SHARD}}:9100'" \
/etc/monitor/prometheus.yaml
fi
done
@@ -151,9 +151,8 @@ function init_monitor() {
update_grafana
systemctl restart loki \
- promtail
+ promtail
- configure_prometheus_and_exporters
wait_for_keys "${PROXY_DOMAIN}"
@@ -171,6 +170,7 @@ function init_monitor() {
fi
add_shards_to_prometheus
+ configure_prometheus_and_exporters
systemctl restart prometheus-nginx-exporter \
prometheus-postgres-exporter \
diff --git a/experiment/scripts/shard.sh b/experiment/scripts/shard.sh
index f2f2b7b..bf72819 100755
--- a/experiment/scripts/shard.sh
+++ b/experiment/scripts/shard.sh
@@ -46,8 +46,9 @@ function setup_config() {
echo "
listen_addresses='*'
log_destination=syslog
- syslog_ident='taler-database'
- log_min_duration_statement=500
+ log_error_verbosity=terse
+ syslog_ident='taler-database-shard'
+ log_min_duration_statement=300
shared_preload_libraries='pg_stat_statements,auto_explain'
auto_explain.log_min_duration='300ms'
auto_explain.log_analyze=true
@@ -71,6 +72,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
@@ -80,9 +116,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
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-grid5k] 123/189: update url's to match node names, (continued)
- [taler-grid5k] 123/189: update url's to match node names, gnunet, 2022/04/28
- [taler-grid5k] 81/189: change denominations 1,4,8, gnunet, 2022/04/28
- [taler-grid5k] 04/189: if not exists, gnunet, 2022/04/28
- [taler-grid5k] 09/189: add missing user directory, gnunet, 2022/04/28
- [taler-grid5k] 55/189: add certificates for nginx, gnunet, 2022/04/28
- [taler-grid5k] 26/189: try to fix sharding issues, gnunet, 2022/04/28
- [taler-grid5k] 51/189: fix exchange service, gnunet, 2022/04/28
- [taler-grid5k] 57/189: update, gnunet, 2022/04/28
- [taler-grid5k] 15/189: fix wallet startup, gnunet, 2022/04/28
- [taler-grid5k] 59/189: configure proxy caching, gnunet, 2022/04/28
- [taler-grid5k] 29/189: fix,
gnunet <=
- [taler-grid5k] 25/189: io load reduced, synchronous_commit seems to be the load issue, gnunet, 2022/04/28
- [taler-grid5k] 19/189: update shard sql, gnunet, 2022/04/28
- [taler-grid5k] 08/189: add missing user, gnunet, 2022/04/28
- [taler-grid5k] 10/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 78/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 72/189: cleaner regex, gnunet, 2022/04/28
- [taler-grid5k] 86/189: -fixes -build libmicrohttpd from source, gnunet, 2022/04/28
- [taler-grid5k] 101/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 112/189: add missing parameter hint to explain.py, gnunet, 2022/04/28
- [taler-grid5k] 67/189: set lookahead sign to two days as we get much better client performance, gnunet, 2022/04/28