Unix Technical Forum

Re: O_DIRECT support for Windows

This is a discussion on Re: O_DIRECT support for Windows within the pgsql Hackers forums, part of the PostgreSQL category; --> Magnus Hagander <magnus@hagander.net> wrote: > IIRC, we're still waiting for performance numbers showing there exists a > win from ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 09:01 AM
ITAGAKI Takahiro
 
Posts: n/a
Default Re: O_DIRECT support for Windows

Magnus Hagander <magnus@hagander.net> wrote:

> IIRC, we're still waiting for performance numbers showing there exists a
> win from this patch.


Here is a performance number of Direct I/O support on Windows.
There was 10%+ of performance win on pgbench (263.33 vs. 290.79) in O_DIRECT.

However, I only have a desktop-class machine for Windows.
(Pendium 4 3.6GHz with HT, 3GB of RAM, 2 ATA-drives)
Test on production-class machines might show different results.

In addition, I'm slightly worried about aligment issues reported by Magnus.
We might need fail-back-to-non-direct feature on error for safety.


$ pgbench -i -s50
$ pgbench -s50 -t8000 -c8

O_DSYNC (FILE_FLAG_WRITE_THROUGH)
263.33 tps
O_DSYNC + O_DIRECT (FILE_FLAG_WRITE_THROUGH + NO_BUFFERING)
290.79 tps

wal_sync_method = open_datasync
wal_buffers = 4MB
shared_buffers = 256MB
checkpoint_segments = 64


> > Magnus Hagander wrote:
> >> We're ok with the alignment issues provided the is code added to reject
> >> O_DIRECT if the sector size is too large.


> >>> ITAGAKI Takahiro wrote:
> >>>> The attached is a patch to define O_DIRECT by ourselves on Windows,
> >>>> and to map O_DIRECT to FILE_FLAG_NO_BUFFERING.


Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 09:01 AM
Magnus Hagander
 
Posts: n/a
Default Re: O_DIRECT support for Windows

On Wed, Mar 28, 2007 at 02:47:12PM +0900, ITAGAKI Takahiro wrote:
> Magnus Hagander <magnus@hagander.net> wrote:
>
> > IIRC, we're still waiting for performance numbers showing there exists a
> > win from this patch.

>
> Here is a performance number of Direct I/O support on Windows.
> There was 10%+ of performance win on pgbench (263.33 vs. 290.79) in O_DIRECT.


That sounds good enough to go for it.


> However, I only have a desktop-class machine for Windows.
> (Pendium 4 3.6GHz with HT, 3GB of RAM, 2 ATA-drives)
> Test on production-class machines might show different results.


Yes, that would be very good. I don't have any "server-grade" machines I
can run it on ATM. But perhaps someone else does. Stefan, you mentioned you
might have one to run other tests for me - can you run this one? Do you
have a build system on it?

> In addition, I'm slightly worried about aligment issues reported by Magnus.
> We might need fail-back-to-non-direct feature on error for safety.


A question is - is there risk that this works for weeks, and then suddenly
stops working, or will we detect it on the first attempt to write. If we
detect it on the first attempt, that's enough I think - the user can
configure it to use the old behaviour in that case. But if there is a risk
that we hit it later on, we need to automatically fallback at the time of
the write.

//Magnus


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:08 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com