Why does TreeBagger in Matlab 2014a/b only use few workers from a parallel pool?
조회 수: 4 (최근 30일)
이전 댓글 표시
I'm using the TreeBagger class provided by Matlab (R2014a&b), in conjunction with the distributed computing toolbox. I have a local cluster running, with 30 workers, on a Windows 7 machine with 40 cores.
I call the TreeBagger constructor to generate a regression forest (an ensemble containing 32 trees), passing an options structure with 'UseParallel' set to 'always'.
However, TreeBagger seems to only make use of 8 or so workers, out of the 30 available (judging by CPU usage per process, observed using the Task Manager). When I try to test the pool with a simple parfor loop:
parfor i=1:30
a = fft(rand(20000));
end
Then all 30 workers are engaged.
My question is: (How) can I force TreeBagger to use all available resources?
댓글 수: 0
답변 (1개)
Ilya
2014년 12월 5일
TreeBagger does not limit the number of used cores in any way. Everything is set by your parpool configuration.
The answer may be in the data you pass to TreeBagger. Make sure all trees in the returned TreeBagger object are deep (which means training did take place). If it takes little time to grow these 32 trees, increase the number of trees and see if the load changes.
댓글 수: 4
Ilya
2014년 12월 9일
Any help I could provide from this point on would depend on various technical details such as the size of your data respective to the memory on the head node, size of trees and exact parpool configuration, to name a few. If you are content with this solution, use it. Otherwise please get in touch with the MathWorks tech support and work with them to make reproducible steps.
Keep in mind that a speed-up or slow-down you observe for one dataset does not necessarily hold for a different dataset. The data size and the average size of grown trees would be factors. It's possible your data are fairly small and so dispatching to smartForSliceout gives a noticeable overhead. But I don't want to hypothesize too much.
참고 항목
카테고리
Help Center 및 File Exchange에서 Parallel and Cloud에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!