Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sindhura
Beginner
107 Views

speed up

if i run a piece of code serially, and then parallelize it with TBB and run it... both times on a dual core system, what is the maximum speed-up that can be acheived?(or, is there any such "maximum speedup possible" theoretically?) theoretically, since both cores are being utilized in the parallel run, is it 2X?

my application is a video processing application.. i do the processing in parallel once and serial next in the same program and display the speed up. i get a speed up of over 3X. but when i run the serial first and parallel next, the speed up acheived is less than 2X. i am of the opinion that whatever i run second, serial or parallel, will be considerably slowed down because the system resources...i.e., the virtual memory, etc are eaten up by the first run(serial/parallel) as can be seen from the PF usage in the task manager and hence the application slows down...since video processing is pretty demanding as far as system resources go. is my assumption correct?
thanks and regards,
sindhura.
0 Kudos
2 Replies
107 Views

Quoting - sindhura
what is the maximum speed-up that can be acheived?(or, is there any such "maximum speedup possible" theoretically?) theoretically, since both cores are being utilized in the parallel run, is it 2X?

Sindhura, I guess you are writing about Amdahl's law http://en.wikipedia.org/wiki/Amdahl%27s_law

Vladimir
jimdempseyatthecove
Black Belt
107 Views

Quoting - sindhura
if i run a piece of code serially, and then parallelize it with TBB and run it... both times on a dual core system, what is the maximum speed-up that can be acheived?(or, is there any such "maximum speedup possible" theoretically?) theoretically, since both cores are being utilized in the parallel run, is it 2X?

my application is a video processing application.. i do the processing in parallel once and serial next in the same program and display the speed up. i get a speed up of over 3X. but when i run the serial first and parallel next, the speed up acheived is less than 2X. i am of the opinion that whatever i run second, serial or parallel, will be considerably slowed down because the system resources...i.e., the virtual memory, etc are eaten up by the first run(serial/parallel) as can be seen from the PF usage in the task manager and hence the application slows down...since video processing is pretty demanding as far as system resources go. is my assumption correct?
thanks and regards,
sindhura.

Depending on the size of the working set and what you do _before_ running either serial or parallel section you might be experiencing better or worse utilization of your cache.

If you are experiencing PF hits then your comparative runs are useless with respect to parallelvs serial execution comparrisons.

If the PF hits occure early on in the program, such ason the first few iterations of your main loop, then remove those iterations from your performance analysis. Or time each iteration of the main loop and discard any samples that fall outside of 2x or 0.5x the median of all samples (average what is left).

Jim Dempsey
Reply