本地集群怎么设置 MATLAB 的 worker数量呢?

61 Ansichten (letzte 30 Tage)
海盈
海盈 am 29 Feb. 2024
Beantwortet: R am 6 Mär. 2024
目前本地集群默认 MATLAB 的 worker数量太少,需要把worker数量改大,不知道怎么配置

Antworten (1)

R
R am 6 Mär. 2024
Hi,
I understand that you want to increase the default number of workers in the local cluster. Here's a step-by-step guide to help you achieve that:
1. Open Cluster Profile Manager:
  • Navigate to the Home tab.
  • From the bottom left, select the Parallel menu, which appears as four parallel bars.
  • Click on it to select Parallel Preferences.
  • A new window titled Parallel Computing Toolbox Preferenceswill open.
  • Click on the "Cluster Profile Manager" link to open Cluster Profile Manager.
2. Select and Edit Your Local Cluster Profile:
  • You can create a new local profile by clicking on “Add Cluster Profile.
  • Edit the newly created or existing cluster profile.
  • Set the number of workers according to your requirement.
3. Adjust NumWorkers and NumThreads:
  • Locate the "NumWorkers" setting to change the maximum number of workers.
  • Find the "NumThreads" setting to specify the number of computational threads per worker.
4. Save Your Adjustments:
  • After making the necessary changes, save your updated profile settings.
5. Validate Your Configuration:
  • Optionally, validate your local cluster configuration by clicking on "Validate" to ensure optimal performance and compatibility.
For more detailed information on adding, modifying, importing, or exporting cluster profiles, please refer to the documentation:
It’s important to note while configuring NumWorkers and NumThreads, it's crucial to ensure that the total number of threads across all workers does not exceed the number of physical cores on your machine. Specifically, maintain the condition that:
NumWorkers×NumThreads number of physical cores
Failing to adhere to this guideline may lead to reduced performance due to oversubscription of physical resources, causing unnecessary context switching and CPU contention.

Kategorien

Mehr zu Big Data Processing finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!