Step 2: Run MRL on Untuned System
- From your host system, connect to the target board via SSH if it is not already connected. Replace<user>with the username (typically it isrootfor customer reference boards). Replace<target>with the IP address or hostname of the target board.ssh <user>@<target>
- In the SSH session, make sure that Intel® TCC Tools are installed on the target board:ls /usr/share/tcc_tools/ -laIf the directory is empty, Intel® TCC Tools are not installed. Complete the installation instructions in the Get Started Guide.
- [Target board]Get the PCI device name:The MRL workload validation script supports integrated TSN Ethernet controllers and Intel® Ethernet Controller I225 devices. To check which device you have, run:lspci | grep -E 'Ethernet controller: Intel Corporation'Output example:aa:00.0 Ethernet controller: Intel Corporation Device 15f2 (rev 03)If you see15f2in the output, the device is an Intel® Ethernet Controller I225. If you seea0acor4b32in the output, the device is an integrated TSN Ethernet controller.
- [Target board]Run the workload validation script, using the following command. Replace<device_name>in the--deviceargument. For example,I225orTSN. Make sure to delete the angle brackets (< >) too.python3 /usr/share/tcc_tools/tools/demo/workloads/bin/mrl_validation_script.py --latency_us 90 --device <device_name> --iterations 10000000 --core 3
- Leave the rest of the arguments as is. For reference, the following table describes the arguments:ArgumentDescription--latency_us 90Required. Maximum latency requirement in microseconds (us) to be verified.--iterations 10000000Optional. Number of iterations.--core 3Optional. Processor core on which the sample will run.
- Note that in the workload validation script command,--latency_usis the maximum latency requirement for MRL latency. It is set to 90 microseconds, which aligns to the scenario. If the actual latency exceeds this requirement, the validation is considered a fail.The workload validation script is an example of how the sample can be used in the data streams optimizer workflow. To prepare a validation script for your workload, see Create a Workload Validation Script.
- Confirm that you see output similar to the example below.Enabling userspace access to performance counters Removing igc Start validation Running test ... Done. Test is complete! Results saved in data_mmio_read_latency_us.csv data_mmio_read_latency_ticks.csv data_avg_inst_count.csv Validation stopped Restoring igc Validation is finished. Please wait for results processing. Validation information: device: I225 address: 0x88200000 core: 3 iterations: 10000000 processor: TGL-U Latency must be less than 90.0 us. Statistics: |Min |Max |Avg |Median ---------------------------------------------------------------- Microseconds |1.216 |12.733 |1.559 |1.545 ================================================================ Deadline |Iterations |Passed |Failed --------------------------------------------------- 100.0 us |10000000 |10000000 |0 =================================================== Success: all iterations passed.The first table displays:
The second table displays:
- Min: Minimum latency (execution time of the fastest iteration)
- Max: Maximum latency (execution time of the slowest iteration)
- Avg: Average latency
- Median: Median latency
The script compares the maximum latency measurement to the deadline. In this example, the maximum latency measurement of 12.733 µs is lower than the requirement of 90.0 µs, and the validation is considered a success. By observing the number of failed and passed iterations, you can understand how critical the maximum latency measurement is for your deadline. The values may be different on your system.Although the Intel® TCC Mode settings in BIOS already meet the latency requirement, they may not be optimal for other requirements. For example, Intel® TCC Mode disables all power management settings and may negatively affect use cases that have power consumption requirements. The data streams optimizer can balance latency and power requirements.The following diagram depicts the information in the output results: The untuned state of Intel® TCC Mode in which latency is low and power consumption is unlimited.
- Deadline: Maximum tolerable latency for each iteration
- Iterations: Total number of iterations
- Passed: Number of iterations that met the deadline
- Failed: Number of iterations that exceeded the deadline
- Make a note of the maximum latency measurement so you can compare it to the measurement that you will get after tuning the system.
- Exit the connection to the target board.exit