login vsi company logo login vsi company logo 250x40

Troubleshooting with XPerf and Login VSI

Troubleshooting with XPerf and Login VSI

By integrating XPerf in a Login VSI workload, you can get valuable information to troubleshoot a problem in your environment. In a previous blog post I described how to integrate Process Monitor in a Login VSI workload. This can also be done with other tools like XPerf. In this blog post I will explain how to integrate XPerf in a Login VSI workload to troubleshoot an issue.

What is XPerf?

XPerf is a powerful tool that helps with overall system performance analysis. For more information I recommend to read this blog post.

Why is XPerf useful with Login VSI?

Login VSI simulates users on a virtual desktop infrastructure environment (VDI) or a remote desktop session host environment (RDSH/SBC). Because Login VSI has simple workload customization you can quickly create a workload with a specific application that contains a problem. For troubleshooting you can add XPerf to get to the bottom of what the application is doing while Login VSI is using the application. By reproducing you can apply changes and rerun the workload to verify if the problem is solved. Because Login VSI can integrate in a production environment you are able to troubleshoot on a single target machine during office hours.

Using XPerf with Login VSI

XPerf is part of the Windows Assessment and Deployment Kit and can be downloaded here. Run the ADKsetup and download the installers.

xperf assessment and deployment kitsetup

XPerf on the VSIshare

The best location to store the XPerf binaries is the VSIshare. We can use the default Login VSI mechanism to copy XPerf to your target machine.

NOTE: Running XPerf from the VSIshare is possible but not recommended.

When the installers are downloaded you can install the WPTx86-x86_en-us.msi or WPTx64-x86_en-us on a machine to install XPerf.

xperf wpt installers

Copy the files in the “C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit” directory. Probably not all files are required but I’m not sure which are so therefore I copied all files.

xperf wpt installed

To get XPerf on all the target machines we are going to create a directoy in the target libary. This way the files are copied when the Login VSI user logs on

Browse to the VSIshare and create a direcoty called XPerf in the following location: {VSIshare}\_VSI_Binaries\Target\Lib\

xperf lib

Paste the copied files.

xperf lib 2

Integration in the workload

XPerf is now copied on the target machine by the Login VSI logon script and can be used in the workload. In this example we are going to start XPerf, idle and stop the trace. Please use the command line reference for the correct trace.

In this example we are going to use the following command:

xperf -on DiagEasy+FILE_IO_INIT+REGISTRY

Because XPerf is not installed on the target machine we need to make sure the full path is used. The Login VSI command is as followed:

VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "-on DiagEasy+FILE_IO_INIT+REGISTRY")

In this example we are going to idle for some amount of time. I’m using the Workload_Idle command which will display a message the XPerf trace is running.

Workload_Idle("XPerf", 600, "Running XPerf trace", 1)

Finally we are are going to stop the trace. In this example we are going to save the trace on the systemdrive in the Xperf directory. The file will contain the computer name so you can identify the trace file.

VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "–d %systemdrive%\Xperf\%computername%-Xperf.etl")

After the trace is done the Login VSI user can logoff.

VSI_LogOff()

Running the workload

When starting a Login VSI test with the XPerf workload you will collect the Xperf date. This data can be used to troubleshoot a problem.

Complete XPerf workload:

#WLProp:Version#1.0.0
#WLProp:Date#2014-04-04
#WLProp:Description#The XPerf Workload
##### Start segment Prepare
Segment("Workload", "Prepare")
 
# Random wait before starting workload
Workload_RandomIdle("Workload", 5, %VSI_RandomInitialWait%, "Waiting to start workload")
 
# Set mouse position
VSI_Mouse_Position("Workload")
 
##############################################################
##### Start segment 1 - XPerf                        #####
##############################################################
Segment("Workload", 1)
 
# Start XPerf Trace
VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "-on DiagEasy+FILE_IO_INIT+REGISTRY")
 
# XPerf Idle
Workload_Idle("XPerf", 600, "Running XPerf trace", 1)
 
# Stop XPerf Trace
VSI_ShellExecute("XPerf", "%temp%\VSI\Runtime\Lib\Xperf\xperf.exe", "–d %systemdrive%\Xperf\%computername%-Xperf.etl")
 
# Logoff action
VSI_LogOff()

Conclusion

The combination of Login VSI and XPerf is perfect to troubleshoot a specifc problem. With the easy workload customization of Login VSI you can reproduce the problem over and over again. This way you can apply changes and verify if the problem is solved. With the detailed information from XPerf you have valuable information to find the cause of the problem.

This blog was originally published on Logit Blog.

About the author

Ryan Bijkerk (@Logitblog) is a Product Owner at Login VSI and a Microsoft MVP on Application Virtualization (App-V) technology. He is also involved in the independent research Project VRC and speaks at events. Besides working, Ryan enjoys writing for his blog and riding his MTB.


Tags: How-to, Login VSI

Popular Blogs

login-vsi-vdi-performance-summit

The VDI Performance Summit - Virtual Conference and Expo

Visit the VDI Performance Summit to gain knowledge and experience about performance and tuning VDI, improving End-User Experience and IT service. Join us at the ONLY virtual event 100% dedicated to VDI performance and tuning | May 2, 2019 This 1-day event offers key-notes presented by the best VDI performance experts in the world, technical and business oriented breakout sessions, the possibility to chat with experts directly to discuss your own situation, and a virtual exhibit hall featuring… Continue Reading

Scalability testing Parallels Remote Application Server with Login VSI

Recently I went to VMworld in Barcelona where Login VSI had a booth on the expo... While I can’t remember exactly how many conversations I had - there had been so many that I lost my voice on day one. What was new this year is that quite a few people asked if our software is compatible with the solutions from Parallels specifically their Remote Application Server (RAS) (Datasheet). Continue Reading
Login VSI Blog Article - Microsoft Windows 10 Default FTA Associations - Teaser Image

Windows 10 Default File Type Associations and Login VSI

When Login VSI 4.1 was released, the majority of desktops were running Windows 7 and life was easy. We’d set the default filetype for an application and it would simply work. The default and industry standard workloads in Login VSI include launching and using Adobe Reader as part of the virtual user simulation. Because Login VSI doesn’t always know which version of Adobe Reader is installed, or where it’s installed, the workload relies on the file type association (FTA) for .pdf documents to be… Continue Reading
Login VSI - Press Release - IGEL - Login VSI Partner to Optimize End User Computing Experience Image

[Press Release] IGEL Partners with Login VSI to Optimize the End User Computing Experience

Login PI enables organizations to better protect the performance and availability of their IGEL OS-powered virtual desktop environments San Francisco, USA, Feb. 6, 2019: IGEL, a world leader in software-defined endpoint optimization and control solutions for the secure enterprise, today announced that it is partnering with Login VSI, provider of software solutions to test and actively monitor the performance and availability of virtual desktop environments, including VDI and… Continue Reading
Login VSI - Blog - Login PI Blog Teaser Image - Windows Virtual Desktop: How To Monitor User Experience With Login PI

Windows Virtual Desktop – How to Monitor User Experience?

Microsoft has just announced the public preview of their new Windows Virtual Desktop (WVD) offering at Microsoft Ignite on Tour in Amsterdam today. For those of you who’ve not followed the rumors or the private beta, here’s the outline... Continue Reading
Investigating Online Application Performance with Login PI

Investigating Online Application Performance with Login PI

As many companies do, we use a CRM system. Recently, I have been getting complaints about our cloud CRM system, Microsoft Dynamics, being slow. I tried to investigate this by shadowing one of our users to see what was wrong. As expected, everything was fast. 15 minutes later, the same user reported slowness again. How could I investigate this without bothering the users? Continue Reading
Cookie Settings