Hi,
I need some help as I need to expand my monitoring solution and based on my math I don't have enough power. Currently all is running great but I need to double the cameras and now CPU usage is 60%
I have an old Dell Optiplex 980 with an i5 3.20GHz with 12GB RAM and a DELL SSD inside it running Debian 10.5
Cameras are 4 X Hikvision DS-2CD2043G0-I doing modect on low-res and the high res is linked to low-res one. Settings attached:
Low-res
Main one:
What else do you recommend but not to decrease the resolution / FPS. During night when is not too much movement and I have black and white due to IR it still doesn't go below 40%. Any other settings I can tweak in Zoneminder? Zones are as small as possible, covering maximum 25% / camera view.
Thank you in advance.
Help with sizing / settings
Re: Help with sizing / settings
Generally when I think lower CPU, I think lower FPS / Resolution, but those aren't options here. Besides that, You can lower the pre and post image buffer. You can also adjust the zones. Use less, and make them as small as possible.
You didn't mention what your settings are in Zoneminder but it makes a difference whether you are saving JPEG or doing H264 passthrough (the latter will have the best performance). H264 encode wouldn't make sense if you already have H264 to passthrough. What are those settings?
But, in my opinion, you should just upgrade the hardware, and not worry about the settings. A dual core i5 is going to have trouble with cameras. I'd go for 8 (actual not virtual) cores, and a server CPU from 2010 or newer. Consumer CPUs just don't have the grunt required. Zoneminder is software that needs a 'real' server. This is not like running a DB or SMB file server on a server motherboard (which a lot of small businesses do) and thinking it's required, when that kind of processing can run on arm. Video analysis and processing in software eats up CPU, and you need a high performance machine.
You didn't mention what your settings are in Zoneminder but it makes a difference whether you are saving JPEG or doing H264 passthrough (the latter will have the best performance). H264 encode wouldn't make sense if you already have H264 to passthrough. What are those settings?
But, in my opinion, you should just upgrade the hardware, and not worry about the settings. A dual core i5 is going to have trouble with cameras. I'd go for 8 (actual not virtual) cores, and a server CPU from 2010 or newer. Consumer CPUs just don't have the grunt required. Zoneminder is software that needs a 'real' server. This is not like running a DB or SMB file server on a server motherboard (which a lot of small businesses do) and thinking it's required, when that kind of processing can run on arm. Video analysis and processing in software eats up CPU, and you need a high performance machine.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Re: Help with sizing / settings
Hi,
Thanks for the answer. I'm doing H264 pass through, as I'm getting already the stream encoded from camera. CPU is 2013. Are you sure the Xeon-like CPUs are ok for video decoding? I don't remember where I read but for this type of things is better to have some multimedia CPU extension.
Another thing, sorry I forgot to mention that, is for my home. I also need o keep an eye on the power consumption, cooling and most important, noise. What I have now is dead quiet.
On same machine I can upgrade to an i7. Would it make sense or I'm just throwing monies away?
Thanks again!
Thanks for the answer. I'm doing H264 pass through, as I'm getting already the stream encoded from camera. CPU is 2013. Are you sure the Xeon-like CPUs are ok for video decoding? I don't remember where I read but for this type of things is better to have some multimedia CPU extension.
Another thing, sorry I forgot to mention that, is for my home. I also need o keep an eye on the power consumption, cooling and most important, noise. What I have now is dead quiet.
On same machine I can upgrade to an i7. Would it make sense or I'm just throwing monies away?
Thanks again!
Re: Help with sizing / settings
Yes, Xeon or the AMD server CPUs. You have to cite that reference. It doesn't make sense. You are saying a consumer CPU is more powerful than a server CPU. Doubtful.
That is a constraint I haven't had. Put the server in the basement? You can have two Zoneminder servers, with 4 cameras on each. That would allow you to have consumer hardware for each. And they would be quiet. There's no limit to how many ZM servers you can run. Run 8 RPIs if you want (actually don't do this, I'm exaggerating.)
You can try the i7, but I would use a server motherboard. I don't have enough real life experience to know if moving to a higher consumer CPU is worth it.
Think what you are trying to do: You are trying to watch 4 2K videos at once, and also do some math on 4 640x320 streams. What consumer PC will allow you to do that? Maybe a current gen gaming PC? I don't know. I think you need a server, or you need to divide up the load to multiple computers.
You could also look at quiet fans. Noctua or similar.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Re: Help with sizing / settings
You have some options. Dell and HP make tower "workstations" that are essentially server motherboards and chipsets shoved into a large desktop form-factor machine.
Regarding the noise: It's the size of the fan. The smaller the fan, the faster it needs to spin to move the same amount of air. Larger fans are quieter because it takes fewer RPMs to move the same amount of air.
In terms of power consumption: There is no free lunch. Processing power is processing power. Spending an extra $100 up front might save you $20/month in electric bills. Here are some decent flea-bay options for used quiet/tower hardware:
https://www.ebay.com/sch/i.html?_nkw=DE ... 1&_fosrp=1
I have a bunch of Dell R5500 machines as my homelab. They run Xeon Westmere 5600 series CPUs. My electric bill is only reasonable because we have solar panels on the roof. Newer CPUs would both be faster... And instead of spending $50/month for electricity, we'd probably get a check back from the power company for +$50.
Regarding the noise: It's the size of the fan. The smaller the fan, the faster it needs to spin to move the same amount of air. Larger fans are quieter because it takes fewer RPMs to move the same amount of air.
In terms of power consumption: There is no free lunch. Processing power is processing power. Spending an extra $100 up front might save you $20/month in electric bills. Here are some decent flea-bay options for used quiet/tower hardware:
https://www.ebay.com/sch/i.html?_nkw=DE ... 1&_fosrp=1
I have a bunch of Dell R5500 machines as my homelab. They run Xeon Westmere 5600 series CPUs. My electric bill is only reasonable because we have solar panels on the roof. Newer CPUs would both be faster... And instead of spending $50/month for electricity, we'd probably get a check back from the power company for +$50.
Re: Help with sizing / settings
As I have no other choice for now, I have reduced the FPS to 10. I'm getting some artifacts but I can live with them. Lower than 10fps video is very ugly. It is somehow looking a bit better on CPU usage but still is not enough to double the cameras.
Does it make any sense to change the hi-res stream to record only? Will that be less stress on CPU than Nodect? Anyone has any idea on this? I plan to get an I7 in the future, that will be full tower not small form like I have now, where I can add more disks. Now I'm also limited tothe only HDD I have, a 500GB one.
Thanks a lot.
Does it make any sense to change the hi-res stream to record only? Will that be less stress on CPU than Nodect? Anyone has any idea on this? I plan to get an I7 in the future, that will be full tower not small form like I have now, where I can add more disks. Now I'm also limited tothe only HDD I have, a 500GB one.
Thanks a lot.
Re: Help with sizing / settings
I run a Dell i7 with 16GB ram, a 120GB SSD for the OS and database and a 1TB WD Green drive for data storage. Ubuntu 18.04 with LEMP and it rund 19 Cams just fine. Low res and frame rate as Zoneminder is not a HD movie system!
Re: Help with sizing / settings
Any input on how the cams are set? Thanks.