Re: Overload after some minutes, please help!

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Overload after some minutes, please help!
Дата
Msg-id 20061019160350.GY71084@nasby.net
обсуждение исходный текст
Ответ на Overload after some minutes, please help!  ("Peter Bauer" <peter.m.bauer@gmail.com>)
Ответы Re: Overload after some minutes, please help!  ("Peter Bauer" <peter.m.bauer@gmail.com>)
Список pgsql-general
On Thu, Oct 19, 2006 at 01:57:56PM +0200, Peter Bauer wrote:
In the update statement, don't wrap the ID values in quotes. At best
it's extra work; at worse it will fool the planner into not using the
index.

> shared_buffers = 1000           # min 16 or max_connections*2, 8KB each

This is *way* too small for what you're trying to do. Try a minimum of
10% of memory, and 50% of memory may be a better idea.

> #temp_buffers = 1000            # min 100, 8KB each
> #max_prepared_transactions = 5      # can be 0 or more
> # note: increasing max_prepared_transactions costs ~600 bytes of shared memory
> # per transaction slot, plus lock space (see max_locks_per_transaction).
> work_mem = 20480                # min 64, size in KB,

Making that active might help a lot, but beware of running the machine
out of memory...

> #max_fsm_pages = 20000          # min max_fsm_relations*16, 6 bytes each

Probably needs to get increased.

> #bgwriter_delay = 200           # 10-10000 milliseconds between rounds
> #bgwriter_lru_percent = 1.0     # 0-100% of LRU buffers scanned/round
> #bgwriter_lru_maxpages = 5      # 0-1000 buffers max written/round
> #bgwriter_all_percent = 0.333       # 0-100% of all buffers scanned/round
> #bgwriter_all_maxpages = 5      # 0-1000 buffers max written/round

The background writer might need to be tuned more aggressively.

> #checkpoint_warning = 30        # in seconds, 0 is off

I'd set that closer to 300 to make sure you're not checkpointing a lot,
though keep in mind that will impact failover time.

> effective_cache_size = 44800        # typically 8KB each

The machine only has 1/2G of memory?

> #autovacuum_naptime = 60        # time between autovacuum runs, in secs

I'd drop that to 30.

> #autovacuum_vacuum_threshold = 1000 # min # of tuple updates before
>                     # vacuum
> #autovacuum_analyze_threshold = 500 # min # of tuple updates before
>                     # analyze
> #autovacuum_vacuum_scale_factor = 0.4   # fraction of rel size before
>                     # vacuum
> #autovacuum_analyze_scale_factor = 0.2  # fraction of rel size before
>                     # analyze

I'd cut the above 4 in half.

--
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Stats Collector Won't Start
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Stats Collector Won't Start