Page 1 of 3

Libjpeg-turbo 1.0 beta Released!

Posted: Sat Feb 27, 2010 1:06 am
by aklettke
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/

Posted: Sat Feb 27, 2010 4:43 am
by whatboy
I installed... I think... don't see any difference... :(

Posted: Sat Feb 27, 2010 5:52 am
by trasherdk
Hmm, i installed it too.

zmc is still using 8-10 % CPU, but zma went from 9-11 % CPU
to 11-25 % CPU.

Memory is the same.

Posted: Sat Feb 27, 2010 2:57 pm
by knight-of-ni
The libjpeg-turbo website only shows version 0.90 available for download, rather than 1.0. Will 1.0 be posted soon or is 0.90 really the latest version?

Posted: Sat Feb 27, 2010 4:31 pm
by mastertheknife
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?

Posted: Sat Feb 27, 2010 5:33 pm
by knight-of-ni
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.

Posted: Mon Mar 01, 2010 1:41 am
by dcommander
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

Posted: Mon Mar 01, 2010 5:20 am
by whatboy
I install it with /usr not /usr/local so no... it didn't work for moi!!!

Posted: Mon Mar 01, 2010 8:28 am
by dcommander
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.

Posted: Sat Apr 10, 2010 11:30 pm
by zylantha
whatboy wrote:I install it with /usr not /usr/local so no... it didn't work for moi!!!
It works for me, after a bit of trial and error.

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.

Posted: Sun Apr 11, 2010 6:44 am
by MarcoP
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

Posted: Sun Apr 11, 2010 7:43 am
by dcommander
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.

Posted: Sun Apr 11, 2010 1:26 pm
by knight-of-ni
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:

Code: Select all

export LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64:$LD_LIBRARY_PATH
For 32 bit systems:

Code: Select all

export LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH

Posted: Mon Apr 26, 2010 9:50 pm
by dktr
libjpeg.so.62 , montage all
8 x bt878, 8x15fpx
AMD Athlon(tm) 7550 Dual-Core Processor

92% CPU load,

libjpeg-turbo = 49% LOAD!!!

Posted: Wed May 12, 2010 8:23 pm
by johnnytolengo
is it there some guide how to install it in ubutu server karmic 32bit?


Thx.

Jt