Ask Your Question

OpenCV 2.4.11 Windows VS Linux

asked 2015-08-13 11:54:19 -0500

Ahryman40k gravatar image

It seams OpenCV with CUDA have better performance on Linux than Windows.

I have compared on the same computer the performance of a GTX980 with Windows 10 and ubuntu 15.04. Perf result on Linux are better than Windows. I compiled OpenCV with the same compilation flags on each Operating System.

Why there is surch a big difference beetwen the 2 OS with the same hardware ?

for exemple:

       Windows 10: 295ms    
       Ubuntu 15.04: 281ms
       Windows 10: 120ms    
       Ubuntu 15.04: 53ms
       Windows 10: 170ms    
       Ubuntu 15.04: 91ms
       Windows 10: 105ms    
       Ubuntu 15.04: 53ms
       Windows 10: 1130ms
       Ubuntu 15.04:    1075ms
       Windows 10: 220ms    
       Ubuntu 15.04: 183ms
       Windows 10: 215ms    
       Ubuntu 15.04: 198ms
       Windows 10: 255ms    
       Ubuntu 15: 231ms
edit retag flag offensive close merge delete


Have you done some statistics like my answer in this post?

LBerger gravatar imageLBerger ( 2015-08-13 13:54:34 -0500 )edit

LBerger, thank you for this interesting link, but I'm not sure to have exactly the same problem. I'm aware about the OpenCL issues and my OpenCV version is built without any CL parts.

To me, there is surch a big difference and it can't just be an overhead of the operating system. This is 2 operating system on the same computer, so it's exactly the same hardware. 50% of difference if very very too much important.

Ahryman40k gravatar imageAhryman40k ( 2015-08-14 05:49:58 -0500 )edit

When you run your program twice have you got same result? I don't think so. You need ro run your test 10 or 100 times.

Results in test are Without opencl/ with opencl  for cvtColor(0),Blur(1),Canny(2)

test 0 = 0.193865(+/-0.113415) /0.393258(+/-0.792693)
test 1 = 0.391398(+/-0.222591) /1.38872(+/-1.74931)
test 2 = 0.908895(+/-0.257745) /2.11392(+/-4.36291)

It means for test 0 I have got mean is 0.19 but sometimes have got 0.19+0.11 and sometimes 0.19-0.11s. I think you should check this.

LBerger gravatar imageLBerger ( 2015-08-14 06:20:41 -0500 )edit

I can run my code any time i want, the results are still the same.

Ahryman40k gravatar imageAhryman40k ( 2015-08-18 07:33:43 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-13 11:57:43 -0500

depend what you system is and how mutch cpu you are using, mostly linus is lighter

edit flag offensive delete link more


I think such a big difference deserve a deeper analysis. 50% more performance is really too much to be attributed to the operating system and its drivers. Drivers are also up to date.

Ahryman40k gravatar imageAhryman40k ( 2015-08-14 05:52:37 -0500 )edit

but is the tasks that the cpu needs to do. Old computer? put linux on it, because it's lighter etc. In windows you have normal one and embedded windows without fax and other stuff

martijnvwezel gravatar imagemartijnvwezel ( 2015-08-18 04:32:44 -0500 )edit

We use very modern computer (less than 6 months) and the 2 operating systems are on the same computer. So It's exactly the same hardware. As CUDA use hardware, small variation are comprehensible but surch a big one look strange

Ahryman40k gravatar imageAhryman40k ( 2015-08-18 07:36:09 -0500 )edit

Question Tools

1 follower


Asked: 2015-08-13 11:54:19 -0500

Seen: 1,635 times

Last updated: Aug 13 '15