Multiple servers

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
kradoow
Posts: 15
Joined: Mon Jan 21, 2019 7:48 pm

Multiple servers

Post by kradoow »

I set up multiple servers (2) for zoneminder. when I log on to servers 1 and 2 I can see all the cameras. I was wondering if it is beneficial to have a few cameras connected to 1 server and the remainder connected to the other. I tried adding one to the new server but it would not display anything. I chose server 2 in the server section of the camera. I have the original server as the storage area and db, is this the correct way to do this? does server 1 need to know anything about server 2 in the zm.conf file? I only setup server 2 in one spot on server one, options -> servers.
also on the servers page of serever1 I see this:
Name Url Path To Index Path To ZMS Path To Api Status Monitors CpuLoad
server1 http://10.1.3.1:80 /zm/index.php /zm/cgi-bin/nph-zms /zm/api NotRunning 10 1.2
server2 http://10.1.3.2:80 /zm/index.php /zm/cgi-bin/nph-zms /zm/api Unknown 0
Hopefully, I made some sense.

Thanks,
John
kradoow
Posts: 15
Joined: Mon Jan 21, 2019 7:48 pm

Re: Multiple servers

Post by kradoow »

I just noticed on server2 that the server says it is stopped, in the upper right even though I can see the cameras. When I hit start->apply it does not change status.
kradoow
Posts: 15
Joined: Mon Jan 21, 2019 7:48 pm

Re: Multiple servers

Post by kradoow »

I think I figured it out, because it is working now. I had versions 26 and 23 I looked in the log files and saw a FAT error stating the server was a higher number than the database, so I upgraded sever1 to the same version. For now, it seems to be working.
kradoow
Posts: 15
Joined: Mon Jan 21, 2019 7:48 pm

Re: Multiple servers

Post by kradoow »

So I am disappointed I expected CPU and bandwidth levels to drop (kind of be split amongst the servers) when adding another server. I guess I do not quite understand the benefit of having another server. Could someone explain to me the benefits?
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: Multiple servers

Post by Maximo1970 »

I also run a multi server setup, but have a separate DB server. My setup has 4 frontend servers, each with three cameras. They vary in terms of CPU load, all down to the camera, location, and amount of activity. I've moved cameras around to try and balance the load, but presently this isn't managed within ZoneMinder.
User avatar
Acewiza
Posts: 72
Joined: Thu Dec 31, 2020 4:52 pm

Re: Multiple servers

Post by Acewiza »

Maximo1970 wrote: Thu Apr 22, 2021 12:31 pm I also run a multi server setup, but have a separate DB server. My setup has 4 frontend servers, each with three cameras. They vary in terms of CPU load, all down to the camera, location, and amount of activity. I've moved cameras around to try and balance the load, but presently this isn't managed within ZoneMinder.
That's like exactly the opposite of what I'm doing. I run 12 cams on one server - the same box that also performs firewall, database, routing, and hosting a wordpress site while being used as my personal workstation. It hums along at an average 70-80% CPU load, driving 4 displays with a montage running somewhere always. It'll only do 1 XP VM, tho. Launching a Win10 Virtualbox session without stopping ZM locks it up - not for lack of RAM.
User avatar
Bluemax
Posts: 121
Joined: Wed Jun 12, 2019 5:15 pm

Re: Multiple servers

Post by Bluemax »

12 cams on what resolution/fps? How much ram? ZM is in a VM?
User avatar
Acewiza
Posts: 72
Joined: Thu Dec 31, 2020 4:52 pm

Re: Multiple servers

Post by Acewiza »

No, straight up, all default. 32Gig. Never uses more than 60% of that resource.

Resolutions vary, mostly pretty high, one VERY high.

I'm curious to know what resource resolution eats, because bandwidth is nominal/small overall.

Generally speaking, ZM is a resource hog. It constitutes >90% of the workload on this busy PC.
User avatar
Acewiza
Posts: 72
Joined: Thu Dec 31, 2020 4:52 pm

Re: Multiple servers

Post by Acewiza »

ZM never saw a CPU cycle it didn't eat! :lol: Don't get me wrong - I LOVE Zoneminder, compared to the last app I used for this. But it's making me build a new PC for what I am asserting is a not good reason. :shock:

It should be an interesting comparo, to see what the same system does on double the hardware....
User avatar
Acewiza
Posts: 72
Joined: Thu Dec 31, 2020 4:52 pm

Re: Multiple servers

Post by Acewiza »

Bluemax wrote: Sun Apr 25, 2021 10:08 am 12 cams on what resolution/fps? How much ram? ZM is in a VM?

You ask alot of questions... :P

I can embellish my answers more if needed... :wink:
User avatar
Bluemax
Posts: 121
Joined: Wed Jun 12, 2019 5:15 pm

Re: Multiple servers

Post by Bluemax »

If i'm not wrong, Zoneminder still runs on RGB that involves YV12->RGB conversion. That costs a lot. I can remember back in the days when Avisynth was upgraded to work natively in YV12. It was a massive speed gain.

But 12 cameras is an impressive count nevertheless. I can barely run one 2160p camera (with 4GB RAM).
User avatar
Andyrh
Posts: 243
Joined: Sat Oct 28, 2017 3:55 am

Re: Multiple servers

Post by Andyrh »

It just depends on your needs, I run 5 cameras, 3,4,4,5,8 mp at frame rates of 10 and 8 FPS. All modect. My Intel(R) Core(TM) i7-2700K CPU @ 3.50GHz runs in the 2-4 load range out of a possible 8. The store is software RAID5.
Memory usage is not bad either:
free -m
total used free shared buff/cache available
Mem: 15936 2875 198 3394 12862 9338
Swap: 4095 44 4051


If I needed 20 or 30 FPS then better HW would be needed, but my needs are modest, just watching the street and yard. :)
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
lbm
Posts: 87
Joined: Mon Mar 26, 2018 7:44 pm

Re: Multiple servers

Post by lbm »

kradoow wrote: Wed Apr 21, 2021 10:06 pm So I am disappointed I expected CPU and bandwidth levels to drop (kind of be split amongst the servers) when adding another server. I guess I do not quite understand the benefit of having another server. Could someone explain to me the benefits?
They do not work in a cluster per say. So what you have done, its adding to servers, which uses the same cameras, which would give you the same load on each server. For this usage, its about redudancy, so you would be able to have one server down, without "downtime".
User avatar
Acewiza
Posts: 72
Joined: Thu Dec 31, 2020 4:52 pm

Re: Multiple servers

Post by Acewiza »

Needs/wants. Seems like I always need an upgrade and want something better... 8)
10:10:59 up 1 day, 3:40, 1 user, load average: 39.64, 35.99, 34.65
It ran a week like that before I booted it yesterday, actually taching >90% continuously with Montage up. Running around 150°F, so not getting hot. Pretty intense.
User avatar
Acewiza
Posts: 72
Joined: Thu Dec 31, 2020 4:52 pm

Re: Multiple servers

Post by Acewiza »

Bluemax wrote: Mon Apr 26, 2021 9:06 pm If i'm not wrong, Zoneminder still runs on RGB that involves YV12->RGB conversion.
Would that explain why Montage alone consumes around 30% of the load? I don't know much about the down-in-the-weeds video stuff, but it sure feels like this code is running in alot of very tight loops.
Post Reply