필터 지우기
필터 지우기

Parallel Computing communication overload

조회 수: 1 (최근 30일)
YU BAI
YU BAI 2019년 3월 15일
답변: William Zhou 2019년 3월 19일
Hi, I am now running my code on the university local server in which I could connect 64 workers (local). However, compared to the performance in my laptop with 4 workers, the speed gains is roughly 60%. I notice that when starting parfor in the server, it takes a very long time to "throw" these processes to the workers while in my laptop it is generally very fast. Can anyone explain to me why and are there any suggestions to improve the performance? Thanks!

답변 (1개)

William Zhou
William Zhou 2019년 3월 19일
When comparing comparison between the Parallel Computing Toolbox (PCT) and MATLAB Distributed Computing Server (MDCS), please keep in mind the following:
  1. Contention for resources: network and computing. If the network of worker machines has low bandwidth or high latency, computation could be slowed.
  2. Hardware and/or platform difference may be a large contributor to the performance difference.
  3. Measure only the time spent executing the computating routing will show the performance discrepancy due to hardware.
  4. A worker by default runs single-threaded, whether the worker is hosted locally or on a cluster, even if the MATLAB functions used support multi-threading. Therefore it may not be always fair to compare the performance of a FOR loop with a PARFOR if the computating routine that uses largely functions that supports multithreading. This is because the overhead involved with using a new process (worker) is much larger than a new thread.
  5. Passing parameters. Parameters are automatically passed to worker machines during the execution of parallel computations. If there are a large number of parameters, or they take a large amount of memory, passing them may slow the execution of your computation.
You may also be interested in the following resources on profiling and optimizing your parallel computing performance:

카테고리

Help CenterFile Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by