From: Neil Conway <neilc@samurai.com>
To: Andrew Sullivan <andrew@libertyrms.info>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres 7.3.1 poor insert/update/search performance
Date: 30 Jan 2003 18:18:54 -0500
Message-ID: <1043968734.3123.27.camel@tokyo> (raw)
In-Reply-To: <20030122070524.F27014@mail.libertyrms.com>
References: <13165.1043188295@sss.pgh.pa.us>
<1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com>
<20030122070524.F27014@mail.libertyrms.com>
On Wed, 2003-01-22 at 07:05, Andrew Sullivan wrote:
> (As you point out, this caclulation is complicated by the potential to
> waste memory by caching the data twice
If we had a good buffer replacement algorithm (which we currently do
not), ISTM that hot pages retained in PostgreSQL's buffer cache would
never get loaded from the OS's IO cache, thus causing those pages to
eventually be evicted from the OS's cache. So the "cache the data twice"
problem doesn't apply in all circumstances.
> Some systems, like Solaris, allow you to turn off the
> disk cache, so the problem may not be one you face.)
I think it would be interesting to investigate disabling the OS' cache
for all relation I/O (i.e. heap files, index files). That way we could
both improve performance (by moving all the caching into PostgreSQL's
domain, where there is more room for optimization), as well as make
configuration simpler: in an ideal world, it would remove the need to
consider the OS' caching when configuring the amount of shared memory to
allocate to PostgreSQL.
Can this be done using O_DIRECT? If so, is it portable?
BTW, if anyone has any information on actually *using* O_DIRECT, I'd be
interested in it. I tried to quickly hack PostgreSQL to use it, without
success...
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: neilc@samurai.com, andrew@libertyrms.info
Subject: Re: Postgres 7.3.1 poor insert/update/search performance
In-Reply-To: <1043968734.3123.27.camel@tokyo>
References: <13165.1043188295@sss.pgh.pa.us> <1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com> <20030122070524.F27014@mail.libertyrms.com> <1043968734.3123.27.camel@tokyo>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox