필터 지우기
필터 지우기

GPU performance significantly slow when running multiple MATLAB

조회 수: 3 (최근 30일)
Yu Li
Yu Li 2018년 9월 20일
댓글: Walter Roberson 2018년 9월 22일
Hi:
I have a code using GPU calculation, when it used by 1 MATLAB, it runs OK.
but when I open two MATLAB.exe in my computer, and run this GPU-relate function at the same time, the GPU performance becomes significantly slow.
for example, when run 1 MATLAB, it cost about 20 seconds, but when 2 MATLAB runs at the same time, it cost about 2000 seconds.
one thing I'm sure is that the GPU memory is enough for more than two tasks. therefore, the memory should not be the problem.
my GPU is GTX 980ti, which has 6GB memory.
Just want know if there is any mistake with my operation, or is there anyway to improve this performance.
Thanks!
Yu

답변 (1개)

Joss Knight
Joss Knight 2018년 9월 20일
편집: Joss Knight 2018년 9월 20일
I'd be very surprised if memory isn't the issue here, because contention between your two MATLABs will be forcing continual synchronization and raw allocation on both. I'd have to see what it is you're doing.
Ultimately you should explain why you are using two MATLABs if you only have one GPU. You may have a good reason of course but it's worth looking into.
  댓글 수: 10
Yu Li
Yu Li 2018년 9월 22일
편집: Yu Li 2018년 9월 22일
Hi:
Thanks for your suggestion, I use GPU because it has about 2-3 times faster than vector calculation using MATLAB even when parallel situation. Now, in order to conduct multiple MATLAB calculation, I have changed the code back to normal MATLAB code. looks there is a trade-off relation.
However, since your answer does not solve the specific question for this topic, I could not accept your answer. but I really appreciate your suggestions and thanks for your time for discussion here.
Best!
Yu
Walter Roberson
Walter Roberson 2018년 9월 22일
"Just want know if there is any mistake with my operation"
Yes, it is a mistake to share the GPU between multiple processes in Windows.
A document I was examining recently on how NVIDIA GPU handle multiple processing indicated that task synchronization is expensive in relative terms, and that moving tasks on / off of the GPU is the most expensive operation for their GPU.
When you run two different processes each trying to access the GPU, you are forcing it to run the most expensive operation often.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by