<html>
<body>
<font size=3>At 03:48 PM 6/7/2008, Curtis Stanford wrote:<br><br>
<blockquote type=cite class=cite cite="">On 6-Jun-08, at 10:26 AM, Brad
DerManouelian wrote:<br><br>
> On Jun 6, 2008, at 9:10 AM, Curtis Stanford wrote:<br>
><br>
>> Hey everyone, here's something I've put up with for a long time
and<br>
>> thought I'd try to resolve it.<br><br>
> Is your backend swapping? Have you optimized mysql in your my.cnf
file<br>
> at all?<br>
> I have 2GB in my backend, so I set /etc/my.cnf with this:<br>
><br>
> key_buffer = 32M<br>
> table_cache = 256<br>
> sort_buffer_size = 4M<br>
> myisam_sort_buffer_size = 16M<br>
> query_cache_size = 64M<br>
> query_cache_limit = 8M<br>
> query_cache_type = 1<br>
><br>
> It's much faster than the default settings. I could probably give
it<br>
> more memory, but I do lots of transcoding and other stuff on my<br>
> backend so I didn't want to push it too much.<br><br>
Thanks Brad, yes I did optimize my.cnf:<br><br>
key_buffer = 48M<br>
table_cache = 128<br>
sort_buffer_size = 48M<br>
myisam_sort_buffer_size = 8M<br>
query_cache_size = 64M<br>
query_cache_limit = not set<br>
query_cache_type = 1<br><br>
I'll try your settings and see what happens. I only have 512M but I
<br>
don't think it's swapping much.<br><br>
Curtis</font></blockquote><br>
Also,<br><br>
Set up a daily cron job to optimize the database. Here is a copy of
what I do:<br><br>
#!/bin/sh<br>
# Optimize the database<br>
OPT_MYTHDB='/usr/share/doc/mythtv-docs-0.21/contrib/optimize_mythdb.pl'<br>
LOG='/var/log/mythtv/optimize_mythdb.log'<br>
echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}<br>
${OPT_MYTHDB} >> ${LOG}<br>
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG}<br>
</body>
</html>