From: David Boreham <david_list@boreham.org>
To: pgsql-hackers@postgresql.org
Subject: Re: ice-broker scan thread
Date: Mon, 28 Nov 2005 22:20:59 -0700
Message-ID: <438BE53B.1090106@boreham.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0511282350370.13833@josh.db>
References: <Pine.LNX.4.58.0511282217470.13586@josh.db>
<Pine.LNX.4.58.0511291429330.18112@linuxworld.com.au>
<Pine.LNX.4.58.0511282350370.13833@josh.db>
Qingqing Zhou wrote:
>On Mon, 28 Nov 2005, Gavin Sherry wrote:
>
>
>>MySQL, Oracle and others implement read-ahead threads to simulate async IO
>>'pre-fetching'.
>>
>>
>
>Due to my tests on Windows (using the attached program and change
>enable_aio=true), seems aio doesn't help as a separate thread - but maybe
>because my usage is wrong ...
>
>
I don't think your NT overlapped I/O code is quite right. At least
I think it will issue reads at a high rate without waiting for any of them
to complete. Beyond some point that has to give the kernel gut-rot.
But anyway, I wouldn't expect the use of aio to make any
significant difference in an already threaded test program.
The point of aio is to allow
I/O concurrency _without_ the use of threads or multiple processes.
You could re-write your program to have a single thread but use aio.
In that case it should show the same read ahead benefit that you see
with the thread.
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david_list@boreham.org
Subject: Re: ice-broker scan thread
In-Reply-To: <438BE53B.1090106@boreham.org>
* 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