SPECviewperf | GPU Benchmark
Overview
This workload automates the execution of SPECviewperf (SVP) benchmarks and uploads the results as Platform Metrics to Login Enterprise. It provides an objective and standardized benchmarking process that is quick to configure, yielding valuable insights for baselining, performance comparisons, and configuration assessments.
Key features:
Self-contained execution: Runs specified SPECviewperf view sets and handles results automatically.
Data integration: Uploads benchmark results as Platform Metrics to Login Enterprise.
Quick configuration: Requires minimal setup by updating variables at the top of the script.
Objective analysis: Facilitates easy comparison across different GPUs, environments, and configurations.
Note that this document uses the terms script, workload, and Login Enterprise Application interchangeably. They all refer to the specViewPerf_Benchmark.cs file that automates the benchmarking process.
For more details about the SPECperfview GPU benchmark workload, refer to the Login VSI repository on GitHub.
Script Workflow
The script performs the following steps:
Check and terminate existing processes
Checks if
runviewperf.exeorviewperf.exeprocesses are already running.Optionally terminates existing processes if configured to do so.
Archive existing results
Moves any existing
results_*(previous SVP Test run(s)) directories from the SPECviewperf directory to an archive directory.Ensures no residual result directories remain after archiving.
Run SPECviewperf
Initiates the
RunViewperf.exeprocess with the specified viewset and resolution.Confirms the process starts within a specified timeout period.
Records the start timestamp upon process initiation.
Monitors the process until completion, enforcing a maximum runtime limit.
Records the end timestamp when the process concludes.
Create Start and End event
Logs an event containing the start time, end time, viewset name, and host/user information.
Check for results and JS file
Waits for the
results_*directory to be created after benchmarking.Locates the
*.jsresults file within the directory.
Wait for the JS file to be ready
Monitors the
*.jsfile to ensure it is fully written and stabilized in size before proceeding.
Parse JS file
Parses the
*.jsfile to extract benchmark data.Automatically measures and corrects clock drift by contacting the Login Enterprise appliance (reads the HTTP
Dateheader and applies a half-round-trip correction), then converts captured local timestamps to server-aligned UTC before uploading. No manualtimeOffsetis required.Prepares the data for uploading to Login Enterprise.
Generate PowerShell script
Creates a PowerShell script to upload the benchmark data to the Login Enterprise API.
Upload Platform Metrics
Executes the PowerShell script to upload the data as Platform Metrics to Login Enterprise.
Configurable Variables
Update the following variables at the top of the script to match your environment:
Time offset / automatic drift correction
No manual
timeOffsetrequired.
The workload now automatically measures local vs. appliance clock drift before each run and aligns SPECviewperf timestamps to server UTC (Zulu). The script contacts the Login Enterprise appliance, reads the HTTPDateheader, computes a half-round-trip correction, and applies that correction to every timestamp before upload. You do not need to settimeOffsetin the script anymore.
configurationAccessToken / Secure Application Credentials
Do not hard-code API tokens. Instead, use Login Enterprise Application Credentials to keep tokens encrypted and avoid editing scripts.
Put the SPECviewperf viewset name into Application Username.
Put the Login Enterprise configuration system access token into the Application Password.
The workload reads
ApplicationUsernameandApplicationPasswordat runtime (secure injection) and uses those values for the viewset name and API token. Environment variable fallbacks (ApplicationPassword,LE_APP_PASSWORD, etc.) remain supported but are less secure than Application Credentials. For more information, see Scripting Secure Application Credentials.
string baseUrl = "https://myLoginEnterprise.myDomain.com/";
The base URL of your Login Enterprise instance, including the ending slash.string environmentId = "**********";
Your environment key/ID in Login Enterprise. To obtain:Log in to Login Enterprise.
Navigate to Configuration > Environments.
You have two options:
Option A: Use an existing Environment.
Click on the desired Environment.
The environment ID is the unique identifier at the end of the browser's address bar URL (e.g.,
3221ce29-06ba-46a2-8c8b-da99dea341c4).
Option B: Create a new Environment.
Click Add Environment.
Fill out the required information (only Name is necessary).
Click Save.
After saving, the unique environment ID will be at the end of the browser's address bar URL.
For more information on Environments, see Configuring Environments.
string viewsetName = "snx";
The SPECviewperf viewset to run. Examples include"snx","sw","maya", etc.string resolution = "1920x1080";
The resolution for the benchmark. Options include resolutions like"1920x1080"or"native".string svpDirPath = @"C:\SPEC\SPECgpc\SPECviewperf2020";
The installation directory path for SPECviewperf andRunViewperf.exe.
Setup Steps
Before running the script, perform the following setup steps:
Upload the Workload script: Import the
specViewPerf_Benchmark.csscript to Login Enterprise under Configuration > Applications.
Configure Application Credentials (recommended)
In the Login Enterprise UI, under Configuration > Applications, edit the Application used for this workload and add Application Credentials. Put the SPECviewperf viewset name in Username and your configuration system access token in Password. The script reads these values securely at runtime and will not require you to edit the token in the script file. See the Applications KB for details.
Prerequisites
Login Enterprise version: This script has been tested with Login Enterprise version 5.13.
SPECviewperf installation: SPECviewperf must be installed and properly configured on the target machine.
SPECviewperf licensing: Before installing and using SPECviewperf for this testing, review your SPECviewperf licensing agreement to ensure that you are correctly licensed for this usage.
Access Tokens and IDs: Obtain a configuration access token and environment ID from your Login Enterprise instance.
Troubleshooting: Common Upload Errors
Timeouts or failed uploads: verify environmentId and baseUrl are correct. An incorrect
environment IDorbase URLoften causes HTTP timeouts or 4xx responses when posting platform metrics.Token / authentication errors: confirm your configuration token is the Configuration system access token and is available via Application Password or environment variable.
Benefits
Quick configuration: Minimal setup required. Update a few variables, and you're ready to run the benchmark.
Objective benchmarking: Utilizes SPECviewperf for standardized GPU performance metrics.
Data integration: Automatically uploads results as Platform Metrics to Login Enterprise for centralized analysis.
Performance analysis: Facilitates baselining and comparative analysis across different environments, GPUs, and configurations.
Examples of Benchmarking Results
Hourly View
Figure: Platform Metrics displayed over an hour timeframe.
Note: All timestamps shown in the Platform Metrics examples are aligned to appliance UTC using the automatic clock-drift correction so they correlate precisely with other platform events (EUX, VSImax, etc.).
Daily View
Figure: Platform Metrics displayed over a day timeframe.
Note: All timestamps shown in the Platform Metrics examples are aligned to appliance UTC using the automatic clock-drift correction so they correlate precisely with other platform events (EUX, VSImax, etc.).
Notes
Modify the configurable variables at the top of the script to suit your environment.
Ensure that the target machine meets all requirements for running SPECviewperf.
The script includes error handling to gracefully handle unexpected conditions.
Additional Information
Method breakdown:
The script uses nested methods within the
Execute()method, each responsible for a specific part of the workflow, as detailed in the Script Workflow.
Best practices:
The script follows best practices regarding error handling, resource management, and modular code structure.
Variables are clearly defined and documented for ease of configuration.
This workload script provides an automated and efficient method for running SPECviewperf benchmarks, processing the results, and integrating them into Login Enterprise for comprehensive analysis. It streamlines the benchmarking process, enabling quick configuration and immediate value in performance monitoring and comparative assessments.
If you have any questions or need further assistance, contact our support team at support@loginvsi.com.