gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 44/189: no create table in slow queries


From: gnunet
Subject: [taler-grid5k] 44/189: no create table in slow queries
Date: Thu, 28 Apr 2022 10:46:54 +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 89b503979da8c354bab488ada5fdec1863faec71
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Mar 3 21:16:44 2022 +0100

    no create table in slow queries
---
 configs/etc/monitor/postgres-exporter.yaml |  2 +-
 experiment/env                             |  2 ++
 experiment/scripts/database.sh             | 12 ++++++------
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/configs/etc/monitor/postgres-exporter.yaml 
b/configs/etc/monitor/postgres-exporter.yaml
index dc992d1..5fe00fb 100644
--- a/configs/etc/monitor/postgres-exporter.yaml
+++ b/configs/etc/monitor/postgres-exporter.yaml
@@ -159,7 +159,7 @@ pg_database:
         description: "Disk space used by the database"
 
 pg_stat_statements:
-  query: "SELECT t2.rolname, t3.datname, substring(query from 1 for 265) as 
query, calls, total_exec_time / 1000 as total_time_seconds, min_exec_time / 
1000 as min_time_seconds, max_exec_time / 1000 as max_time_seconds, 
mean_exec_time / 1000 as mean_time_seconds, stddev_exec_time / 1000 as 
stddev_time_seconds, rows, shared_blks_hit, shared_blks_read, 
shared_blks_dirtied, shared_blks_written, local_blks_hit, local_blks_read, 
local_blks_dirtied, local_blks_written, temp_blks_read, temp_blk [...]
+  query: "SELECT t2.rolname, t3.datname, substring(query from 1 for 265) as 
query, calls, total_exec_time / 1000 as total_time_seconds, min_exec_time / 
1000 as min_time_seconds, max_exec_time / 1000 as max_time_seconds, 
mean_exec_time / 1000 as mean_time_seconds, stddev_exec_time / 1000 as 
stddev_time_seconds, rows, shared_blks_hit, shared_blks_read, 
shared_blks_dirtied, shared_blks_written, local_blks_hit, local_blks_read, 
local_blks_dirtied, local_blks_written, temp_blks_read, temp_blk [...]
   master: true
   metrics:
     - rolname:
diff --git a/experiment/env b/experiment/env
index 944e7d5..2f8fd33 100644
--- a/experiment/env
+++ b/experiment/env
@@ -74,6 +74,8 @@ DB_NAME=taler-exchange
 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
 # If exchanges should connect to pgBouncer rather than to the db directly
 USE_PGBOUNCER=false
 # If the taler-exchange database should be sharded
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 81b47f9..94ab27a 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -68,9 +68,9 @@ function setup_config() {
   log_destination=syslog
   log_error_verbosity=terse
   syslog_ident='taler-database'
-  log_min_duration_statement=150
+  log_min_duration_statement=${DB_MIN_DURATION_STATEMENT}
   shared_preload_libraries='pg_stat_statements,auto_explain'
-  auto_explain.log_min_duration='150ms'
+  auto_explain.log_min_duration='${DB_MIN_DURATION_STATEMENT}ms'
   auto_explain.log_verbose=true
   auto_explain.log_nested_statements=off
   auto_explain.log_analyze=true
@@ -82,9 +82,9 @@ function setup_config() {
   # (NOTE: on partitions!)
   # ALTER TABLE known_coins_default
   #  SET (autovacuum_vacuum_scale_factor = 0.0, autovacuum_vacuum_threshold = 
1000);
-  #log_autovacuum_min_duration=0
-  #autovacuum_vacuum_scale_factor=0
-  #autovacuum_vacuum_threshold=1000
+  log_autovacuum_min_duration=0
+  autovacuum_vacuum_scale_factor=0
+  autovacuum_vacuum_threshold=1000
 
   # use 25% of the available memory 
   # (https://www.postgresql.org/docs/13/runtime-config-resource.html)
@@ -294,7 +294,7 @@ EOF
 case ${1} in 
   init)
     setup_config
-    setup_disks
+    #setup_disks
     # setup_ram_storage
     init_db
     setup_pgbouncer

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