Re: Stats collector performance improvement

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Fuhr <mike(at)fuhr(dot)org>, Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, Carlos Benkendorf <carlosbenkendorf(at)yahoo(dot)com(dot)br>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Stats collector performance improvement
Date: 2006-01-03 16:43:23
Message-ID: 200601031643.k03GhNt21271@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-performance

Bruce Momjian wrote:
> Tom Lane wrote:
> A second improvement I discovered is that the statistics collector is
> calling gettimeofday() for every packet received, so it can determine
> the timeout for the select() call to write the flat file. I removed
> that behavior and instead used setitimer() to issue a SIGINT every
> 500ms, which was the original behavior. This eliminates the
> gettimeofday() call and makes the code cleaner. Second patch attached.

I have applied this second patch, with a few small stylistic
improvements.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 7.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-03 16:43:25 Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and
Previous Message Jim C. Nasby 2006-01-03 16:38:52 Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2006-01-03 19:30:33 Re: [BUGS] BUG #2129: dblink problem
Previous Message Jim C. Nasby 2006-01-03 16:35:56 Re: Stats collector performance improvement

Browse pgsql-performance by date

  From Date Subject
Next Message Hannu Krosing 2006-01-03 21:42:53 Re: Stats collector performance improvement
Previous Message Jim C. Nasby 2006-01-03 16:35:56 Re: Stats collector performance improvement