Libjpeg-turbo 1.0 beta Released!
Libjpeg-turbo 1.0 beta Released!
Libjpeg-turbo 1.0 is a hugely optimized version of the shared library libjpeg that provides MASSIVE performance gains over the standard libjpeg.
Since upgrading to this shared library from the standard libjpeg, we have seen a full 50% decrease in CPU load on our Zoneminder server recording 26+ cameras. This is a HUGE performance gain, and has saved us from having to buy beefier hardware to add more cameras.
Get it here:
http://sourceforge.net/projects/libjpeg-turbo/files/
Since upgrading to this shared library from the standard libjpeg, we have seen a full 50% decrease in CPU load on our Zoneminder server recording 26+ cameras. This is a HUGE performance gain, and has saved us from having to buy beefier hardware to add more cameras.
Get it here:
http://sourceforge.net/projects/libjpeg-turbo/files/
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
I'm using this for few months now and definitely saw a drop in cpu load:
http://www.virtualgl.org/DeveloperInfo/Libjpeg
Is your link the same or newer?
http://www.virtualgl.org/DeveloperInfo/Libjpeg
Is your link the same or newer?
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
The link I was referring to is this one:
http://sourceforge.net/projects/libjpeg-turbo/files/
The author has recently moved most everything from the previous location over to sourceforge.
At this location, the latest version appears to be 0.90.
http://sourceforge.net/projects/libjpeg-turbo/files/
The author has recently moved most everything from the previous location over to sourceforge.
At this location, the latest version appears to be 0.90.
-
- Posts: 3
- Joined: Mon Mar 01, 2010 12:19 am
0.0.90 is the same as 1.0.0 beta 1. It is common practice in open source development for beta versions to be numbered {last major release}.0.{very high number}. This is because packaging software generally doesn't know how to handle version numbers with letters, such as "1.0.0beta1". If there's a second beta, then it will be 0.0.91, etc. until we bump the version to 1.0.0 for the final release.
libjpeg-turbo is not automatically activated when you install it. You have to either manipulate LD_LIBRARY_PATH to use the new libraries (preferred) or replace the sym links in /usr/lib[64] to point to the new libraries. This is by design, because I don't want a million people screaming at me for installing over their system's version of libjpeg. See README-turbo.txt for more details (that file is in /usr/share/doc/libjpeg-turbo-{version} on Linux systems.)
Please see http://libjpeg-turbo.virtualgl.org for further information, including links to our mailing lists.
DRC
libjpeg-turbo is not automatically activated when you install it. You have to either manipulate LD_LIBRARY_PATH to use the new libraries (preferred) or replace the sym links in /usr/lib[64] to point to the new libraries. This is by design, because I don't want a million people screaming at me for installing over their system's version of libjpeg. See README-turbo.txt for more details (that file is in /usr/share/doc/libjpeg-turbo-{version} on Linux systems.)
Please see http://libjpeg-turbo.virtualgl.org for further information, including links to our mailing lists.
DRC
-
- Posts: 3
- Joined: Mon Mar 01, 2010 12:19 am
If you are building from the 0.0.90 source, then the default prefix is /opt/libjpeg-turbo, not /usr/local. I really discourage trying to install it in /usr. There are too many possible problems that might arise from doing that. One of the most prominent is that autotools has a default library path of "lib", not "lib64", so if you were trying to install a 64-bit version on a RedHat-type system, you'd have to do 'make install prefix=/usr libdir=/usr/lib64'. The other issue is that I don't really know what your existing install of libjpeg looks like. I could imagine a scenario in which the libjpeg-turbo files were named slightly differently and thus didn't completely replace the existing install.
Your best bet is to install one of the pre-built binary packages and follow the instructions in README-turbo.txt.
Your best bet is to install one of the pre-built binary packages and follow the instructions in README-turbo.txt.
It works for me, after a bit of trial and error.whatboy wrote:I install it with /usr not /usr/local so no... it didn't work for moi!!!
The thing not to forget about with 64-bit is that the lib directory is /usr/lib64 not /usr/lib.
When creating your symlinks in accordance with the directions in README-turbo.txt, you need to remember to put them in /usr/lib64 not in /usr/lib. Once I did this, CPU usage dropped from 53% to 10% (recording only - no motion detection).
These libraries are indeed excellent, even cambozola's display of events in the web interface seems to be faster and smoother.
I've installed the rpm and after few minutes the total load was over 3.
So I've decided to rebuilt src.rpm using prefix and libdir according to my distro.
AMD 64 CPU usage
Record
libjpeg: 12%
libjpeg-turbo: 8%
Modect
ligjpeg: from memory Idle was 12%, Alerts and Alarms were 18-25%
libjpeg-turbo: Idle 7-8%, Alert-Alarm 12-14% with spikes of 17-21%
Today is windy and all my cameras are detecting motion.
4 local cameras @10FPS (max 10FPS in alarm) 480x360 color.
So yeah, in my case SSE2 support does improve things! Thanks
So I've decided to rebuilt src.rpm using prefix and libdir according to my distro.
AMD 64 CPU usage
Record
libjpeg: 12%
libjpeg-turbo: 8%
Modect
ligjpeg: from memory Idle was 12%, Alerts and Alarms were 18-25%
libjpeg-turbo: Idle 7-8%, Alert-Alarm 12-14% with spikes of 17-21%
Today is windy and all my cameras are detecting motion.
4 local cameras @10FPS (max 10FPS in alarm) 480x360 color.
So yeah, in my case SSE2 support does improve things! Thanks
-
- Posts: 3
- Joined: Mon Mar 01, 2010 12:19 am
Forgive me if I'm misunderstanding you, but I get the sense that you were expecting that just installing the libjpeg-turbo RPM would automatically accelerate libjpeg. It doesn't work that way. For obvious reasons, the libjpeg-turbo RPM does not presume to overwrite the system's version of libjpeg. Thus, once you have installed the RPM, you have to either manipulate the sym links in /usr/lib[64] or use LD_LIBRARY_PATH to load libjpeg-turbo instead of libjpeg at run time. This is all described in the README file.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
The following is one example, specific to Zoneminder, of what dcommander is saying. Find the line in your /etc/init.d/zm script that says "$command start" and place the following just prior to that.
For 64 bit systems:
For 32 bit systems:
For 64 bit systems:
Code: Select all
export LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64:$LD_LIBRARY_PATH
Code: Select all
export LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH
-
- Posts: 184
- Joined: Tue Oct 14, 2008 5:59 pm