thanks @wayi , actually the issue is still there when uncomment these three lines.


I think you’ll still see OOM when running more time.  I verified on my machine, we’ll always see OOM finally just if the left number in the queue is increased.


We just put 1000/5 = 200 tensors per second in the queue in each producer, that’s 400 tensors per second in total. It is expected to see just several (0-5) tensors left in the queue due to the nature of async. It is still an issue if we see 2xx left in the queue even if there’s no OOM at last.


I tried different size of the tensor, there’s no such issue if the tensor is very small. Just wonder why, 400 720p (1080*720) RGB24 (3bytes) images should not be a bottle neck even they are shared between processes via memory copy.


thanks