简体   繁体   English

postgres的性能非常慢

[英]Performance of postgres is very slow

We are using postgres 9.1 for our openerp(odoo) application. 我们在我们的openerp(odoo)应用程序中使用了postgres 9.1。 Database size is 6GB and daily our customers post data so database size increases day by day. 数据库大小为6GB,每天我们的客户发布数据,因此数据库大小每天都在增加。 From past few weeks we very experiencing very slow performance in our application. 从过去的几周开始,我们的应用程序性能一直非常缓慢。 Should I upgrade my database to version 9.6? 我应该将数据库升级到9.6版吗?

Odoo Configuration Odoo配置

db_host = False
db_port = 5432
db_password = False
xmlrpc_port=8069
limit_memory_hard = 8324800000
limit_memory_soft = 7120000000
max_cron_threads = 3 
workers = 6
auto_reload = False
longpolling_port = 8072
proxy_mode = 1
xmlrpc = True
xmlrpcs = True
xmlrpcs_port = 8071
limit_time_cpu = 600
limit_time_real = 600

Hardware Information 硬件资讯

CPU- Intel Xeon 2.5 GHz Hexa core
RAM -18GB

Postgres configuration Postgres配置

max_connections = 80
maintenance_work_mem = 1GB
effective_cache_size = 13GB
work_mem = 112MB
wal_buffers = 8MB
shared_buffers = 4GB
default_statistics_target = 50

@Bhanu , You should work on postgresql.conf . @Bhanu,您应该在postgresql.conf上工作。 You need to change some settings like max_connections,shared_buffers,effective_cache_size,work_mem,maintenance_work_mem,wal_buffers,default_statistics_target . 您需要更改一些设置,例如max_connections,shared_buffers,effective_cache_size,work_mem,maintenance_work_mem,wal_buffers,default_statistics_target

Increase the size of these variables in config file as per your hardware configuration. 根据您的硬件配置,在配置文件中增加这些变量的大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM