Tamar,

The only way to fill the caches up is to execute queries.  If there is a
delay between your server coming up and the application being used, try
executing the queries that your application will use from a start-up script
(you'll need to work these out carefully.  This way the caches will be full
of the correct data when the application makes it's first queries. If the
application starts straight away at boot time, you're stuck.

As for, the system gong slow after being inactive, this sounds like your
system could be swapping.  This could be caused by your caches taking up all
or most of the available memory, leaving none for the operating system and
other things running.  When your application goes idle, the operating system
will copy its cache memory into swap space on the disk, and read its own and
other applications memory back from the swap space into memory.  The
solutions to this are
1) Add more memory
2) Reduce the size of your caches so there is enough memory left for the
rest of the system.

Of course, the initial delay could be related to swapping too.

Andy

> -----Original Message-----
> From: Tamar Rosen [mailto:[EMAIL PROTECTED]
> Sent: 10 September 2004 12:56
> To: [EMAIL PROTECTED]
> Subject: How can I avoid warm-up time?
> 
> Hi,
> 
> 
> 
> We are now in the last phases of testing a new system on Mysql. We are
> using all MyISAM tables, on Linux.
> 
> 
> 
> We found that after the mysql server is restarted, our application is very
> slow for a couple of minutes. We understand that this is because the
> caches have to fill up first - the mysql key cache (we made it big enough
> to hold all the indexes) and the OS cache.
> 
> 
> 
> My question: is there any way we can preload the caches so that we don't
> experience this warm-up time?
> 
> 
> 
> Also, we found that if the server is not active for some time, say
> overnight, then again we experience the warm-up time, even though the
> mysql server was not restarted. This leads to totally unpredictable
> performance. At very low loads, the times are the worse!!!
> 
> 
> 
> If anyone had a similar experience and/or possible suggestions on how to
> solve this problem, it will be greatly appreciated.
> 
> 
> 
> Thanks,
> 
> 
> 
> Tamar Rosen
> 
> www.gurunet.com
> 
> 
> 
> 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to