>>>>> "Joshua" == Joshua Chamas <joshua@stripped> writes:
Joshua> I was working with MySQL 3.22 on NT, and noticed that every
Joshua> flush_time, my tables are flushed & key buffer cache cleared.
Joshua> Why should the cache be flushed when the tables are ?
Joshua> Is there anyway to get the sync behavior of flushing without
Joshua> flushing the key buffer too ? I'm assuming the cache is
Joshua> flushed because after long idle time, my mysqld is taking very
Joshua> little memory.
On Win32 the flush is done because Win32 has some problem with many
open files and also to make it more unlikely that a table gets
corrupted when Win32 has to reboot. The major problem is that Win32
doesn't update the file size (compare to unix filenode) until the file
The automatic flush is done by closing all tables once in a while. As
the table is closed, it's not that much use to keep the key entries for the
Doing a complete flush will also help with memory fragmentation as
most used memory is freed when you do a full flush.
Joshua> I'm worried that in production, I'll have 200M maybe 400M in
Joshua> RAM cache, and this all getting flushed when mysqld does a
Joshua> flush / sync. Seems like this would hurt performance quite
Joshua> a bit.
Yes, flush it will hurt performance, but it will make your system a bit
safer from corruption in case of reboots.
If you are sure your NT will not go done unexpectedly, you can always
start mysqld with '-O flush_time=0' or '-O flush_time=0 --flush'. The
second option will do a 'sync' after each write which doesn't clear
the key cache. This will of course slow down writes with about 100 %,
but will not affect reads.
Joshua> Is this really a problem ? It is only my observations
Joshua> with testing.
If you are worried about performance you should use Unix instead of
NT. You will at once get 10-40 % better performance on the same box!