Re: Huge number of disk writes after migration to 8.1

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Huge number of disk writes after migration to 8.1
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE6C7ED8@algol.sollentuna.se
обсуждение исходный текст
Ответы Re: Huge number of disk writes after migration to 8.1  (Chris Campbell <chris@bignerdranch.com>)
Re: Huge number of disk writes after migration to 8.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > Maybe the fact that the stat file is completely rewritten=20
> every 500 ms=20
> > should be reconsidered, if in the future someone chooses to rewrite=20
> > the stat system.  We can reconsider this part then, as well.
>=20
> Yeah, it's becoming pretty obvious that that design does not=20
> scale very well.  I don't immediately have any ideas about a=20
> better way though.
>=20
> I am working on some marginal hacks like not writing more of=20
> the backend activity strings than is needed, but it'd be=20
> nicer to think of a different solution.

In most cases you're going to see extremely few reads compared to writes
on pg_stats, right? So why not have the backends connect to the stats
process (or perhaps use UDP, or use the pipe, or whatever) and fetch the
data when needed. So when nobody fetches any data, there is no overhead
(except for the stats process adding up values, of course).=20

Then you could also push down some filtering to the stats process - for
example, when you are reading from pg_stat_activity there is no need to
send over the row level stats. IIRC, today you have to read (and write)
the whole stats file anyways.

//Magnus

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

Предыдущее
От: "Sundaramoorthy, Annapoorani \(Cognizant\)"
Дата:
Сообщение: Execution of stored procedures
Следующее
От: Chris Campbell
Дата:
Сообщение: Re: Huge number of disk writes after migration to 8.1