How to use Click-to-Photon to measure End to End latency

At NVIDIA GRIDDAYS in March 2016 we were introduced to the concept Click-to-Photon, which is a method that NVIDIA is using for measuring end to end latency in a remote session. It could be a RDSH, VDI, XenApp, XenDesktop or Horizon View session. The method was invented for gaming industry to measure the time it takes from when you click on the mouse, until the display updates. The method is really simple but still so clever, because it’s measures true user experience as seen from the user. This method makes even more sense with remote graphics as you will measure the entire time it takes for a mouse-click to travel over network to server, processed by server, encoded and sent back to client, decoded and displayed on screen. The sum of all of these steps is what the user sees, and this is what we want to measure.

Please do not confuse network round trip time RTT as we are measuring here with network latency. Network latency is just one part of the journey from mouse click to screen update.

So here is the concept NVIDIA is using:

They have connected a photodiode to a scope and placed it on the screen. Then they have connected the mouse button to the scope as well. On the remote side (VDI or RDSH) there is a program running that will switch from black to white color when mouse is clicked, this will be picked up by the photodiode (photon). Now on the scope you can see the time between the click and the photon detected.

On the screenshot above you can see the difference between local computer response time (upper left) and PCoIP (upper right). You can also see that with the new Blast Extreme protocol from VMWare the response time is better than with PCoIP (lower left) and whit GPU encoding enabled (lower right) up to 50ms better than with pure PCoIP. This was really an eye opener to me, and shows me that GPU encoding and decoding is the future for remote protocols.

In the picture above, you can see that the load on the server does not affect the user experience when GPU encoding is used.

Build your own Click-to-Photon tool

We discussed at lot on GRIDDAYS how we can recreate this way to measure End to End latency ourselves. The solution that NVIDIA is using is based on a 500$ scope with 2 channels and a 5$ photo diode. You can even get a cheaper PC based scope on ebay for 65$

Just connect 5v power and ground and the output to one of the scope channels. Tape the diode to the screen. The other scope channel connects to mouse button (a little hacking and soldering has to be done here). Now you can measure the interval between mouse button is up to light is detected on the diode.

Another idea is to use a Raspberry PI or Arduino to measure it with GPIO without the need for a scope, you can then also send the result directly to a database or some other data collection tool for analysis. Imagine having one probe on each remote office, you could really get a view on endpoint experience over time.

A software based solution

So I was thinking, can we do this even easier? How about a pure software solution? I made a small test tool in .net in tried It out. It just sends a mouse-click to a specific coordinate on the screen every 5 seconds. Then it checks this coordinate if the color is changed. The timespan between is calculated and displayed in a real-time diagram. On server side there is a small executable that creates a small square in upper right corner of the screen and simply switch from black to white when clicked.

Here is a sample screenshot of my tool tested with RDP and Citrix HDX, but this solution also works with local computer and VMWare view. I need to get the result verified, then I will post a link to the tool so you can try it yourself.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>