我要评分
获取效率
正确性
完整性
易理解

Creating a Process/Thread Analysis Task

Function

By using the utilization, saturation, and errors (USE) method, the tool collects information about the resources such as the CPU, memory, and storage I/O resources used by processes or threads to obtain metrics, such as the utilization, saturation, and errors and identify system bottlenecks. Then, the tool provides tuning suggestions for some metrics based on the benchmark data and experience. The system call status of a single process can be analyzed.

  • If the sysstat version is earlier than 11.0.0, the process/thread analysis result may contain abnormal data.
  • Only Nsight Systems 2022.5.1 and earlier versions can be used to collect GPU data, and only Nsight Systems 2022.3.4 and earlier versions can be used to collect GPU call stack data.

Prerequisites

No nodes are in the Offline state.

Procedure

  1. Click next to System Profiler.

    Choose General Analysis from the drop-down list. The page for creating a task is displayed.

  2. Set task parameters by referring to "Task Management" and Table 1.
    Create a process/thread analysis task. See Figure 1.
    Figure 1 Creating a process/thread analysis task
    Table 1 Parameters for creating a process/thread analysis task

    Parameter

    Description

    Task Name

    Name of the task. The name must meet the following requirements:

    1. Contain only letters, digits, and underscores (_).
    2. Contain 1 to 64 characters.

    Select Nodes

    Select the nodes to be analyzed. If there is only one node, this node is selected by default. A maximum of 10 nodes can be selected at a time.

    Analysis Object

    Select System or Application.

    Mode

    Select Launch application or Attach to process.

    This parameter is mandatory when Analysis Object is set to Application.

    Application

    Enter the absolute path of the application to be analyzed. For example, to analyze the loop_test application stored in the /home/test directory, enter /home/test/loop_test.

    This parameter is mandatory when Analysis Object is set to Application and Mode is set to Launch application.

    NOTE:
    • By default, applications in the /opt/ or /home/ directory are analyzed. The administrator can click in the upper right corner on the home page and choose Tool Settings > System Profiler > System Settings, and enter application paths (separated by semicolons) in the Application Path text box. Only administrators can modify this parameter. Common users can only view this parameter.

      You are advised to set the application path to a path such as /home or /opt. Do not set the application path to a system directory such as /, /dev, /sys, or /boot. Otherwise, system exceptions may occur.

    • The OS running user (devkitworker1) of the System Profiler must have the read and execute permissions on the applications to be analyzed.
    • In the multi-node scenario, you can enable Configure Node Parameters to configure this parameter separately for each node.

    (Optional) Application User

    This parameter is available when Analysis Object is set to Application and Mode is set to Launch application. By default, this parameter is disabled.

    • Disabled: The application running user is the default OS user devkitworker1.
    • Enabled: The application running user is the configured user.

    Name

    Name of the OS user who runs the application.

    This parameter is mandatory when Application User is enabled.

    Password

    User password.

    This parameter is mandatory when Application User is enabled.

    (Optional) Application Parameters

    Set application parameters based on the actual scenario.

    This parameter is available when Analysis Object is set to Application and Mode is set to Launch application.

    NOTE:

    You can enable Configure Node Parameters to configure this parameter separately for each node.

    Process

    Enter a process name. The process name can be a regular expression.

    This parameter is mandatory when Analysis Object is set to Application and Mode is set to Attach to process.

    (Optional) PID

    Enter a maximum of 128 PIDs of the processes to be analyzed. Use commas (,) to separate the PIDs. PID and Process can be configured together.

    This parameter is available when Analysis Object is set to Application and Mode is set to Attach to process.

    NOTE:
    • If Attach to process is selected, the tool associates the ID of the process that runs an application to trace and collect the performance data of the application in real time. The OS running user devkitworker1 of the System Profiler must have the read permission on the application.
    • To query the PID, run the ps -ef | grep Program_name command.
    • You can enable Configure Node Parameters to configure this parameter separately for each node.

    Analysis Type

    Select Process/Thread.

    Sampling Duration (s)

    Sampling duration, in seconds. The default value is 60. The value range is 2 to 300.

    Sampling Delay (s)

    The sampling starts after the specified time. This parameter is used to ignore the program startup analysis, warm up the sampling program, and eliminate sampling delay caused by factors such as environment detection. The default value is 0. The value range is 0 to 900.

    This parameter is mandatory when Analysis Object is set to Application and Mode is set to Launch application.

    Sampling Interval (s)

    Sampling interval, in seconds. The default value is 1.

    NOTE:

    The Sampling Interval value must be less than or equal to half of the Sampling Duration value. The maximum sampling interval is 10s.

    Sampling Type

    Type of the analysis to be performed. By default, CPU, Memory, and Storage I/O are selected. The options are:

    • CPU
    • Memory
    • Storage I/O
    • Context Switch
    • GPU (This option is displayed when Analysis Object is set to Application and Mode set to Launch application.)

    GPU Collection Type

    This parameter is mandatory when Analysis Object is set to Application, Mode set to Launch application, and Sampling Type set to GPU. All options are selected by default. The options are:

    • GPU statistics
    • CUDA API statistics
    • GPU fetch delay statistics
    • GPU fetch size statistics
    • cuBLAS
    • NVTX statistics
    • OS runtime statistics

    (Optional) Collect GPU Call Stacks

    Indicates whether to collect data about call stacks. This parameter is disabled by default. This parameter can be set in Advance Configurations when Analysis Object is set to Application, Mode is set to Launch application and Sampling Type is set to GPU.

    (Optional) Thread Collection

    Indicates whether to collect thread information. This function is enabled by default. GPUs are not included. This parameter can be set in Advanced Configurations.

    (Optional) System Call Tracing

    Indicates whether to collect information about system function calling of applications on Linux. This function is disabled by default. GPUs are not included.

    This parameter can be set in Advanced Configurations when Analysis Object is set to Application.

    NOTE:

    System call tracing is not recommended for production environments because it greatly reduces the system performance when some applications are frequently called.

    Task Execution

    The options are Execute now (default) and On a schedule. You need to set this parameter in Advanced Configurations.

    If On a schedule is selected, you need to set Sampling Mode, Sampling Time, and Sampling Date.

    For Periodical sampling mode, the task runs once a day in the sampling period. You need to set Sampling Time and Sampling Date.

    For One-Time sampling mode, the task takes effect only once. You need to set Sampling Date and Time.

    NOTE:
    • A user can create a maximum of 20 scheduled tasks.
    • You can click in the upper right corner of the page, choose Tool Settings > System Profiler, and click the Scheduled Tasks tab to view, edit, or delete (batch deletion supported) the created scheduled tasks.
    • The Restart button is unavailable for scheduled tasks.
    • If Application User is enabled, you can only select Execute now for Task Execution.
  3. Click OK.

    You can click the icons next to the task name to perform the following operations:

    • : stops an analysis task. After an analysis task is stopped, the collected information will be deleted.
    • : restarts an analysis task. You can modify task parameter settings and restart an analysis task. This button is available when a task is canceled or fails.
    • : deletes an analysis task. After a task is deleted, all data of this task will be deleted. Exercise caution when performing this operation.
    • : performs analysis again. The analysis task is renamed and restarted.
    • : modifies the task or report name. The report naming rule is the same as that of a task.