Re: VACUUM
От | Sergey Konoplev |
---|---|
Тема | Re: VACUUM |
Дата | |
Msg-id | CAL_0b1vEt4zxf_Sk_q_dZpmkCDWd4igHSimB1Kn3qN6tSTpTBw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: VACUUM
|
Список | pgsql-ru-general |
2013/8/5 Dmitry E. Oboukhov <unera@debian.org>: > настройки про автовакуум у постгри дефолтные. > pgtop показывает что автовакуум процесс появляется/пропадает. > > все бы ничего, но VACUUM команад кладет сервак на большое время. VACUUM или VACUUM FULL. Просто VACUUM не должен по идее так делать. > что покрутить? 1. Обновиться до последнего минорного релиза версий 9+, т.к. там есть вот такой очень полезный фикс: Fix performance problems with autovacuum truncation in busy workloads (Jan Wieck) Truncation of empty pages at the end of a table requires exclusive lock, but autovacuum was coded to fail (and release the table lock) when there are conflicting lock requests. Under load, it is easily possible that truncation would never occur, resulting in table bloat. Fix by performing a partial truncation, releasing the lock, then attempting to re-acquire the lock and continue. This fix also greatly reduces the average time before autovacuum releases the lock after a conflicting request arrives. 2. Настроить autovacuum более агрессивно, например autovacuum_max_workers = 5 autovacuum_naptime = 1s autovacuum_vacuum_scale_factor = 0.05 autovacuum_analyze_scale_factor = 0.05 autovacuum_vacuum_cost_delay = 5ms 3. Если ничего выше не поможет посмотреть в строну https://code.google.com/p/pgtoolkit/ или https://github.com/reorg/pg_repack -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray.ru@gmail.com
В списке pgsql-ru-general по дате отправления: