hi everyone,
i have 3 problems to down CPU performmance
1 :
_ i installed libjpeg-turbo but how to configure and check zoneminder run libjpeg-turbo ?
2 :
_ i install zoneminder 1.3 on Centos 7 64 bit , CPU is Xeon "westmere" , how to config gcc to optimize hardware and zoneminder ?
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC
3 :
_ how to config centos or zoneminder use jpeg instead of mjpeg ?
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.
http://zoneminder.readthedocs.io/en/lat ... o-much-cpu
how to configure and check zoneminder run libjpeg-turbo
-
- Posts: 10
- Joined: Tue Jan 24, 2017 5:10 am
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: how to configure and check zoneminder run libjpeg-turbo
I'm a bit confused here. You've stated your desire to reduce cpu load, and you even quoted the documentation (that's good +1). The referenced documentation suggests what you should do.
However, you haven't actually done any of the steps in the documentation you referenced. At least you haven't told us you did. Instead, you're going down a path, which is going to be a lot of work, but yield no perceptible gain. So before you do that, let me stop you.
Instead, do what is stated in the referenced documentation:
- reduce frame rate (5 fps is perfect)
- reduce resolution
- use a color depth other than 24. 32bit is faster
But to answer your questions:
1) Just do this:
libjpeg-turbo has been the defacto standard of all major linux distros for several years now. There is no longer any need to verify you have it installed or try to create a special build against libjpeg-turbo.
2) The way to do that is to modify the C and CXX flags in the main CMakeLists.txt file. However, this will not get you any perceptible gain.
Here are the instructions for rebuilding zoneminder on redhat distros:
http://zoneminder.readthedocs.io/en/lat ... -from-srpm
3) The literal answer to your question is zoneminder transcodes all incoming streams, whether that be h264, jpeg, mpjeg, etc into many jpegs. However, that probably isn't the question you meant to ask. What you probably mean is how to configure your camera for snapshot mode, but we can't answer that until you tell us about your camera. We need to know make/model of camera and we need to see how you've got your camera configured in zoneminder.
In summary, follow what has been suggested in the referenced documentation instead of attempting to rebuild zoneminder.
If you still have questions, then we need to see quantitative data. If the cpu load is high, tell us what hardware you are using, how many cores, ram, etc and exactly what the load is.
Have frame rate, resolution, streamtype questions? Then you need to tell us what camera you are using and how you have it currently configured.
In all cases, we need to see what your log files say.
However, you haven't actually done any of the steps in the documentation you referenced. At least you haven't told us you did. Instead, you're going down a path, which is going to be a lot of work, but yield no perceptible gain. So before you do that, let me stop you.
Instead, do what is stated in the referenced documentation:
- reduce frame rate (5 fps is perfect)
- reduce resolution
- use a color depth other than 24. 32bit is faster
But to answer your questions:
1) Just do this:
Code: Select all
rpm -q libjpeg-turbo
2) The way to do that is to modify the C and CXX flags in the main CMakeLists.txt file. However, this will not get you any perceptible gain.
Here are the instructions for rebuilding zoneminder on redhat distros:
http://zoneminder.readthedocs.io/en/lat ... -from-srpm
3) The literal answer to your question is zoneminder transcodes all incoming streams, whether that be h264, jpeg, mpjeg, etc into many jpegs. However, that probably isn't the question you meant to ask. What you probably mean is how to configure your camera for snapshot mode, but we can't answer that until you tell us about your camera. We need to know make/model of camera and we need to see how you've got your camera configured in zoneminder.
In summary, follow what has been suggested in the referenced documentation instead of attempting to rebuild zoneminder.
If you still have questions, then we need to see quantitative data. If the cpu load is high, tell us what hardware you are using, how many cores, ram, etc and exactly what the load is.
Have frame rate, resolution, streamtype questions? Then you need to tell us what camera you are using and how you have it currently configured.
In all cases, we need to see what your log files say.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 10
- Joined: Tue Jan 24, 2017 5:10 am
Re: how to configure and check zoneminder run libjpeg-turbo
Thanks you all for your informantion.knnniggett wrote:I'm a bit confused here. You've stated your desire to reduce cpu load, and you even quoted the documentation (that's good +1). The referenced documentation suggests what you should do.
However, you haven't actually done any of the steps in the documentation you referenced. At least you haven't told us you did. Instead, you're going down a path, which is going to be a lot of work, but yield no perceptible gain. So before you do that, let me stop you.
Instead, do what is stated in the referenced documentation:
- reduce frame rate (5 fps is perfect)
- reduce resolution
- use a color depth other than 24. 32bit is faster
But to answer your questions:
1) Just do this:libjpeg-turbo has been the defacto standard of all major linux distros for several years now. There is no longer any need to verify you have it installed or try to create a special build against libjpeg-turbo.Code: Select all
rpm -q libjpeg-turbo
2) The way to do that is to modify the C and CXX flags in the main CMakeLists.txt file. However, this will not get you any perceptible gain.
Here are the instructions for rebuilding zoneminder on redhat distros:
http://zoneminder.readthedocs.io/en/lat ... -from-srpm
3) The literal answer to your question is zoneminder transcodes all incoming streams, whether that be h264, jpeg, mpjeg, etc into many jpegs. However, that probably isn't the question you meant to ask. What you probably mean is how to configure your camera for snapshot mode, but we can't answer that until you tell us about your camera. We need to know make/model of camera and we need to see how you've got your camera configured in zoneminder.
In summary, follow what has been suggested in the referenced documentation instead of attempting to rebuild zoneminder.
If you still have questions, then we need to see quantitative data. If the cpu load is high, tell us what hardware you are using, how many cores, ram, etc and exactly what the load is.
Have frame rate, resolution, streamtype questions? Then you need to tell us what camera you are using and how you have it currently configured.
In all cases, we need to see what your log files say.
I have the problem of CPU usage is too high.
My ZM Config is below:
* Hardware
- Xeon Quad Core E5420 (westmere EP)
- 12 GB RAM
- 10TB HDD (RAID 5)
* Software
- Centos 7 64 bit
- ZM 1.3
* Config
- libjpeg-turbo Enable
- config gcc to optimize for Westmere CPU
* Camera (40 Monitors mixed if ONVIF IP camera & rpts stream from DVR)
Eache monitor stream. Record mode: Motect
- Res: D1 (704x576)
- Quality: Good (6/10)
- fps: 15
- Color depth: 24 bit
- Source: FFMEG
Link: rtsp://192.168.99.51:554/user=admin&password=&channel=1&stream=0.sdp?real_stream
Mentod: RTP/RTSP
Analyst FPS: 15
Image blend: 6.25%
Other are default values.
Please help me to find out what's cause the problem
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: how to configure and check zoneminder run libjpeg-turbo
Well, the cause of the problem is you are trying to do way too much than your server can handle.
The information you provided is a good start, but we need to know what the system load is. Please tell us that.
As mentioned previously, set the color depth to 32 and lower the frame rate in each camera (set it in the camera, not in zoneminder).
Leave Analyse FPS empty. Set the framerate to 5 fps in every camera.
Watch the system load and tell us what it is.
Since you only have 4 cores, you don't want a load higher than 3. Also, because you have 40 cameras, I suspect you will have to lower the frame rate further, probably down to just 1 fps ....and if the load is still greater than 3 then it will be time to buy a new server.
The information you provided is a good start, but we need to know what the system load is. Please tell us that.
As mentioned previously, set the color depth to 32 and lower the frame rate in each camera (set it in the camera, not in zoneminder).
Leave Analyse FPS empty. Set the framerate to 5 fps in every camera.
Watch the system load and tell us what it is.
Since you only have 4 cores, you don't want a load higher than 3. Also, because you have 40 cameras, I suspect you will have to lower the frame rate further, probably down to just 1 fps ....and if the load is still greater than 3 then it will be time to buy a new server.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 10
- Joined: Tue Jan 24, 2017 5:10 am
Re: how to configure and check zoneminder run libjpeg-turbo
thank you for your help , it works fine with configure of 5 fps and 32 color.
i would like to ask more questions :
1. why "record" mode use much CPU more than "modect" mode , i think in "modect" mode zoneminder have to analyze frame.
2. Is there any other way to schedule change funtion mode (from modect <-> record) other than Running state. Because channing running state by crontab make a moment that nothing recorded.
i would like to ask more questions :
1. why "record" mode use much CPU more than "modect" mode , i think in "modect" mode zoneminder have to analyze frame.
2. Is there any other way to schedule change funtion mode (from modect <-> record) other than Running state. Because channing running state by crontab make a moment that nothing recorded.
-
- Posts: 10
- Joined: Tue Jan 24, 2017 5:10 am
Re: how to configure and check zoneminder run libjpeg-turbo
thank you for your help , it works fine with configure of 5 fps and 32 color.knnniggett wrote:Well, the cause of the problem is you are trying to do way too much than your server can handle.
The information you provided is a good start, but we need to know what the system load is. Please tell us that.
As mentioned previously, set the color depth to 32 and lower the frame rate in each camera (set it in the camera, not in zoneminder).
Leave Analyse FPS empty. Set the framerate to 5 fps in every camera.
Watch the system load and tell us what it is.
Since you only have 4 cores, you don't want a load higher than 3. Also, because you have 40 cameras, I suspect you will have to lower the frame rate further, probably down to just 1 fps ....and if the load is still greater than 3 then it will be time to buy a new server.
i would like to ask more questions :
1. why "record" mode use much CPU more than "modect" mode , i think in "modect" mode zoneminder have to analyze frame.
2. Is there any other way to schedule change funtion mode (from modect <-> record) other than Running state. Because channing running state by crontab make a moment that nothing recorded.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: how to configure and check zoneminder run libjpeg-turbo
The analysis daemon, zma, runs in every mode except monitor mode. This is because zma not only analyzes the frame, but it also writes the frames to disk. Record mode should not use more cpu resources than modect.soidenmatdo wrote: 1. why "record" mode use much CPU more than "modect" mode , i think in "modect" mode zoneminder have to analyze frame.
Write a script, which sends API calls to zoneminder to change the mode of each camera.soidenmatdo wrote: 2. Is there any other way to schedule change funtion mode (from modect <-> record) other than Running state. Because channing running state by crontab make a moment that nothing recorded.
http://zoneminder.readthedocs.io/en/stable/api.html
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/