フィルターのクリア

How can I arrange the number of workers and number of computational threads?

11 ビュー (過去 30 日間)
Jinsoo
Jinsoo 2020 年 2 月 4 日
Hello.
I'm using workstation of 44 cpu and 88 threads.
In this case, how can I arrange the number of workers and number of computational threads in Cluster Profile Manager?
Actually, I've arranged Number of workers (86) and Number of compuational threads (2).
However, I wonder whether it's the optimal setting or not.
Could you please let me know how to arrange it optimally?
I'm looking forward to hearing from you.^^

採用された回答

Jason Ross
Jason Ross 2020 年 2 月 4 日
編集済み: Jason Ross 2020 年 2 月 4 日
In my experience, the best performance comes from setting the number of workers to the number of real CPUs that you have, which should be the default. The workers end up waiting on the compute resources and there's no appreciable performance improvement, just more processes taking up more system resources.
The other things to watch for are
  • exceeding system RAM limits -- using virtual memory is many times slower than RAM, so you may go faster with fewer workers.
  • Getting blocked on storage I/O -- CPUs sit idle waiting on files to be read or write, meaning that the problem is not CPU-bound.
To optimize this you need to watch the system as it's running (there are plenty of graphical monitoring tools built into a modern OS), or save perfomance logs and then analyze them (these utilities have existed for a while on all platforms)
Other optimizations exist from analyzing your code with profiling tools and looking for ways to make slow sections of code faster.
  4 件のコメント
Jason Ross
Jason Ross 2021 年 5 月 4 日
CPU cores.
Christopher McCausland
Christopher McCausland 2022 年 11 月 23 日
Sorry to bring this post back from the dead, but I was wondering if I could get your opinion on the number of threads (NumThreads). If NumWorkers = CPU cores I am assuming that NumThreads should = 1? I.e., Each CPU core will have a single thread?
Does having multiple GPU's within the compute node change any of your suggestions?
For full disclosure I have a cluster node with 2*20 core CPU's and 4*V100 GPUs which I am trying to optimise for MATLAB. The initial settings had NumWorkers = 2 and NumTreads = 4, but I do not think this optimises the setup? And finally, if I create gpuArray data, will MATLAB automatically use the GPU's avaliable or do I need to do anything else?
Kind regards,
Christopher

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by