Click to Photon - one of the most respected ways to measure latency for gaming. What if Click to Photon doesn't represent latency properly at all?
Click to Photon is one of the most respected ways to measure end-to-end latency. From tech YouTubers to multi-trillion dollar companies this method is used all over the tech industry. Click-To-Photon is the time between you clicking your mouse and seeing a response on the screen: ex, shooting in a game. Click to Photon can be measured by manually counting frames using a camera for each shot in game or using a Click-To-Photon device. Click-To-Photon devices typically use a photoresistor or a photodiode. According to TechTeamGB and google a photodiode is more precise. Typically you take at least 100 shots with a camera or a Click-To-Photon device. There is also a huge range of frames per second these tools capture starting from 1000 fps from high-speed cameras, Nvidias LDAT with 8800 fps, OSLTT cs with 65,000 fps (The tool I'm using), and many more. Enough intro let's dig into the problem with Click-To-Photon.
I took 10 (100 sample tests) of both my everyday computer with no modifications except the best power mode in the Windows 11 settings and also took tests with my PC with virtually no power savers, events, Security mitigations, Static PC algorithms, etc. This should in theory reduce Jitter (The variance in latency) by having fewer settings changing on the whole PC. Lets first start off by observing the so-called jitter visually with data across all stock and tweaked tests.
These pictures contain about 36 tests each, when we carefully look at these pictures we see tons of jitter, between all of these tests, across both stock and tweaked. This showcases how inconsistent latency really is. Now that you visually see this variance we can now question if each full 100 sample tests translates to consistent stdevs across all tests (spoiler it is absolutely inconsistent). Starting with Stock
Click Time (ms) : 0.522 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.487 avg Total System Input Lag (ms) : 13.009 avg
Total System Input Lag (ms) : 2.39924300037501 stdev Display Latency (ms) : 2.3625156756254 stdev Click Time (ms) : 0.296819635571176 stdev
Click Time (ms) : 0.491 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.409 avg Total System Input Lag (ms) : 12.9 avg
Total System Input Lag (ms) : 2.34485888744295 stdev Display Latency (ms) : 2.33775105333603 stdev Click Time (ms) : 0.282524670416478 stdev
Click Time (ms) : 0.52 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.907 avg Total System Input Lag (ms) : 12.427 avg
Total System Input Lag (ms) : 2.1827280773603 stdev Display Latency (ms) : 2.18330055536349 stdev Click Time (ms) : 0.295324786797468 stdev
Click Time (ms) : 0.476 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.503 avg Total System Input Lag (ms) : 12.979 avg
Total System Input Lag (ms) : 2.25558437911623 stdev Display Latency (ms) : 2.25556672051772 stdev Click Time (ms) : 0.283919998690768 stdev
Note
I will explain the results of test 5 and why it looks different then the rest.
Click Time (ms) : 0.499 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.384 avg Total System Input Lag (ms) : 12.882 avg
Total System Input Lag (ms) : 3.04697581912349 stdev Display Latency (ms) : 3.04594792389012 stdev Click Time (ms) : 0.259466134883755 stdev
Click Time (ms) : 0.494 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.225 avg Total System Input Lag (ms) : 12.719 avg
Total System Input Lag (ms) : 2.20516061787029 stdev Display Latency (ms) : 2.14360938888623 stdev Click Time (ms) : 0.283025089190183 stdev
Click Time (ms) : 0.535 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.898 avg Total System Input Lag (ms) : 12.433 avg
Total System Input Lag (ms) : 2.38427259159059 stdev Display Latency (ms) : 2.31404052318219 stdev Click Time (ms) : 0.295918780830965 stdev
Click Time (ms) : 0.531 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.988 avg Total System Input Lag (ms) : 12.519 avg
Total System Input Lag (ms) : 2.44709452538344 stdev Display Latency (ms) : 2.42831618770595 stdev Click Time (ms) : 0.289217908131288 stdev
Click Time (ms) : 0.532 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.089 avg Total System Input Lag (ms) : 12.621 avg
Total System Input Lag (ms) : 2.33591655489106 stdev Display Latency (ms) : 2.38349832552443 stdev Click Time (ms) : 0.291661149038719 stdev
Click Time (ms) : 0.517 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.058 avg Total System Input Lag (ms) : 12.575 avg
Total System Input Lag (ms) : 2.31509553305511 stdev Display Latency (ms) : 2.26721878683416 stdev Click Time (ms) : 0.285038919192705 stdev
when we look at the data just for example lets compare test 1 to test 2. Specifically we will compare the standard devation differences in microseconds of The total system Input Lag (End-2-End). But first lets quickly explain standard deviation simply. The Standard deviation allows us to compare variance in a set of data while still keeping it in MS. We see a 54.3841129 µs difference in consistency. But wait the number is so small why does it matter. Well... test 1 vs test 3 has a difference of 216.514923 microseconds 😏 Now what just happened, When we look at test 1 vs test 2 we see the difference between them is 54.3841129 µs. Why when I compared test 1 to 3 we saw a 216.514923 µs difference. Its clear that your pc is consistently adapting , sending events, changing frequencies, running background apps, etc. Do you think they are consistently causing a specific amount of jitter? Heck no, think of a computer as a human, things are always going on internally which like a computer is not static. This explains why jitter is not the same every single test in fact no test is even close to the same. Still don't believe me okay let's compare test 2 to test 3. It has a 162.13081 µs difference. You see it is consistently changing and you see it's not because the first test is different because you just started the game for the first time. (knew you were thinking about that) Now let's talk about test 5 as I noted above something was strange about it. Test 5 had a much bigger difference than all the tests. Test 2 vs 5 had a 702.116932 µs difference. Unlike the other tests, it had a higher max latency in the CSV file (you can find this in the repo). First I need to explain how and why I point this out. During the tweaked testing there was an outlier of 62.118 ms I thought it was an issue with me putting on the tool to my display and me accidently moving the CIP Device when putting it on as it was the second test that had the outlier. I also thought that because no number got even close to let alone 20 in the test. But then I looked at Stock on test 6 It was far down in the test and not one of the first. This time was it a 30.642 ms value which is closer to the other values. After all the tests I looked at I concluded that latency is just that strange because of the natural dynamics of the computer. In my final conclusion with all the tests I both of those in a section where I exclude it. So if you believe it's not good or ruins the test, you can find them removed. But it seems to ruin the data when removed and give lower values in variance then all tests (we compared above) which leads me to believe it's just a part of the data. Heres pictures of the outlier in the sets.
Now I will show Tweaked data
Click Time (ms) : 0.484 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.929 avg Total System Input Lag (ms) : 12.413 avg
Total System Input Lag (ms) : 2.25142271381068 stdev Display Latency (ms) : 2.27954781853106 stdev Click Time (ms) : 0.279979486081146 stdev
Note
Heres the test with that huge outlier of 62.118.
Click Time (ms) : 0.534 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.282 avg Total System Input Lag (ms) : 12.816 avg
Total System Input Lag (ms) : 5.54903155786683 stdev Display Latency (ms) : 5.54122592482016 stdev Click Time (ms) : 0.282391066867323 stdev
Click Time (ms) : 0.535 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.996 avg Total System Input Lag (ms) : 12.532 avg
Total System Input Lag (ms) : 2.24737288208057 stdev Display Latency (ms) : 2.26210387538466 stdev Click Time (ms) : 0.298888081482894 stdev
Click Time (ms) : 0.532 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.854 avg Total System Input Lag (ms) : 12.386 avg
Total System Input Lag (ms) : 2.36293977598869 stdev Display Latency (ms) : 2.39052156990093 stdev Click Time (ms) : 0.286543986962991 stdev
Click Time (ms) : 0.482 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.074 avg Total System Input Lag (ms) : 12.555 avg
Total System Input Lag (ms) : 2.32263219532225 stdev Display Latency (ms) : 2.26883118968176 stdev Click Time (ms) : 0.322384658099262 stdev
Click Time (ms) : 0.521 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.866 avg Total System Input Lag (ms) : 12.388 avg
Total System Input Lag (ms) : 2.55132784991926 stdev Display Latency (ms) : 2.53142688261958 stdev Click Time (ms) : 0.298759214474389 stdev
Click Time (ms) : 0.554 avg Processing latency (ms) : 0 avg Display Latency (ms) : 12.516 avg Total System Input Lag (ms) : 13.07 avg
Total System Input Lag (ms) : 2.6837088605288 stdev Display Latency (ms) : 2.64562063719642 stdev Click Time (ms) : 0.295337984093623 stdev
Click Time (ms) : 0.495 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.504 avg Total System Input Lag (ms) : 11.999 avg
Total System Input Lag (ms) : 2.11541848616678 stdev Display Latency (ms) : 2.14749891979136 stdev Click Time (ms) : 0.29695309206824 stdev
Click Time (ms) : 0.498 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.547 avg Total System Input Lag (ms) : 12.045 avg
Total System Input Lag (ms) : 2.08570316653374 stdev Display Latency (ms) : 2.05843741177181 stdev Click Time (ms) : 0.291981275171037 stdev
Click Time (ms) : 0.479 avg Processing latency (ms) : 0 avg Display Latency (ms) : 11.931 avg Total System Input Lag (ms) : 12.41 avg
Total System Input Lag (ms) : 2.26193839335945 stdev Display Latency (ms) : 2.25823394615251 stdev Click Time (ms) : 0.256073451426056 stdev
You know the routine let's start with test 1 vs 3 as test 2 is one with a very different result causing a big jump. Test 1 vs 3 results in a difference of 4.04983173 μs already looks like a much lower variance but as we said latency jitter is really inconsistent even tweaked as you will see. Here is test 1 vs 4 with 111.517062 μs. As you can see this data is extremely unreliable. Okay now tests do 3 vs 4 this gives us 115.566894 μs difference. As you can see if you were to compare 2 test it can both appear inconsistent and consistent because of jitter. Let me show the huge difference of test 1 vs 2 due to one of the tests being 62.118. The difference ends up being 3297.60884 μs which is 3.29760884405615 ms difference !!! You see with the outlier its even huger.
So after all of this, I surely hope you are starting to get an idea of the problem here. The main problems summarized.
- Jitter is inconsistent
- When testing tweaks that make a microsecond difference they will easily blend in because of jitter. The inconsistent amount of jitter means that even a millisecond could not be tested.
- When comparing stock to tweaked it would be inaccurate due to the jitter always changing.
Lets show 999 samples vs 999 samples now (honestly an individual 100 better showcases the variance) I will show 998 vs 998 to show if you exclude both outliers from stock and tweaked configurations. I put this in a file to ensure the samples were exactly 999 or 998. I deleted the end of the datasets each time instead of deleting random parts to remain consistent.
Stock vs Tweaked
Total System Input Lag (ms) : 12.4615045045045 avg Total System Input Lag (ms) : 2.82409992856889 stdev Display Latency (ms) : 11.9500940940941 avg Display Latency (ms) : 2.81719078142625 stdev Click Time (ms) : 0.511408408408408 avg Click Time (ms) : 0.291183204678331 stdev
Total System Input Lag (ms) : 12.411748496994 avg Total System Input Lag (ms) : 2.34688617021802 stdev Display Latency (ms) : 11.9005561122244 avg Display Latency (ms) : 2.34318325652919 stdev Click Time (ms) : 0.511190380761523 avg Click Time (ms) : 0.291247601404074 stdev
Total System Input Lag (ms) : 12.709015015015 avg Total System Input Lag (ms) : 2.40129656167851 stdev Display Latency (ms) : 12.1976936936937 avg Display Latency (ms) : 2.38361185708595 stdev Click Time (ms) : 0.511408408408408 avg Click Time (ms) : 0.291183204678331 stdev
Total System Input Lag (ms) : 12.6910460921844 avg Total System Input Lag (ms) : 2.33433629060439 stdev Display Latency (ms) : 12.1792845691383 avg Display Latency (ms) : 2.31266245701846 stdev Click Time (ms) : 0.511761523046092 avg Click Time (ms) : 0.285610141102494 stdev
You can always compare the other latency types. I just look at the total. If you were to look closely at the outlier pictures on top they don't affect the click latency. Im not fully sure what click latency means as its auto firing. Im not the one clicking. Id ask Andrew the creator of the OSLTT CS to understand what it is. By the way I dont use 1000 samples because test 6 for stock was missing a sample (most likely a bug). If you look at these you can conclude that the tweaked configuration is way better even excluding the outlier. I'm simply going to let you calculate this because it doesn't really matter because we know how inconsistent the data is.
Now heres the stock data
Total System Input Lag (ms) : 12.839446 avg Total System Input Lag (ms) : 2.46461056346496 stdev Display Latency (ms) : 2.4568279754688 stdev Display Latency (ms) : 12.337934 avg Click Time (ms) : 0.501512 avg Click Time (ms) : 0.283325531093014 stdev
Total System Input Lag (ms) : 12.573468 avg
Total System Input Lag (ms) : 2.33148066368698 stdev
Display Latency (ms) : 2.3005500830503 stdev
Display Latency (ms) : 12.050748502994 avg
Click Time (ms) : 0.521758 avg
Click Time (ms) : 0.288250356412519 stdev
Total System Input Lag (ms) : 12.8229879227053 avg Total System Input Lag (ms) : 2.32109805615671 stdev Display Latency (ms) : 12.3194782608696 avg Display Latency (ms) : 2.30972798064244 stdev Click Time (ms) : 0.503509661835749 avg Click Time (ms) : 0.289133578642597 stdev
Total System Input Lag (ms) : 12.0571723446894 avg
Total System Input Lag (ms) : 2.30181933333831 stdev
Display Latency (ms) : 2.30181933333831 stdev
Display Latency (ms) : 12.0571723446894 avg
Click Time (ms) : 0.521150300601202 avg
Click Time (ms) : 0.288218826279961 stdev
and heres the tweaked data
Total System Input Lag (ms) : 12.5463386773547 avg
Total System Input Lag (ms) : 3.21268410838166 stdev
Display Latency (ms) : 3.21294184309526 stdev
Display Latency (ms) : 12.031993987976 avg
Click Time (ms) : 0.514342685370742 avg
Click Time (ms) : 0.293859166336808 stdev
Total System Input Lag (ms) : 12.37684 avg
Total System Input Lag (ms) : 2.37403588835519 stdev
Display Latency (ms) : 2.35741767747001 stdev
Display Latency (ms) : 11.868358 avg
Click Time (ms) : 0.50848 avg
Click Time (ms) : 0.288752415600338 stdev
Total System Input Lag (ms) : 12.446797188755 avg
Total System Input Lag (ms) : 2.32116621824211 stdev
Display Latency (ms) : 2.33072635514022 stdev
Display Latency (ms) : 11.9328835341365 avg
Click Time (ms) : 0.513439759036145 avg
Click Time (ms) : 0.293460929749222 stdev
Total System Input Lag (ms) : 12.3889578313253 avg
Total System Input Lag (ms) : 2.37103620477101 stdev
Display Latency (ms) : 2.35239021771009 stdev
Display Latency (ms) : 11.8818995983936 avg
Click Time (ms) : 0.507377510040161 avg
Click Time (ms) : 0.288872139073017 stdev
Hope this helps you learn about latency. If you liked this information consider following.
Note
All related settings have been disabled such as ASPM, LTR, OBFF, PowerDown settings, Memory power savers, Power saving states, Power gating, Clock gating, Dynamic Intel technologies, (excluding turbo boost and Speedstep), Mitigations, All power management settings, MachineCheck and MonitorMWait, Integrated GPU, event producing settings and watchdog settings. All related settings have been enabled or changed such as PCI delay Optimization, Legacy IO Latency, Interrupt redirection mode selection was set to [fixed priority], automatic overclock, AP threads Idle manner was set to [Run Loop] and FCLK frequency for Early Power On was set to [1Ghz]
Though turbo boost 3.0 was disabled. A few other settings were changed
Bios were set back to defaults after tweaked configuration (Settings were checked to make sure they reverted)
65ksps