Scripting: Automate testing of graphics intensive workloads

11:43 AM
Scripting: Automate testing of graphics intensive workloads - GPU

Our colleague Frank Anderson wrote a blog post in which he discussed the next evolution of virtualized graphics. In this blog, he briefly talked about the trial was ongoing at Lab Solutions around GPU intensive workloads. As we studied different applications, we found that the variation applications were given varying the intensity of the workload. We will review our initial approach with various tools and applications and how we use PowerShell to automate.

The supporting elements

Similar to other tests in the laboratory Solutions, we used Login VSI as our orchestrator launching session. We also used the custom command line option with a CSV file in which connection we specified our SFLauncher script that we previously presented in automating the launch of the HDX session through the StoreFront blog post. Since Login VSI is not currently an intensive workload of GPU, we decided to create and organize the supporting elements that would test and collect data efficiently. The centerpiece of these components is a scripting workload which was published as a seamless application. As in other tests, we keep most executables and newspapers VSI share and start the script workloads by defining this location (and other common elements):

 # UNC path to share $ VSIShare VSI = "\ TESTORCH01  vsi_share" # Timestamp for log filename = $ scriptstart [DateTime] :: Now.ToString ( "yyy-mM-dd_hh-mm-ss ") 

data capture

data entry is the key and there is no good claims without supporting facts. With this in mind, we examined various data collection options. In addition to typical data things like Perfmon under specific measures to Windows and Hypervisor, we need more graphics data and for that we considered several components:

GPU-Z

GPU -Z offered us data on the GPU that was of interest to our tests. Fortunately for us, this data was available as output CSV file as follows for each user running a session:

 # Place of GPU-Z $ GPUZExe = " $ VSIShare  Resources  GPU-Z  GPU-Z.0.7.3.exe "# the location and name of data GPU-Z log $ GPUZLogFile =" $ VSIShare  Logs  $ ($ env: username) _ $ ($ scriptstart ) _GPU-Z_Log .txt "#configure and start GPU-Z capture New-Item HKCU:  Software  techPowerUp  GPU-Z-Force Set-ItemProperty HKCU:  Software  techPowerUp  GPU-Z -Name" install_dir "-Value "no" Set -ItemProperty HKCU:  Software  techPowerUp  GPU-Z -Name "LogFile" -Value $ GPUZLogFile Start-Process $ GPUZExe -ArgumentList "minimized" 

Citrix WMI

A component of interest to us was the frames per Second (FPS) is sent by the server to the HDX session. For this, we tapped in the Windows Management Instrumentation data available in the HDX user session. In addition, because we did not want to interrupt the script to capture the WMI parameters, we used a PowerShell background job to create our CSV file with the data as follows:

 # the location and name of log data WMI $ WMILogFile = "$ VSIShare  Logs  $ ($ env: username) _ $ ($ scriptstart) _WMI_Log.txt" # Start FPS capture via WMI Citrix ThinWire Start-Job -ScriptBlock {Param ($ WMILogFile) if (-not (test-Path $ WMILogFile)) {New-Item $ WMILogFile -itemtype "file" -Force | } $ Message Out-Null = "Date, FPS," $ message | Out-File -FilePath $ WMILogFile -Append $ sessionId = ((quser | {$ _ $ -match approx: USERNAME}?) -split '+') [2] while ($ true) {$ currentFps = (-n gwmi root  citrix  hdx -cl Citrix_VirtualChannel_Thinwire_Enum -Filter "SessionID = $ sessionId") Component_Fps $ message = [DateTime] :: Now.ToString ( "yyy-mM-dd HH: mm: ss") + ", $ currentFps,. "$ message | -FilePath $ WMILogFile -Append Start-Sleep 1}} $ -ArgumentList WMILogFile 

workload Applications

For testing, we each encapsulated Out-File application loads working within the workload loop that checks for the existence of the file logoff.txt Login VSI, which is created when the time is up by Login VSI to stop execution of the current test. If the file exists, the user logs off. If the user runs the workload again. We have included this in the script of the PowerShell workload as follows :?

 # Where the disconnect file = $ LogOffFile VSI test "of $ ((Get-ChildItem" $ VSIShare  _vsi_logfiles "| {$ _ PSIsContainer -eq $ true} | . -Property sorting LastWriteTime | select -Last 1) .FullName)  logoff.txt "loop # workload do {#Launching workload of applications, waiting, and the closing} while (-not (test $ -Path LogOffFile)) logoff 

As mentioned above, different applications have given us different levels of intensity of the workload. There were cases where we do not want to close the application workload after each loop iteration of the workload, but just wanted to keep the workload running and monitoring the under the existence of logoff.txt file. For this, we would move the launch of the application before the loop of the workload, keep a shorter sleep in the loop of the workload, and make the call to CloseMainWindow after the loop of the load work (but before logging off). Now let's dive into the details of each application workload.

Microsoft HTML5 Fish Bowl with Google Chrome

A large application based on the Web is HTML5 own Fish Bowl Microsoft. This application takes advantage of GPU acceleration provided by browsers like Google Chrome.

To get this app on our workload and environment, we began by installing the alternate version of Google Chrome that can be shared between multiple users on one computer and turned off if Google Update GPO to ensure expected and controlled release. In addition, we downloaded the app Fish Bowl in a local laboratory server and made some modifications to inject some JavaScript calls from a Custom.js file that we defined. In this file, we varied the number of fish at intervals determined using setTimeout calls the function SetFishCount the fish bowl.

Including calls to Chrome as we needed to control certain aspects of the application using some of the command line (from MANY supported by chromium). The parts that were included in the script workload PowerShell (with 60 seconds of execution of the workload, for example) are:

Outside the loop of the load work:

 # web app URL Fishbowl $ FishbowlSite = "http: // TESTORCH01 / fishbowl" 

in the charging loop work:

 Fishbowl Launch # workload, wait, and close fishbowl $ = Start-Process "C:  Program Files (x86)  Google  Chrome  Application  chrome.exe "-ArgumentList" --start-maximized "," - no default browser check "," - no-first-run ", $ FishbowlSite -PassThru Start-sleep -seconds $ 60 fishbowl.CloseMainWindow () | Out-Null 

SolidWorks eDrawings Viewer

SolidWorks eDrawings Viewer Dassault Systèmes has offered a balance (but light) consumption of the GPU during the rotation of its models CAD rendering. It would, however, require the user to either use their mouse to click and drag around the model or click the play button in the application to start a continuous loop that turns the model on each axis. We also gathered some demos of free and common .easm files as the model Seascooter Dolphin Sea-Doo.

Our approach around this application is to use their API to create a simple Windows Forms application that incorporated the design and programming began continuous rotation loop. We ended up calling this small application Solutions Lab eDrawings Animator (or SLEDA). however still necessary What we installed the SolidWorks eDrawings Viewer 2013 on our VDA criteria to provide access to the API. The parts that were included in the script workload PowerShell (with 60 seconds of execution of the workload, for example) are:

Outside the loop of the load work:

 # Location SLEDA $ SLEDAExe app = "$ VSIShare  Resources  SLEDA  SLEDA.exe" # $ eDrawings file location Drawing = "` "$ VSIShare  Resources  eDrawings  _SEASCOOTER DOLPHIN.easm` "" 

in the workload loop:

 # eDrawings Start workload, wait and close sleda $ = Start-process $ SLEDAExe -ArgumentList $ drawing -PassThru -seconds Start-$ 60 sleda.CloseMainWindow sleep () | Out-Null 

Redway3d Redsdk CAD Turbine Demo

Redsdk CAD demo Turbine Redway3d offered an average GPU relatively constant load of intensity that took place as a model turbine rotates around within the demo. This application includes a menu at the launch for which you must select some options before the trial starts.

The workload in this case need to include a way to make selections from the menu and start the demo. For this, we used AppActivate SendWait and methods of Windows Script Host. Keep in mind that the demonstration of the turbine is to be installed on the VDA endpoint. The parts that were included in the script workload PowerShell (with 60 seconds of execution of the workload, for example) are:

In the workload loop

 # Launch workload turbine, wait, and turbine close $ = Start-Process "C:  Program Files (x86)  Redway3d - turbine Demo  Win32  REDTurbineDemo.exe" ` -WorkingDirectory "C:  Program Files (x86)  Redway3d - turbine Demo  Win32" `-PassThru -seconds Start-sleep wshell $ 5 = New-Object -ComObject wscript.shell $ wshell.AppActivate ($ turbine.Id) | Out-Null Start-sleep -seconds wshell.SendKeys $ 1 ({TAB} ') Start-sleep -seconds wshell.SendKeys $ 1 ({TAB}') Sleep Timer -seconds $ 1 wshell.SendKeys ( '' ) sleep Mode -seconds wshell.SendKeys $ 1 ({ENTER} ') [System.Runtime.Interopservices.Marshal] :: ReleaseComObject ($ wshell) | Out-Null Start-sleep -seconds $ 60 turbine.CloseMainWindow () | Out-Null 

Unigine Tropics

Unigine Tropics is another interesting application in terms of automation. The execution of the proposed command line application that allowed for things like different resolutions, fullscreen / windowed mode, and choose the graphics library. Also, keep in mind that the tropics application must be installed on the VDA terminal. The parts that were included in the script workload PowerShell (with 60 seconds of execution of the workload, for example) are:

In the workload loop

 # Launch tropics workload, wait, and close tropics $ = Start-Process "C:  Program Files (x86)  Unigine  tropics  tropics.exe" `-ArgumentList" -video_app direct3d11 -sound_app openal -video_fullscreen 0 -1 -video_mode -video_width 1024 -video_height 768 -data_path -engine_config ./ data / unigine.cfg tropics -system_script / unigine.cpp -extern_define RELEASE "` -WorkingDirectory "C:  Program Files (x86)  Unigine  Tropics "` -PassThru Start-sleep - tropics.CloseMainWindow seconds 60 $ () 

you found all the information useful when executing load tests using applications intensive GPU. We sure an explosion in research in these real-world applications as they each offered a different challenge for automation.

Happy Scripting!

Santiago Cardenas

Citrix Solutions Lab

Disclaimer:

The software code / sample is provided "AS IS "without representation, warranty or condition of any kind. You can use, modify and distribute at your own risk. CITRIX DISCLAIMS ALL WARRANTIES, EITHER EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software code / sample can introduce errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (B) it may not be possible to make the / example of fully functional software code; and (c) Citrix may, without notice or liability to you, cease to provide the current version and / or all future versions of the software code / sample. In any case, the software / code should be used to support ultra-hazardous activities, including but not limited to life support or blasting operations. CITRIX, ITS AFFILIATES OR AGENTS BE LIABLE FOR BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY FOR ANY DAMAGES ARISING FROM THE USE OF THE SOFTWARE CODE / SAMPLE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any claim arising from your use, modification or distribution of the code.

Previous
Next Post »
0 Komentar