Re: reducing statistics write overhead - Mailing list pgsql-hackers

From Martin Pihlak
Subject Re: reducing statistics write overhead
Date
Msg-id 48C18DC8.90608@gmail.com
Whole thread Raw
In response to Re: reducing statistics write overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: reducing statistics write overhead  (Euler Taveira de Oliveira <euler@timbira.com>)
Re: reducing statistics write overhead  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Tom Lane wrote:
> Martin Pihlak <martin.pihlak@gmail.com> writes:
>> So, as a simple optimization I am proposing that the file should be
>> only written when some backend requests statistics. This would
>> significantly reduce the undesired write traffic at the cost of
>> slightly slower stats access.
> 
> How necessary is this given the recent fixes to allow the stats file to
> be kept on a ramdisk?
> 

Ramdisk helps, but requires additional effort to set up. Also the stats
file has a tendency to creep up on you -- as the database evolves the file
size gradually increases and suddenly the DBA is left wondering what
happened to performance.

>> Attached is a WIP patch, which basically implements this:
> 
> This patch breaks deadlock checking and statement_timeout, because
> backends already use SIGALRM.  You can't just take over that signal.
> It's possible that you could get things to work by treating this as an
> additional reason for SIGALRM, but that code is unreasonably complex
> already.  I'd suggest finding some other way.
> 

I suspected that, but somehow managed to overlook it :( I guess it was
too tempting to use it. I'll start looking for alternatives.

regards,
Martin



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCHES] libpq events patch (with sgml docs)
Next
From: Andrew Chernow
Date:
Subject: Re: [PATCHES] libpq events patch (with sgml docs)