Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5527 Discussions

multithread and multiprocess in openVINO python

tai94bn
Beginner
600 Views

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
Iffa_Intel
Moderator
588 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


tai94bn
Beginner
580 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?

tai94bn
Beginner
578 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?

Reply