- 论坛徽章:
- 0
|
状况为执行VACUUM时WEB程序偶尔会提示连不上数据库,没有发现任何错误日志.另外大家给点优化意见,服务器双xeon,2G ram。
-------------------------------------
cron:
*/30 * * * * /usr/local/pgsql/bin/vacuumdb --all --analyze -U postgres
05 03 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze --table 't_request' mysms -U postgres
-------------------------------------
sysctl -a |grep kern.ipc.shm
kern.ipc.shmmax: 134217728
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 32768
kern.ipc.shm_use_phys: 1
kern.ipc.shm_allow_removed: 0
-------------------------------------
postgresql.conf:
max_connections = 500
shared_buffers = 1000
max_prepared_transactions = 5000
work_mem = 10240
max_stack_depth = 5024
vacuum_cost_delay = 10 # 0-1000 milliseconds
vacuum_cost_page_hit = 1 # 0-10000 credits
vacuum_cost_page_miss = 10 # 0-10000 credits
vacuum_cost_page_dirty = 20 # 0-10000 credits
vacuum_cost_limit = 200 # 0-10000 credits
另外日志里大量的:
LOG: transaction ID wrap limit is 1074992275, limited by database "postgres"
不太明白是什么意思。事务ID被数据库postgers限制为1074992275?
刚从mssql转到pgsql,多多指教。 |
|