parallel.pool.ActivityMonitor
Description
Use ActivityMonitor to monitor and collect data on worker activity in
a parallel pool.
Monitoring data includes:
The type of parallel construct, such as
parfor,parfeval, andspmd.The amount of data (in bytes) the client and workers send and receive.
The time each worker spends processing their portion of the parallel code.
You can retrieve the monitoring results using the results function
and view the monitoring data in the Pool
Dashboard.
Creation
Syntax
Description
creates an monitor = parallel.pool.ActivityMonitorActivityMonitor object and starts collecting activity monitoring
data on the current parallel pool. If no parallel pool exists,
parallel.pool.ActivityMonitor starts a new parallel pool using the default profile,
unless you disable automatic pool creation in your parallel settings.
To save monitoring results, use the results
function. To stop collecting and save monitoring results, use the stop
function.
Input Arguments
Output Arguments
Object Functions
Examples
Limitations
Before R2026a:
ActivityMonitoris not supported on parallel pools of thread workers.ActivityMonitordoes not collect information about data transfers when you monitor activity on a parallel pool of thread workers.ThreadPoolobjects created usingparpool('Threads')and theBackgroundPoolare both thread-based pools that use the same resources. It is possible that activity on one pool may block activity on the other. If you use both pools at the same time and monitor activity on aThreadPool, theActivityMonitorcollects data only for the workers theThreadPooluses. When you view the pool monitoring data in the Pool Dashboard, the Timeline graph indicates when workers perform work for the other pool in grey and labels the other pool type in the legend.
Alternative Functionality
Tool
You can use the Pool Dashboard to collect and view pool monitoring data on an interactive parallel pool.