32-bit color vs 24-bit color test results...
Posted: Sun Oct 30, 2016 9:09 am
The setup:
OS: CentOS 7 64-bit
Memory: 16 gigs
CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 cores)
Zoneminder 1.30
Zoneminder configurations that may affect results:
CPU_EXTENSIONS is enabled
FAST_IMAGE_BLENDS is disabled
JPEG_FILE_QUALITY = 90
All monitors except for one was set to "None" and disabled. Server is dedicated to Zoneminder only.
One monitor was set up new through ONVIF:
Camera: Reolink RLC-411 2560x1440@30fps 8192 bitrate h.264 (https://www.amazon.com/Security-AutoFoc ... B01B2OEZOO)
Camera settings were adjusted so that night mode ran at 30fps no matter how dark things got.
Source Type: ffmpeg
Function Modect
Enabled
Analysis FPS 5.00
Reference Image Blend %ge 12
Alarm Reference Image Blend %ge 12
source path = rtsp
Remote Method = RTP/RTSP
Capture Width 2560
Capture Height 1440
everything else is default.
Camera is inside my garage at night -- the image is static - no motion or changing light sources. The default "all" zone covers the entire image and is set to "Active" with whatever the default sensitivity setting that comes with.
I wrote this quick perl script to capture cpu usage for the two processes zmc and zma -- note that the output of ps is already averaged throughout the lifetime of the process -- I just wanted to be doubly sure. Also, I'd let things run for a few minutes before running the script to let things settle:
Results:
24-bit color:
ZMC CPU Average: 42.8775
ZMA CPU Average: 21.7991666666667
Total: 64.6766666666667
32-bit color:
ZMC CPU Average: 41
ZMA CPU Average: 24.2491666666667
Total: 65.2491666666667
Winner: 24-bit by a difference of 0.5725.
After turning on FAST_IMAGE_BLENDS and restarting Zoneminder:
24-bit color:
ZMC CPU Average: 41.9191666666667
ZMA CPU Average: 7.35916666666665
Total: 49.27833333333335
32-bit color:
ZMC CPU Average: 40.7991666666667
ZMA CPU Average: 5.5
Total: 46.2991666666667
Winner: 32-bit by a difference of 2.97916666666665
After turning off CPU_EXTENSIONS and restarting Zoneminder:
24-bit color:
ZMC CPU Average: 42.245
ZMA CPU Average: 9.93499999999999
Total: 52.17999999999999
32-bit color:
ZMC CPU Average: 40.9658333333333
ZMA CPU Average: 11.6566666666667
Total: 52.6225
Winner: 24-bit color by a difference of 0.44250000000001
After re-enabling CPU_EXTENSIONS and changing JPG quality to the default of 70:
24-bit color:
ZMC CPU Average: 42.7575
ZMA CPU Average: 7.25999999999999
Total: 50.0175
32-bit color:
ZMC CPU Average: 41.0866666666667
ZMA CPU Average: 5.5
Total: 46.5866666666667
Winner: 32-bit color by a difference of 3.4308333333333
After changing JPG quality to 100:
24-bit color:
ZMC CPU Average: 42.0925
ZMA CPU Average: 7.60000000000001
Total: 49.69250000000001
32-bit color:
ZMC CPU Average: 40.8000000000001
ZMA CPU Average: 4.8
Total: 45.6000000000001
Winner: 32-bit color by a difference of 4.09249999999991
Note: At no point did an alarm trigger during these tests.
Conclusions:
If there was big differences between the two color spaces, recent hardware doesn't show them. With that said, with ALL optimization configurations enabled, there is a slight speed improvement choosing 32-bit.
I was surprised how little the CPU_EXTENSIONS settings had on things, and how huge of an effect FAST_IMAGE_BLENDS had! This really should be defaulted to on.
Are there any other testing options people would like me to try? Anything wrong with the testing I have done? I could try to trigger an alarm for each test, but I need to figure out how to do this identically between tests.
OS: CentOS 7 64-bit
Memory: 16 gigs
CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 cores)
Zoneminder 1.30
Zoneminder configurations that may affect results:
CPU_EXTENSIONS is enabled
FAST_IMAGE_BLENDS is disabled
JPEG_FILE_QUALITY = 90
All monitors except for one was set to "None" and disabled. Server is dedicated to Zoneminder only.
One monitor was set up new through ONVIF:
Camera: Reolink RLC-411 2560x1440@30fps 8192 bitrate h.264 (https://www.amazon.com/Security-AutoFoc ... B01B2OEZOO)
Camera settings were adjusted so that night mode ran at 30fps no matter how dark things got.
Source Type: ffmpeg
Function Modect
Enabled
Analysis FPS 5.00
Reference Image Blend %ge 12
Alarm Reference Image Blend %ge 12
source path = rtsp
Remote Method = RTP/RTSP
Capture Width 2560
Capture Height 1440
everything else is default.
Camera is inside my garage at night -- the image is static - no motion or changing light sources. The default "all" zone covers the entire image and is set to "Active" with whatever the default sensitivity setting that comes with.
I wrote this quick perl script to capture cpu usage for the two processes zmc and zma -- note that the output of ps is already averaged throughout the lifetime of the process -- I just wanted to be doubly sure. Also, I'd let things run for a few minutes before running the script to let things settle:
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw(usleep nanosleep);
my $zmcCpuAverage = 0;
my $zmaCpuAverage = 0;
for (my $i = 0;$i != 120; $i++)
{
$zmcCpuAverage = $zmcCpuAverage + `ps --noheader -C zmc -o %cpu`;
$zmaCpuAverage = $zmaCpuAverage + `ps --noheader -C zma -o %cpu`;
#poll every 1/2 second
usleep(500000);
print ".";
}
$zmcCpuAverage = $zmcCpuAverage / 120;
$zmaCpuAverage = $zmaCpuAverage / 120;
print "\nZMC CPU Average: $zmcCpuAverage\n";
print "ZMA CPU Average: $zmaCpuAverage\n";
print "Total: " . ($zmcCpuAverage + $zmaCpuAverage) . "\n";
24-bit color:
ZMC CPU Average: 42.8775
ZMA CPU Average: 21.7991666666667
Total: 64.6766666666667
32-bit color:
ZMC CPU Average: 41
ZMA CPU Average: 24.2491666666667
Total: 65.2491666666667
Winner: 24-bit by a difference of 0.5725.
After turning on FAST_IMAGE_BLENDS and restarting Zoneminder:
24-bit color:
ZMC CPU Average: 41.9191666666667
ZMA CPU Average: 7.35916666666665
Total: 49.27833333333335
32-bit color:
ZMC CPU Average: 40.7991666666667
ZMA CPU Average: 5.5
Total: 46.2991666666667
Winner: 32-bit by a difference of 2.97916666666665
After turning off CPU_EXTENSIONS and restarting Zoneminder:
24-bit color:
ZMC CPU Average: 42.245
ZMA CPU Average: 9.93499999999999
Total: 52.17999999999999
32-bit color:
ZMC CPU Average: 40.9658333333333
ZMA CPU Average: 11.6566666666667
Total: 52.6225
Winner: 24-bit color by a difference of 0.44250000000001
After re-enabling CPU_EXTENSIONS and changing JPG quality to the default of 70:
24-bit color:
ZMC CPU Average: 42.7575
ZMA CPU Average: 7.25999999999999
Total: 50.0175
32-bit color:
ZMC CPU Average: 41.0866666666667
ZMA CPU Average: 5.5
Total: 46.5866666666667
Winner: 32-bit color by a difference of 3.4308333333333
After changing JPG quality to 100:
24-bit color:
ZMC CPU Average: 42.0925
ZMA CPU Average: 7.60000000000001
Total: 49.69250000000001
32-bit color:
ZMC CPU Average: 40.8000000000001
ZMA CPU Average: 4.8
Total: 45.6000000000001
Winner: 32-bit color by a difference of 4.09249999999991
Note: At no point did an alarm trigger during these tests.
Conclusions:
If there was big differences between the two color spaces, recent hardware doesn't show them. With that said, with ALL optimization configurations enabled, there is a slight speed improvement choosing 32-bit.
I was surprised how little the CPU_EXTENSIONS settings had on things, and how huge of an effect FAST_IMAGE_BLENDS had! This really should be defaulted to on.
Are there any other testing options people would like me to try? Anything wrong with the testing I have done? I could try to trigger an alarm for each test, but I need to figure out how to do this identically between tests.