Rayson Ho writes:

 > 1) Modern DBMSs cache database pages in their own buffer pool because
 > it is less expensive than to access data from the OS. (IIRC, MySQL's
 > MyISAM is the only one that relies on the FS cache, but a lot of MySQL
 > sites use INNODB which has its own buffer pool)
 > 

The DB can and should cache data whether or not directio is used.

 > 2) Also, direct I/O is faster because it avoid double buffering.
 > 

A piece of data can be in one buffer, 2 buffers, 3
buffers. That says nothing about performance. More below.

So I guess  you  mean DIO  is  faster because it  avoids the
extra copy: dma straight to  user buffer rather than DMA  to
kernel buffer then copy to user buffer. If an  I/O is 5ms an
8K copy is  about 10 usec. Is  avoiding the copy  really the
most urgent thing to work on ?



 > Rayson
 > 
 > 
 > 
 > 
 > On 10/2/07, eric kustarz <[EMAIL PROTECTED]> wrote:
 > > Not yet, see:
 > > 6429855 Need way to tell ZFS that caching is a lost cause
 > >
 > > Is there a specific reason why you need to do the caching at the DB
 > > level instead of the file system?  I'm really curious as i've got
 > > conflicting data on why people do this.  If i get more data on real
 > > reasons on why we shouldn't cache at the file system, then this could
 > > get bumped up in my priority queue.
 > >

I can't answer this although can well imagine that the DB is 
the most efficent place to cache it's own data all organised 
and formatted to respond to queries. 

But  once the  DB has signified   to the FS that it  doesn't
require the FS to cache data  then the benefit from this RFE
is  that the memory used to   stage the data  can be quickly
recycled by ZFS  for  subsequent  operations. It  means  ZFS
memory footprint   is  more  likely to contain    useful ZFS
metadata and not cached data block we know are not likely to
be used again anytime soon.

We also would operated better in mixed DIO/non-DIO workloads.


See also:
        http://blogs.sun.com/roch/entry/zfs_and_directio

-r



 > > eric
 > > _______________________________________________
 > > zfs-discuss mailing list
 > > zfs-discuss@opensolaris.org
 > > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
 > >
 > _______________________________________________
 > zfs-discuss mailing list
 > zfs-discuss@opensolaris.org
 > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to