Re: Multi CPU Queries - Feedback and/or suggestions wanted!

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Julius Stroffek <Julius(dot)Stroffek(at)sun(dot)com>, pgsql-hackers(at)postgresql(dot)org, Dano Vojtek <danielkov(at)gmail(dot)com>
Subject: Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Date: 2008-10-24 06:32:51
Message-ID: 49016C13.5000605@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jonah H. Harris wrote:
> fadvise is a kludge.

I don't think it's a kludge at all. posix_fadvise() is a pretty nice and
clean interface to hint the kernel what pages you're going to access in
the near future. I can't immediately come up with a cleaner interface to
do that.

Compared to async I/O, it's helluva lot simpler to add a few
posix_fadvise() calls to an application, than switch to a completely
different paradigm. And while posix_fadvise() is just a hint, allowing
the OS to prioritize accordingly, all async I/O requests look the same.

> While it will help, it still makes us completely
> reliant on the OS.

That's not a bad thing in my opinion. The OS knows the I/O hardware,
disk layout, utilization, and so forth, and is in a much better position
to do I/O scheduling than a user process. The only advantage a user
process has is that it knows better what pages it's going to need, and
posix_fadvise() is a good interface to let the user process tell the
kernel that.

> IIRC, we currently have support for rings in the buffer pool, which we could read
> directly into.

The rings won't help you a bit. It's just a different way to choose
victim buffers.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-10-24 06:50:45 Re: Multi CPU Queries - Feedback and/or suggestions wanted!
Previous Message Greg Stark 2008-10-24 05:23:04 Re: Multi CPU Queries - Feedback and/or suggestions wanted!