Slow to load after login

Support and queries relating to all previous versions of ZoneMinder
Locked
Plunk
Posts: 19
Joined: Thu Nov 08, 2007 8:56 pm

Slow to load after login

Post by Plunk »

After logging into zoneminder, it takes about 15 minutes for the initial page to load. After login completes and the console loads it is plenty speedy enough. It just takes a long time to log in.

I've got 4 cameras, but there are 600k+ events at any given time. All my cameras are set to modect. The hard disk hovers around 88% to 91% between automatic purges. The load according to zoneminder hovers around .79 and peaks at 1.96ish unless I'm generating an mpeg. From the terminal I launch htop and it shows an average of 15% cpu load. The mysql database is actually 2.7gig, and this is where I think the problem may lay.

Cameras all connect to the 4port card from bluecherry.net, I think its the the provideo 143 model. CPU is a core2duo 2.4ghz with 1 gig of ram and 2 500gig HDDs in a mirrored array using mdadm.

ZM version 1.23.3, was an upgrade from 1.23.2. Compiled from source. on Ubuntu 8.04.1, upgraded from 7.10. Latest version from repos of all packages not compiled.

Suggestions welcome. Thanks!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

I see three things that stick out.

mdadm handling all IO for your mirrors -->
ZM sending IO to the same mirror set.
mysql sending IO to the same mirror set.
The system I am assuming is also on the same mirror set?

While it would seem you have plenty of cycles available, I wonder what's happening at the buss. I have never really had to deal with this issue but I'm sure there must be a tool available to help give an idea what might be going on at the buss.

I usualy set up a raid1 for the system and database, then a raid5 for the events storage on any large system or one that I just plumb care enough about that I don't want to go down due to IO bottlenecks or drive failures.

Have you tried taking everything using the mysql database off line and ran a check on the database tables just in case the tables have errors?
Plunk
Posts: 19
Joined: Thu Nov 08, 2007 8:56 pm

Post by Plunk »

Disk IO I don't think was the problem, I just optimized all the tables in the zoneminder database. It took 10 whole seconds to load the console page once I logged in.

Thanks for the suggestions though cordel, I'm going to be building a larger zoneminder system here pretty soon and that made me think about how to make sure I don't have any kind of IO overload on the system.
Locked