PiTools Service adding .6 ns of latency when doing nothing

As I’ve been optimizing my system, i noticed my memory latency scores were not lining up as they should. Long story short, after going through many tests, it was piservice running in the background that alone was adding .6ns of latency to the overall system performance.

What does this mean? latency is how fast your system is able to process data between the mem, cpu and other subsystems. You want this number as low as possible. What you don’t want is random services eating up resources that impact the system performance overall.

Is .6ns a big deal? At any given time, your windows 10 system will be running between 90-100+ services. Now if each one of those was eating up .6ns, you’re looking at 60ns just in idle! That’s almost double the 33ns I run at idle for my daily setup. You would absolutely feel a loss of performance and general sluggishness from the operating system if your latency was that high.

How does this compares to other services? when i disabled, “print spooler, intel wifi, intel Bluetooth, server, workstation, logitech, realtek” COMBINED! had .1ns impact. That’s right all those services put together had a .1ns of a latency hit while pitools alone gives you .6ns

@PimaxUSA @SweViver @PimaxQuorra please get this information over to your developer team for better optimization of the software. There’s absolutely no reason for a background service in an idle state to eat up that many resources.

@Alex.liu

8 Likes

If your interrested in digging a bit deeper yourself you could use Procmon64 from https://live.sysinternals.com/

You will be able to see what each process and application does eg. TCP calls and such.
I bet you could find something interresting :wink:

Good hunting

5 Likes

Hmm do you imply they’d be grabbing data?

Not implying anything of the sort, just hinted that I might have seen alot of TCP/IP traffic from pitool and services in the package. I could be wrong though… :wink:
edit: haven’t got much spare time at the moment, but if I had I would look into it.

1 Like

Yeah, got to check that out. If there was any of that, that’d be a scandal.

you would need to grab the data stream with wireshark then :wink: im sure it’s something benign if any.

1 Like

I did some measurements myself and also noticed about .6-.9 ns latency only when my HMD + piservice was active. I usually keep the HMD plugged in but turn it off until I want to use VR.

Aida 64 Cache & Memory Benchmark, repeated 3 times for each test.

Pitool OFF, Docker Service OFF
AMD High Performace power plan + above normal priority for the benchmark forced by Process Lasso

Piservice OFF, Pimax HMD OFF (power button off) 71.6 71.5 71.6
Piservice ON, Pimax HMD OFF (power button off) 71.7 71.7 71.6
Piservice ON, Pimax HMD ON (power button/chevron lit) 72.3 72.3
72.5
Piservice OFF, Pimax HMD ON (power button/chevron lit) 71.6 71.5
71.5

4x G.Skill 3600 16-16-16-36 CR1
3900x on a Gigabyte X570 Aorus Master
Virtualization/SVM on

1 Like

what version are you on? that was my next set of test to have pitools open with service running and then the hmd tests. i’m on intel and my mem with Piservice running is 34ns and 33.4 without. Clean boot, let the system idle 10mins to load up everything and 3 run aida. Then MLC also which is better than aida if you haven’t used it before.

9900k 5.2 core 48 uncore (HT off due to regression in Assetto Corsa)
mem at 16-16-16/4200 1T

1 Like

Aida 64 Extreme paid version 6.25.5400

Hard to compare values with and Intel tool on an amd cpu, but wowsa nice latency values you got there.

If I use mlc --latency_matrix with
Pitool on, PiServiceLauncher on

HMD on: 84.0 84.0 83.8
HMD off: 82.9 82.8 82.9

Maybe usb communication between service and HMD induce some latency?

Does anyone know what these benchmarks are actually measuring? AFAIK the memory latency is a hardware feature pretty much defined by the design spec of the used memory, controller and the board. Then you got the delays when two processes are accessing the same memory, but I would expect this to be a normal mode of operation on a multitasking OS.

2 Likes

So should we kill Pitools Service when when we use the HMD?

You should stop it when NOT using the HMD. It needs to be enabled for the HMD to work.

… or just live in ignorance… :upside_down_face:

I haven’t experienced any lag during the few years of using my Pimax (5K+) and I’ve just left it to auto-start (both services and PiTool itself).

Then again, I haven’t been looking for it… :upside_down_face:

2 Likes

my .bat files if it’s any use to anyone

first stop the piservices from autostarting ( task manager/services ) set it to manual

then run these bat files as administrator ( right click) to enable/disable piservices

make a notepad doc , add this text and save it as a bat file

to start services

sc start PiserviceLauncher

and to kill services

@echo off

taskkill /f /im PiServiceLauncher.exe
taskkill /f /im PiService.exe
taskkill /f /im pi_server.exe
taskkill /f /im Piplay.exe
taskkill /f /im piDesktop.exe
taskkill /f /im piServer_x64.exe
taskkill /f /im Pitool.exe
EXIT

4 Likes

I normally just manually stop PiServiceLanucher.exe service, which will then automatically shut down all outstanding background processes (PiService.exe, pi_server.exe, pi_overlay.exe(?)). Having the service stopped is enough to make it inactive.

If you would want to preserve it over reboots you would need to disable it.

I am not sure about the other executables in your .bat as I believe I only saw PiTool.exe, but this one can be normally closed in Windows as it is not a background process, but just a regular desktop app.

1 Like

Pardon me if this has been answered, but is there any conclusive evidence this process is adding memory latency (or kernel/scheduler latency), degrading VR performance, or just wasting resources when not in VR?

Because, frankly, VR and Gaming are the only two realtime tasks I would run on the MSW platform. Consequently, I don’t care about idle/workstation MSW performance (or any lack thereof caused by any MSW applications) - that’s what Linux/Unix is for.

3 Likes

That’s quite a self-centred response. This may not be an issue for you. That does not stop it being an issue for other people.

3 Likes

Nothing to do with self, actually, and I have a serious question here.

Development is a scarce resource, and I suspect this is especially true of PiTool. If this affects VR/gaming performance, than I would like to see the development team resolve it. Otherwise, MSW already has enough performance, usability, and complexity issues, that something like a little idling from an otherwise real-time task, falls far below the threshold of being cost-effective to optimize out.

So, I reiterate my question. Is there any conclusive evidence that VR performance is degraded by this, that there is any solvable inefficiency in the PiTool rendering pipeline? Or is it just a little extra idle load on the system?

2 Likes

I set the service to manual and can toggle it easy enough.

1 Like

I agree, for me personally the latency is only present when THthe vrservice and hmd is on eg gaming.