[CentOS] Centos/Linux Disk Caching, might be OT in some ways

Ross Walker rswwalker at gmail.com
Thu Jan 28 23:54:25 UTC 2010


On Jan 28, 2010, at 11:37 AM, "nate" <centos at linuxpowered.net> wrote:

> Les Mikesell wrote:
>
>> I wonder if the generally-horrible handling that linux has always  
>> done
>> for fsync() is the real reason Oracle spun off their own distro?  Do
>> they get it better?
>
> Anyone in their right mind with Oracle would be using ASM and direct
> I/O so I don't think it was related.
>
> http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html#asm
> http://www.ixora.com.au/tips/avoid_buffered_io.htm
>
> "The file system cache should be used to buffer non-Oracle I/O only.
> Using it to attempt to enhance the caching of Oracle data just wastes
> memory, and lots of it. Oracle can cache its own data much more
> effectively than the operating system can. "
>
> Which leads me back to my original response, forget about file
> system cache if you want performance go for application level
> caching whether it's DB caching or other caching like memcached
> mentioned by someone.
>
> Oracle did it because they wanted to control the entire stack.

It isn't even file system cache that os of concern here, fsync()  
properly flushes the file systems and buffers out of the kernel. The  
problem is fsync() doesn't tell the disk drives themselves to flush  
their buffers.

Even directio by itself won't do the trick, the OS needs to make sure  
the disk drives empties it's write cache and currently barriers are  
the only way to make sure of that.

-Ross




More information about the CentOS mailing list