[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: remote mysql is too slow



Karl E. Jorgensen wrote:
> Bob Proulx wrote:
> > But at some point the daemon is going to need to write a file to disk.
> > That data will get cached at that time.  Or are you saying that mysql
> > is using or should using O_DIRECT and avoid the cache explicitly?
> 
> No - although that might help (marginally) too.  The point is that
> caching of data in MySQL will be more efficient than caching in the
> kernel disk cache; less layers and whatnot.

The point I was trying to make (and apparently failing miserably) is
that unless the mysql daemon is really trying hard to avoid it then as
soon as it writes a file it will end up in the filesystem buffer
cache.

In any case, from the original 'free' output it isn't possible to know
if the filesystem buffer cache is due to mysql or due to other
activity across the filesystem.  Such as backup for example.  It could
have come from any other activity.  There could be files being copied
to or from the system.  Could be anything.

Normally filesystem buffer cache is a good healthy indication.
Because if the operating system becomes starved for memory it will
free filesystem buffer cache in order to obtain it.  If a system has
no files cached and lots of truly free ram it may indicate that some
process is frequently consuming a lot of memory, forcing all buffers
to be flushed, and then exiting causing that memory to be free memory.
Free memory as opposed to working-for-you memory in the buffer cache.
Normally I would say memory used for filesystem buffer cache is good
healthy use of the memory.  And when I say normally here I am not
talking about a database daemon which will of course have special
needs.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: