Início / Latência e Timers

⏱️ Latência e Timers

Interrupções, DPC, Timer Resolution e mensagens WM

🎯 Interrupções e DPC

Configurar prioridades de interrupções e DPC (Deferred Procedure Call) para reduzir latência:

Prioridade de Interrupções powershell
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\KernelVelocity"
New-Item -Path $path -Force | Out-Null
New-ItemProperty -Path $path -Name "DisableDynamicTick" -PropertyType DWord -Value 1 -Force
DPC Watchdog powershell
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\kernel"
New-ItemProperty -Path $path -Name "DpcWatchdogProfileOffset" -PropertyType DWord -Value 10000 -Force

⏲️ Timer Resolution

O Windows usa resolução de timer de 15.625ms por padrão. Para jogos, reduzi-lo melhora tempos de resposta:

Default: 15.625 ms (64 Hz)
Gaming: 1 ms (1000 Hz)
Agressivo: 0.5 ms (2000 Hz)
Definir resolução 0.5ms powershell
bcdedit /set disabledynamictick yes
bcdedit /set useplatformclock true
💡

💡 Ferramentas Timer

Use TimerResolution de Lucas Hale ou HPET para ajustar manualmente a resolução do timer em tempo real sem reiniciar.

🔄 High Precision Event Timer (HPET)

HPET pode causar latência adicional. Desativá-lo melhora o desempenho em jogos:

Desativar HPET powershell
bcdedit /deletevalue useplatformclock
Desativar HPET no Device Manager (alternativa) powershell
Get-PnpDevice | Where-Object {$_.FriendlyName -like "*High Precision Event Timer*"} | Disable-PnpDevice -Confirm:$false
⚠️

⚠️ Compatibilidade

Em sistemas muito antigos ou notebooks, o HPET pode ser necessário. Teste se o seu sistema é estável sem ele antes de aplicar permanentemente.

📨 Reduzir Mensagens WM

Reduzir o tempo de fila de mensagens do Windows melhora a responsividade:

Win32PrioritySeparation powershell
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\PriorityControl" -Name "Win32PrioritySeparation" -PropertyType DWord -Value 38 -Force

Valores Recomendados:

26 (0x1A): Balanceado
38 (0x26): Gaming (prioridade foreground)
40 (0x28): Máxima prioridade foreground

🚀 IRQ e Affinity

Ajustar prioridade IRQ da placa de rede e GPU:

Configurar prioridade IRQ alta powershell
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\PriorityControl"
New-ItemProperty -Path $path -Name "IRQ8Priority" -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path $path -Name "IRQ16Priority" -PropertyType DWord -Value 2 -Force
💡

💡 MSI Mode

Para reduzir latência ainda mais, habilite MSI (Message Signaled Interrupts) em dispositivos PCI-E usando MSI Utility ou editando o registro.

⚠️

⚠️ Reiniciar Necessário

Todas essas mudanças exigem reinicialização completa do sistema para serem aplicadas corretamente.