[mythtv-users] Mythweb on a separate box is VERY slow

Shawn Asmussen asmussen at cox.net
Fri Jun 18 15:23:23 EDT 2004


> What are the specs on the boxes that were/are running mythweb?
>
> I run mythweb on the same box as mythtv and just use ssh port forwarding
> to access it over the internet if needed.  Right now when I ssh in then
> load up program listings it takes about 5 or 6 seconds to load, and
> refreshing is only about 2 or 3 seconds.
>
> I would have to guess you're either using a 486 to run apache or
> something is wrong in your configuration.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Yeah, I've done the ssh port forwarding thing too, but that's not always
convenient, particularly if you want to access it from someplace that
doesn't have an ssh client installed, or that firewalls non-web traffic.
It's much more convient to just have it directly accessible, which is why
I made the transition.

My hardware should be plenty beefy enough to handle this, both boxes in
question are P4 2.4 Ghz/800 Mhz FSB machines with 512 MB of memory. Only
the Listings page comes up slowly. The Recorded Programs page comes up
within several seconds, although the images take a while to load if I'm
accessing it remotely. That's not that surprising to me though, given the
number of images it has to load. The Scheduled Programs page comes up in
under 10 seconds. However, the Listings page loads very very slowly. Top
shows something like 99% idle cpu usage on both boxes while the page is
trying to load. Watching iostat on the myth box where mysql is running
shows almost no disk read activity during the 3 minutes while I'm waiting
for the page to load, possibly because the data is cached in memory. There
is not a significant amount of network traffic happening between the two
boxes during this time. Frankly, I just don't see where there could be any
significant bottleneck happening.

I'm just running on ext3 filesystems, but I'm not having any other
performance issues, so I don't think it's a filesystem issue, plus like I
said above there isn't much disk IO happening during a page load of the
listings page.

One non-standard thing about my system, is that instead of running mysql3,
which is what ships with FC1 (Which is what I'm running on the mythtv
box), I upgraded to mysql4. This happened because there was a period
during which some of the code that was in the cvs version of mythtv only
worked with mysql4. I misinterpretted some comments on the mythdev list at
the time to mean that this was intentional, and that mythtv was going to
require the newer mysql in the future. This wasn't true, but by the time I
realized that I could have just waited for the code to be fixed for mysql3
compatibility, I had already upgraded to version 4. However, to the best
of my recollection, the listings page has always loaded slowly, even
before this upgrade. The only reason I'm just now bringing it up is
because it got even slower when I tried to run mythweb from my other box
(Which is running FC2 btw).

I made a test.sql file which just contains 'select * from program;' and
ran this test:

[root at smith root]# time mysql -u mythtv -pmythtv -h zen mythconverg <
test.sql > test.output

real    0m1.797s
user    0m0.952s
sys     0m0.758s

[root at smith root]# ls -alFrt test.output
-rw-r--r--  1 root root 13570030 Jun 18 12:11 test.output


So, you can see that remotely querying the program table from the box I'm
trying to run mythweb on allows me to dump the whole 13.5 MB of data in
the program table in under 2 seconds. I don't know if this is a
comprehensive enough test to draw a complete conclusion from, but it at
least suggests to me that the database should be serving up queries in a
reasonable amount of time.

If there is something in my configuration somewhere that needs tweaking, I
don't know what it would be, but I'd welcome any suggestions/theories on
what might be going on.

Shawn Asmussen


More information about the mythtv-users mailing list