From ed314a3c05d6004742f2915294fb953bfa7fbf62 Mon Sep 17 00:00:00 2001 From: Yu Sun Date: Sat, 8 Oct 2022 17:54:51 +0800 Subject: [PATCH] =?UTF-8?q?perf(pg=5Fconf):=E5=A2=9E=E5=8A=A0=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9pg=E5=92=8Ctsdb=E4=BC=98=E5=8C=96=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/values.yaml | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/charts/values.yaml b/charts/values.yaml index b6514ee..f03e128 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -59,25 +59,39 @@ postgresql: - postgres - scada parameters: - max_connections: 100 - max_prepared_transactions: 150 - # This is rather small, but as this Helm Chart may be used to spin up - # 1 access node and 4 data nodes on a single minikube/microk8s this is set - # to a conservative value - shared_buffers: 300MB - work_mem: 16MB + max_connections: 300 + max_prepared_transactions: 300 + effective_cache_size: 96272MB + maintenance_work_mem: 2047MB + max_worker_processes: 367 + max_parallel_workers_per_gather: 32 + max_parallel_workers: 64 + wal_buffers: 16MB + shared_buffers: 32090MB + work_mem: 5134kB + default_statistics_target: 500 + random_page_cost: 1.1 + checkpoint_completion_target: 0.9 + max_locks_per_transaction: 512 + autovacuum_max_workers: 10 + autovacuum_naptime: 10 + effective_io_concurrency: 256 log_connections: 'on' log_line_prefix: "%t [%p]: [%c-%l] %u@%d,app=%a [%e] " log_min_duration_statement: '1s' log_statement: ddl log_checkpoints: 'on' log_lock_waits: 'on' - # These values are set as the default data volume size - # is small as well. - min_wal_size: 256MB - max_wal_size: 512MB + max_wal_senders: 0 + wal_level: minimal + fsync: false + min_wal_size: 512MB + wal_writer_delay: 1000 temp_file_limit: 1GB timescaledb.passfile: '/var/lib/postgresql/.pgpass' + synchronous_commit: 'off' + timescaledb.enable_2pc: false + timescaledb.max_background_workers: 300 # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector nodeSelector: {}