OpenMP "feature" causes massive performance issues on multi-cores

Bug #448346 reported by Andreas Sandberg
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ufraw (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: ufraw

The parallelization of UFRaw is so bad that it is actually (a lot) faster to run it with OMP_NUM_THREADS=1 to disable OpenMP parallelizations on my Core2 Quad. It seems like the parallelization was done over too small chunks to amortize the thread startup cost.

I'd suggest disabling OpenMP support in UFRaw to improve performance. The current version is barely usable, the slowdown is probably (at least) 10x.

ProblemType: Bug
Architecture: amd64
Date: Sun Oct 11 01:10:46 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: fglrx
Package: ufraw 0.15-2ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-13.43-generic
SourcePackage: ufraw
Uname: Linux 2.6.31-13-generic x86_64

Revision history for this message
Andreas Sandberg (andysan) wrote :
Revision history for this message
Oli (oli) wrote :

Using an i7 here and yes, it's deathly slow.

Strange thing is, a few weeks ago this was flying along at a nice speed. Was the OpenMP patch that recent?

Revision history for this message
Vladimir (snape) wrote :

Yes. I have same experience. On my Intel Core 2Quad Q8300 (2,5GHz 4MB) it takes over one minute to change EV Exposure Compensation. As soon, as I start ufraw with OMP_NUM_THREADS=1, the change is almost instant (less than 2 seconds).

Revision history for this message
gavomatic57 (gavomatic57) wrote :

I'm having the same issues - UFRaw 1.5 and Ubuntu 9.10 x64, Core i7 920, 6gb RAM.
Kernel 2.6.31-16-generic

Out of interest, how do you run it with OMP_NUM_THREADS=1?

Revision history for this message
Vladimir (snape) wrote :

2 gavomatic57:

Just type

   # OMP_NUM_THREADS=1 ufraw

or you can add it permanently by adding a line to a .bashrc file

    export OMP_NUM_THREADS=1

Revision history for this message
Andrew Dodd (atd7) wrote :

THANK YOU! UFraw has been effectively unusable for me since switching this machine from Gentoo to Ubuntu 9.10 - OMP_NUM_THREADS=1 fixed the problem.

Revision history for this message
Andrew Dodd (atd7) wrote :

I should have put more information in my post:
Ubuntu 9.10, Core 2 Quad Q6600.

When loading a PEF image from a Pentax camera, the preview window takes forever to draw, and performance is very variable and unpredictable. UFRaw will just freeze periodically after drawing a few tiles. This also affects anything that causes the preview window to change, such as exposure changes.

When OMP_NUM_THREADS is set to 1 as an environment variable, preview redraws are fast and predictable in the time they take.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.