[RESOLVED] ZoneMinder 1.25.0 extremely slow to log in et al

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
CarlC
Posts: 10
Joined: Tue Dec 11, 2012 5:59 pm

[RESOLVED] ZoneMinder 1.25.0 extremely slow to log in et al

Post by CarlC » Tue Dec 11, 2012 7:25 pm

Logging into my ZoneMinder setup is extremely slow for some reason. It has always been this way it seems, but I don't think it should take me 5 minutes to log into a website. Nor should it take that long to update settings on cameras, etc.

The server on which things are running has 2 quad core CPUs and 6 GB of RAM. There just isn't any reason that I can see for this slowness.

anyone else have this problem? Solutions?
Last edited by CarlC on Fri Dec 14, 2012 11:25 pm, edited 1 time in total.

PatMcLJr
Posts: 28
Joined: Sun Sep 07, 2008 5:56 pm
Location: earth
Contact:

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by PatMcLJr » Wed Dec 12, 2012 2:01 pm

dunno,
maybe you could turn the user login off and use .htaccess

is it a server install or is zm running on a desktop install?
what's the load on the system?
----
evil doers beware, someone is watching you,
hopefully me!

CarlC
Posts: 10
Joined: Tue Dec 11, 2012 5:59 pm

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by CarlC » Wed Dec 12, 2012 7:01 pm

Server load on average is 8 and it is indeed a dedicated server install.

If I disable the authentication, and just let it go through (ZM_AUTH = 0) it still takes 5 minutes or more to show me the main console screen with all the cameras and there just isn't any reason for it that I can see and it's driving me nutso.

Addtionally, at around 8am or 9am in the morning, this server uses up a whack of space on the main / volume and then clears up after an hour or so. It seems to be related to ZM but I can't see a real reason for it.

PatMcLJr
Posts: 28
Joined: Sun Sep 07, 2008 5:56 pm
Location: earth
Contact:

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by PatMcLJr » Wed Dec 12, 2012 7:33 pm

8 as in eight ?

I didn't know the OS would even work over 4

have you tried to see what's sucking up all the resources with top ?

It sounds like the the memory is all used up and it's swapping, that makes mine crawl to a stop.

regular at times things should be identifiable in crontab or your zm filters

not a zm install but I have a fedora desktop that does something called prelinking, it acts like what you describe, what OS are you using?
----
evil doers beware, someone is watching you,
hopefully me!

kuehnem
Posts: 10
Joined: Wed Dec 12, 2012 3:47 am

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by kuehnem » Thu Dec 13, 2012 2:58 am

Are you using analog or IP cameras? What modes are you using? (record, mocord, motion, monitor)

I had a problem with running slowly on my fist test box. It was an older P4 PC with only a 5400rpm HD. Once I moved to a machine with the same processor and same RAM, but two 7200 HDs (one for / and one for /var) everything was groovy.

What do you see when you go to the console and type: TOP

8 is way too high. 4 on mine means hosed.

CarlC
Posts: 10
Joined: Tue Dec 11, 2012 5:59 pm

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by CarlC » Thu Dec 13, 2012 5:54 pm

Yes 8 as in 8 as the top command will show. We run 18 cameras, all IP based, all but a couple are in motdect mode. All but the main cameras are AXIS cameras. The Gym Cameras are cheap DLink IP cameras as they don't need to have the features of the AXIS cameras. And one other camera is different.

See attached Screenshots.

The screenshot shows a different load just because it was done at a different time. But fact is it takes forever and a day to log into the system. It takes forever and a day to 'reconnect' a camera that ZoneMinder 'looses' (just click the ip and click save is usually enough to fix it, but it shouldn't happen at all). The red cameras at the top are disabled as they were taken out by an electrical storm blowing the transformer. We just haven't replaced them yet.

AXIS Cameras seem to 'lock up' a lot when being monitored throughout the day by security. Happens in Firefox and IE. Lots of functions are slow to respond. This is a decently powered server (2 quad core CPUs), running Open Suse in a rack in our server room.

$> uname -a
$> Linux security 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux

Any help is appreciated because something is sure amiss.
Attachments
beholder-cameras.png
List of cameras
beholder-cameras.png (65.8 KiB) Viewed 3153 times
beholder-top.png
beholder-top.png (133.68 KiB) Viewed 3153 times

PatMcLJr
Posts: 28
Joined: Sun Sep 07, 2008 5:56 pm
Location: earth
Contact:

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by PatMcLJr » Thu Dec 13, 2012 7:30 pm

I don't think it would help much but maybe some more memory?

Also, I would try and disable the red cameras and the Monitor cameras to see if that helps reduce the load.

and I would take a look at iotop to see if the io is over taxed.
----
evil doers beware, someone is watching you,
hopefully me!

CarlC
Posts: 10
Joined: Tue Dec 11, 2012 5:59 pm

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by CarlC » Thu Dec 13, 2012 7:34 pm

red cameras are disabled. We actually look at the other ones from time to time. The 'lab' one with the 169.x.x.x ip is also supposed to be disabled, but all the cameras show up here. It still doesn't solve the problem I am experiencing, even when all cameras are live. Same problem 5min login to access cameras. Long time to access certain features also. It's nutso and just shouldn't be.

Server is NOT IO bound, but I will look into iotop.

kuehnem
Posts: 10
Joined: Wed Dec 12, 2012 3:47 am

Re: ZoneMinder 1.25.0 extremely slow to log in et al

Post by kuehnem » Thu Dec 13, 2012 9:41 pm

Red means the camera isn't currently connected, but ZM is tyring to connect to it. If you haven't already you should click the motdect and set it to NONE. This actually places that monitor offline in ZM and it won't waste time trying to connect to it.

Ok, now what resolution are you using on the ones that are green? 640x480? 1280? How many FPS?

And I'm assuming that ZM is just using a single volume? Everything is on the same hard drive?

CarlC
Posts: 10
Joined: Tue Dec 11, 2012 5:59 pm

[Resolved] Re: ZoneMinder 1.25.0 extremely slow to log in et

Post by CarlC » Fri Dec 14, 2012 11:15 pm

ok. I got the slow login issue resolved after quite a bit of investigation. Turns out that only a user with admin privs were slow to login. The regular users were pretty quick. That lead me down some paths of investigation looking at the MySQL database. 'show processlist;' while in MySQL and attempting to log in showed that it was logging a bunch of info to the Logs table. This resulted in table locks on a MyISAM table and really slowed things down. But that's not the crux of it. Turns out, the system was set in the default 'Log everything' mode. So while the Logs table cuts off at 7 days like it's supposed to, 7 days worth of logs at Info and above were 41million rows!!

So I changed the log levels to only be Errors and deleted everything in the Logs table (since it's also logged to the regular log files in /var/log, wasn't worried about loosing anything). Low and behold...logging in is 100x faster and should probably remain that way.

To answer the other questions, the AXIS Cameras are set up with a 320x240 resolution, but 16-bit color and motion detection (which I'm reading an article on this site about how to move that to the cameras). I also did disable the 'red' cameras to stop the server from looking for them, but that's not what is slowing the server down as the load is about the same.

I still have another issue or two, but I will start that in a separate thread once I do some more testing under these new settings. I consider my initial problem now solved. Thanks everyone for their input, it's greatly appreciated.

koolb
Posts: 14
Joined: Tue Oct 04, 2011 3:30 am

Re: [RESOLVED] ZoneMinder 1.25.0 extremely slow to log in et

Post by koolb » Thu Dec 27, 2012 6:19 am

I am aware that you can use a special perl patch to use the axis built in cameras's motion detection. This will offload your server's cpu for handling cameras that do not do motion detection...I can't recall where I had seen that specific article, but it's arond on this site somewhere...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest