Slow web access page loging in and searching events.

Support and queries relating to all previous versions of ZoneMinder
Locked
nickcol
Posts: 26
Joined: Tue Sep 06, 2005 10:08 am
Location: devon,uk

Slow web access page loging in and searching events.

Post by nickcol »

Hi,

I have had 2 zm boxes running for a few months now without any problems except that they are very slow to access via the web interface when we need to find cctv video for some events.
It can take half a day to find somthing which happened.

Workstation uses firefox and not ie6.
Network cards are all 1gig

Zm Zerver.
fc3 bittorrent distro upgraded to 1.21.4 from 1.21.3
Cpu P4 2.2ghz
Ram 512mb
850gb of storage using ldv across 3 ide drives resiser partition
4 x 4 input bt848 cheap ebay cards (1chip).
Capture around 2 frames sec due to the switching of the card as only 1 decoder chip.
16 cams - set to modect - rgb24 384x288

zm zet to purge 1000 events after 94% full
Around 299101 over 16cams at 93% full which is around 3-4 weeks of cct.

whats the best way to try and find why is so slow etc, mysql,apache,zm or what things can help it speed up on the web interface. ?

Thanks

Nick.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I suspect your problem may be database related. Do you know how many events you have in the DB?
Phil
nickcol
Posts: 26
Joined: Tue Sep 06, 2005 10:08 am
Location: devon,uk

Post by nickcol »

Hi,

On the main webpage the total of the events at the bottom is around
299,101

If having this amount of events will make things slow would updating the mysql 3.x db to 4.x help ?. Its hard to have less events as this box records 16 cams in a warehouse and we need to keep the last 3-4weeks on the hd.


Nick
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

An upgrade might well help, however I don't have the resources to actually do any benchmarking. I know that newer Mysql versions have different table types, some of which may be more appropriate to your scenario.

One thing to check in the meantime is to add slow query logging to mysql and see whether you are getting long query times. To do this etc /etc/my.cnf and add the line 'log-slow-queries' in the [mysqld] section. Then restart mysql and you should get a slow log file in /var/lib/mysql with any queries over a certain time period logged. I can't remember the default period but I think you can specify it with the slow-query-time=<time> entry in the same log file. It's worth checking the mysql docs to be sure though.
Phil
Locked