Peter Schuller wrote:
>> 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.
> 
> FWIW a MySQL database was recently moved to a FreeBSD system with
> ZFS. Performance ended up sucking because for some reason data did not
> make it into the cache in a predictable fashion (simple case of
> repeated queries were not cached; so for example a very common query,
> even when executed repeatedly on an idle system, would take more than
> 1 minute instead of 0.10 seconds or so when cached).
> 
> Ended up convincing the person running the DB to switch from MyISAM
> (which does not seem to support DB level caching, other than of
> indexes) to InnoDB, thus allowing use of the InnoDB buffer cache.
> 
> I don't know why it wasn't cached by ZFS/ARC to begin with (the size
> of the ARC cache was definitely large enough - ~ 800 MB, and I know
> the working set for this query was below 300 MB). Perhaps it has to do
> with ARC trying to be smart and avoiding flushing the cache with
> useless data? I am not read up on the details of the ARC. But in this
> particular case it was clear that a simple LRU had been much more
> useful - unless there was some other problem related to my setup or
> FreeBSD integration that somehow broke proper caching.

Neel's arcstat might help shed light on such behaviour.
        http://blogs.sun.com/realneel/entry/zfs_arc_statistics

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

Reply via email to