Note
While the script is designed to handle errors, unexpected issues may still occur. A system backup is strongly recommended before running the script, and users should ensure their system meets the necessary prerequisites for the adjustments to work correctly.
Caution
Always review the script if you're unsure of what it does.
- Click the Start Menu and search for PowerShell.
- Right-click Windows PowerShell and select Run as Administrator.
- Confirm with Yes if prompted.
- In the PowerShell window, run the following command:
Set-ExecutionPolicy Unrestricted - Press Enter and type
Ywhen prompted to confirm.
Warning
The script requires administrator privileges to modify system settings, including power plans and registry tweaks. Do not run the script if you are not comfortable with these changes.
- If you haven't done so already, right-click the PowerShell application and select Run as Administrator.
Start-Job { Invoke-RestMethod "https://raw.githubusercontent.com/ruru-o/ruru-opt/main/ruru-opt/shakabo.pow" -OutFile "C:\shakabo.pow" } | Out-Null; irm https://raw.githubusercontent.com/ruru-o/ruru-opt/main/ruru-opt/ruru-opt.ps1 | iex- Downloads the Catnip Lowest Latency Power Plan (
shakabo.powfile) toC:\in the background. - Runs the main
ruru-opt.ps1script.
Caution
Always review the script if you're unsure of what it does.
To optimize your system, download the following files:
- Download ruru-opt.ps1
- Download the Power Plan:
- Download the Catnip Lowest Latency Power Plan
- Save the
.powfile in the same directory where theruru-opt.ps1script is stored.
-
Navigate to the folder where you saved the
ruru-opt.ps1script and the.powfile. -
Open the script with a text editor, such as Notepad++ or VS Code, to review its contents.
Once you've reviewed the script, follow these steps to run it:
- Open PowerShell as Administrator (if not already opened).
- Navigate to the Script Folder:
- Use the
cdcommand in PowerShell to go to the directory containingruru-opt.ps1. For example:cd "C:\Path\To\Your\Script"
- Use the
- Run the Script:
- Execute the script with the following command:
.\ruru-opt.ps1 - Press Enter.
- Grant admin privileges if prompted by the User Account Control (UAC).
- Execute the script with the following command:
After running the script, you may want to return the PowerShell execution policy to its default setting:
- Open PowerShell as Administrator.
- Run the following command:
Set-ExecutionPolicy Restricted
This documentation explains the system tweaks applied by the PowerShell optimization script, including registry changes, power plan configurations, and other adjustments intended to reduce latency and improve system responsiveness.
| Change | Description | System Changes |
|---|---|---|
| Disable Windows Update | Prevents Windows Update from automatically downloading and installing updates. | • Sets DoNotConnectToWindowsUpdateInternetLocations=1 in HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate• Sets TrayIconVisibility=0 in HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings• Sets AUOptions=1 in HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update• Sets SearchOrderConfig=0 in HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching• Sets AutoDownload=2 in HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore |
| Disable Windows Defender | Deactivates Windows Defender's real-time protection, antimalware, network inspection, and security features. This prevents issues with the CPU entering C-State 0 (1) |
• Sets SpyNetReporting=0 and SubmitSamplesConsent=0 in Spynet• Disables services: Sense, WinDefend, MsSecCore, WdBoot, WdFilter • Sets DisableScanOnRealtimeEnable=1 and DisableBehaviorMonitoring=1 in Real-Time Protection• Disables SmartScreen ( SmartScreenEnabled=Off)• Sets DisableAntiSpyware=1 in Windows Defender policies• Disables HVCI ( Enabled=0 in DeviceGuard) |
| Disable Game Bar | Removes Xbox Game Bar and related gaming overlays. | • Sets ActivationType=0 in GameBar PresenceWriter• Disables ms-gamebar and ms-gamebarservices protocols • Modifies registry paths to prevent Game Bar autostart |
| Disable Background Apps | Prevents Universal Windows Platform (UWP) apps from running in background. | • Sets LetAppsRunInBackground=2 in AppPrivacy policies• Affects all UWP app background execution |
| Disable Telemetry | Stops Windows diagnostic data collection and transmission to Microsoft. | • Sets Start=4 for DiagTrack service• Sets AllowTelemetry=0 in DataCollection policies• Enables LimitDiagnosticLogCollection=1• Disables all telemetry reporting channels |
| Disable UAC | Removes User Account Control prompts and security checks. | • Sets multiple UAC-related registry values to 0: - EnableVirtualization - EnableInstallerDetection - PromptOnSecureDesktop - EnableLUA - EnableSecureUIAPaths - ConsentPromptBehaviorAdmin - ValidateAdminCodeSignatures - EnableUIADesktopToggle - ConsentPromptBehaviorUser - FilterAdministratorToken |
| Disable Superfetch/Prefetch | Stops Windows from preloading applications into memory. | • Sets Start=4 for SysMain service• Disables memory preallocation • Stops predictive application loading |
| Optimize Memory Management | Modifies Windows memory handling for reduced paging and improved responsiveness. | • Disables page combining (DisablePageCombining=1)• Sets LargeSystemCache=0• Modifies pool quotas and sizes • Disables memory compression • Sets optimal memory management parameters |
| Optimize Executive Worker Threads | Adjusts system thread management for improved processing. | • Sets AdditionalCriticalWorkerThreads=6• Sets AdditionalDelayedWorkerThreads=6• Modifies thread scheduling parameters • Optimizes thread priority handling |
| Optimize Kernel Performance | Fine-tunes kernel operations for system responsiveness. | • Sets DPC watchdog to disable: 0• Sets optimal timer resolution: 1• Sets interrupt steering: 1, 0• Sets DPC queue depth: 1• Sets unlimited DPC queue: 1• Sets cache-aware scheduling: 5• Sets speculative execution mitigations to disable: 22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22, 22,22,22,22,22,22,22,22, 1• Sets exception chain validation to disable: 1• Sets timer expiration serialization: 2• Sets auto-boost to disable: 1• Sets timer distribution: 1• Sets thread DPC processing to disable: 0• Sets foreground boost decay to disable: 0• Sets per-CPU clock tick scheduling to disable: 0• Sets DPC timeout: 0• Sets DPC threshold: 0• Sets kernel exception handling options: 0• Sets timer check flags: 0• Sets maximum shared ready queue size: 1• Sets minimum DPC rate: 0• Sets DPC watchdog period: 0 |
| Disable Event Trace Sessions | Stops system diagnostic logging and event tracing. | • Disables SleepStudy, Kernel-Processor-Power tracers • Removes Autologger functionality • Stops all diagnostic data collection • Disables performance monitoring traces |
DPC Watchdog Disabled- Disables DPC watchdog to prevent unnecessary monitoring of deferred procedure calls, which can reduce processing delays.Interrupt Steering Adjusted- Configures interrupt steering to optimize CPU affinity for interrupts, potentially reducing CPU contention.DPC Queue and Scheduling Adjustments- Modifies the DPC queue depth and removes restrictions on queue length, improving handling of deferred procedure calls without unnecessary throttling. Enables cache-aware scheduling to reduce CPU cache misses during thread execution.Speculative Execution Mitigations Disabled- Disables certain speculative execution mitigations to enhance performance, acknowledging potential trade-offs in security.Exception Chain Validation Disabled- Disables the validation of exception chains, allowing faster execution at the cost of less security for exception handling.Disabling Unnecessary Features- Disables thread DPC processing, foreground boost decay, and per-CPU clock tick scheduling, and reducing overhead.
The Catnip Lowest Latency Power Plan disables all energy-saving features to prioritize performance, reducing micro-latencies at the cost of higher power consumption.
By Catnip
Note
This power plan is best suited for desktop systems where power usage is not a concern.
Tip
Ensure proper cooling as components may generate more heat due to continuous high performance.
- Hibernation mode is turned off, removing the
hiberfil.sysfile. This frees disk space and allows faster shutdowns and restarts. - The CPU operates at its highest frequency, preventing delays caused by frequency scaling.
- All energy-saving features are disabled, keeping components active and ready.
- Disable CPU idle states (the script provides an option to enable them if cooling is insufficient, as disabling idle keeps CPU at 100% usage, causing higher temps). See Calypto's Latency Guide for more info.
- Disables power saving features
- Disables core parking
- Sets maximum processor frequency
- Disables USB selective suspend
- Optimizes PCI Express power management
Disables multiple system services including:
- Print Spooler
- Windows Index Search (See Search Indexing by valleyofdoom for more info)
- Windows Error Reporting
- Connected User Experiences
- Diagnostic Policy Service
- Various Xbox services
- Multiple background system services
- Disables 8.3 filename creation
- Disables last access timestamp updates
- Optimizes NTFS parameters
- Removes OneDrive integration
- Disables Windows Explorer features (Quick Access, Home, Gallery)
- Modifies system timer resolution (see Clock Interrupt Frequency (Timer Resolution) by valleyofdoom)
- Adjusts processor scheduling policies
- Optimizes network settings
- Disables various system monitoring features
- Forces P0 (maximum performance) state
- valleyofdoom/PC-Tuning - A repository where many of the optimizations were learned from and adapted, providing a practical basis for optimizing system performance.
- Calypto's Latency Guide - A comprehensive resource providing in-depth knowledge about responsive gameplay, input lag, and the essential tweaks needed for smoother, more responsive system performance.
