Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
243 Views

multithread and multiprocess in openVINO python

Hi everybody, i have use openVINO for inference detect object. When i run 1 thread or 1 process, time for detect object in a image ~ 0.01s, but when use multi thread or multi process or add any process to cpu, time for detect image increase, i don't understand. Because when run python i use command task -c with core diffenrence, but speed decrease. thank you!

0 Kudos
3 Replies
Highlighted
Moderator
231 Views

Greetings,


Multi threading improves performance by allowing multiple CPUs to work on a problem at the same time; but it only helps if two things are true: as long as the CPU speed is the limiting factor (as opposed to memory, disk, or network bandwidth) and so long as multithreading doesn't introduce so much additional work


Having more threads than what your CPU supports you are actually serializing and not parallelizing. The more threads you have the slower your system will be.


You can try to redesign your algorithm to be supporting Parallel computing and execute parts of your

algorithm simultaneously on multiple CPUs (using multiple threads).


You can refer here if you want to find out more on Openvino model optimization:

https://docs.openvinotoolkit.org/latest/_docs_optimization_guide_dldt_optimization_guide.html


Hope my answer helps!

Sincerely,

Iffa


Highlighted
Beginner
223 Views

thank you, but when i run 1 file use only cpu id 1 and 2, speed 0.01s/image, after i run file 2 (task in cpu id 5, 6), speed in program file 1 decrease 0.03s/image. I don't understand why, when run 2 process with core cpu difference, speed affect?

0 Kudos
Highlighted
Beginner
221 Views

thank you, but when i run 1 file use only cpu id 1 and 2, speed 0.01s/image, after i run file 2 (task in cpu id 5, 6), speed in program file 1 decrease 0.03s/image. I don't understand why, when run 2 process with core cpu difference, speed affect?

0 Kudos