Collecting Host-side System Data
Function
msprof supports the profiling of host-side system data, including the CPU usage, memory usage, disk I/O usage, and network I/O usage. After the collection, it automatically parses the profile data and flush corresponding files to disks.
Command Format
You can collect host-side system data when profiling running AI tasks.
msprof [options] <app>
msprof --output=<path> --sys-devices=<ID> --sys-period=<period> [options]
Command-line Options
Option |
Optional/Required |
Description |
|---|---|---|
--host-sys |
Either --host-sys or --host-sys-usage must be specified. |
Profiling of the system on the host side. The value can be cpu, mem, disk, network, or osrt. If multiple values are selected, separate them with commas (,). To set this option, you must set host-sys-pid or pass a user application. The values are described as follows:
Example: --host-sys=cpu,mem,disk,network NOTE:
|
--host-sys-usage |
Either --host-sys or --host-sys-usage must be specified. |
Profiling of the system and all processes on the host side. The value can be cpu or mem, or a combination of them. If multiple values are selected, separate them with commas (,). If the host-sys-pid option is also configured, the CPU or memory usage of a specified process on the host is collected. The values are described as follows:
Example: --host-sys-usage=cpu,mem |
--host-sys-pid |
Optional |
PID of the host application to profile. This option does not need to be set in collection depending on AI job runtime Profiling. |
--host-sys-usage-freq |
Optional |
CPU and memory usage profiling frequency (Hz). The value defaults to 50 and must be in the range [1, 50]. |
Example
msprof --output=/home/projects/output --host-sys=cpu /home/projects/MyApp/out/main
Or:
msprof --output=/home/projects/output --sys-devices=<ID> --sys-period=<period> --sys-hardware-mem=on --host-sys-pid=<pid> --host-sys=cpu
Find the PROF_XXX directory generated in the directory specified by --output to store the automatically parsed profile data. For details about the result files, see Table 1.