Ask Your Question
0

OpenCV 2.4.11 Windows VS Linux

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

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:

  Sz_Type_KernelSz_Filters_Blur.Filters_Blur/11:   
       Windows 10: 295ms    
       Ubuntu 15.04: 281ms
    Sz_Type_KernelSz_Filters_Sobel.Filters_Sobel/13:    
       Windows 10: 120ms    
       Ubuntu 15.04: 53ms
    Sz_Type_Filters_Scharr.Filters_Scharr/7:    
       Windows 10: 170ms    
       Ubuntu 15.04: 91ms
    Sz_Type_KernelSz_Filters_GaussianBlur.Filters_GaussianBlur/13:  
       Windows 10: 105ms    
       Ubuntu 15.04: 53ms
    Sz_Type_KernelSz_Filters_Filter2D.Filters_Filter2D/41:  
       Windows 10: 1130ms
       Ubuntu 15.04:    1075ms
    Sz_Depth_Cn_MatOp_SetToMasked.MatOp_SetToMasked/32: 
       Windows 10: 220ms    
       Ubuntu 15.04: 183ms
    Sz_Depth_Cn_Inter_Border_Mode_ImgProc_Remap.ImgProc_Remap/658:  
       Windows 10: 215ms    
       Ubuntu 15.04: 198ms
    Sz_Depth_Cn_Inter_Scale_ImgProc_Resize.ImgProc_Resize/44:   
       Windows 10: 255ms    
       Ubuntu 15: 231ms
edit retag flag offensive close merge delete

Comments

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

LBerger gravatar imageLBerger ( 2015-08-13 13:54:34 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

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

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

edit flag offensive delete link more

Comments

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 -0600 )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 -0600 )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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 2,124 times

Last updated: Aug 13 '15