随着缓存消耗,Postgres性能降低

时间:2017-09-03 13:30:07

标签: postgresql performance caching memory centos

我迁移Postgres数据库9.1从服务器运行Red Hat OS,Intel(R)Xeon(R)CPU E5-2670 0 @ 2.60GHz / 16 Core,64 GB RAM,240 GB x 4,每小时300K事务Intel SSD TO Intel(R)Xeon(R)CPU E5-2680 v4 @ 2.40GHz / 56 Core,128 GB RAM,2TB nvme PCI SSD,RANDOM READ 450000 iops,RANDOM WRITE 56000 iops。 CentOS 6.9。

在一段时间内,服务器速度变慢,处理的数据量减少。如果我手动清除缓存(sync; echo 3> / proc / sys / vm / drop_caches),则数据处理恢复到最高级别。经过一段时间的加载后,性能会因处理的数据量而恶化。缓存显示它已被完全消耗。

pg配置:

datestyle = 'redwood,show_time'
db_dialect = 'redwood'
default_text_search_config = 'pg_catalog.english'
edb_dynatune = 90
edb_redwood_date = on
edb_redwood_strings = on
lc_messages = 'en_US.UTF-8'
lc_monetary = 'en_US.UTF-8'
lc_numeric = 'en_US.UTF-8'
lc_time = 'en_US.UTF-8'
shared_preload_libraries = '$libdir/dbms_pipe,$libdir/edb_gen,$libdir/plugins/plugin_debugger,$libdir/plugins/plugin_spl_debugger'
timed_statistics = off
archive_command = 'rsync -a %p slave:/opt/PostgresPlus/9.1AS/wals/%f'
archive_mode = on
listen_addresses = '*'
log_destination = 'syslog'
syslog_facility = 'LOCAL0'
logging_collector = on
log_line_prefix = '%t'
max_wal_senders = 4
port = 6432
wal_keep_segments = 128
wal_level = hot_standby
temp_buffers='50MB'
constraint_exclusion = on
autovacuum = on
enable_bitmapscan = off
max_connections = 200
shared_buffers = 32GB
effective_cache_size = 96GB
work_mem = 167772kB
maintenance_work_mem = 2GB
checkpoint_segments = 64
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100

0 个答案:

没有答案