# Having a severe mouse lag when CPU usage spikes up to %100

cpulagmouseperformance

I'm having a very noticeable mouse lag when my CPU usage spikes up to %100 or between %90 and %100, this happens when I open a project in visual studio, or when building a project, or when rendering a gif, so different operations, same problem. The weird thing is it doesn't happen when I'm doing stress test with AIDA64. My specs are:

• OS: Windows 10 64 bit, build 1703
• CPU: Intel i7 7700k @4.8 GHZ
• Ram: Corsair 2×16 3000 MHZ
• GPU: Nvidia 1080TI

My cpu is overclocked but I don't think it causes this, because I had the same issue when I didn't overclock the CPU. All of my drivers are up to date and there is no unknown device in device manager, so how can I find what is causing this lag and fix it ?

• To capture the CPU usage in Windows 10, open cmd.exe as admin and run wpr.exe -start CPU -start ReferenceSet -filemode && timeout -1 && wpr.exe -stop C:\HighCPUUsage.etl and when you captured 30-60s of the lags press a key to stop the logging.

Now load the generated C:\HighCPUUsage.etl in WPA.exe (You need to install the Windows Performance Toolkit from the Windows 10 SDK) by doing a double click on it.

Drag & drop the graph CPU Usage (Sampled) from the left side under Computation to the Analysis pane

and change the view to DPC and ISR Usage

Configure and load debug symbols in WPA.exe and extand the stack of ntoskrnl.exe and under ntoskrnl.exe!KiExecuteAllDpcs I see calls of sshid.sys and other Microsoft Mouse/keyboard drivers. sshid.sys also seams to be a mouse/keyboard driver. so update the driver or use the default MS drivers which provide only basic features.

While executing DPCs the whole system is blocked and this could cause your lags.