[Originally Published on: Mar 10, 2016, but since updated to a working permanent fix]
Dropbox is amazingly useful. But on windows it occasionally annoys the jayzis out of me of late. Maxing out my CPU and causing explorer and mouse to fight for resources with it. For example after creating several thousand new small files in a node_modules folder. Most annoying of late (2017) is after boot time when it starts indexing everything, and everything gets slow as hell.
Here’s a simple fix
Open up Task Manager, right-click the fucker and lower it’s priority to “low”. Done. We’re back to Dropbox playing nice.
Want this to be permanent? More than one way to do this. I use the startup user folder in the windows menu, and just change the shortcut to:
CMD.EXE /C START "Dropbox (Low Priority)" /LOW "C:\Program Files (x86)\Dropbox\Client\Dropbox.exe" /systemstartup If you use the registry startup in HKLocalMachine->Run then I am sure ya can fire up regedit and edit the registry key there, but I have not tried it.
OK, so that previous fix does not work permanently. Any time Dropbox client updates (and it does quite often as it turns out) it resets it’s startup entry in the registry, or overrides your shell:startup cmd.exe shortcut, and your “permanent” fix gets broken.
New ideas? Well if Dropbox client is going to insist on controlling it’s own startup, we should change it’s CPU priority as it is running I guess.
OK, a few ways to do this. I use AutoHotkey and have a script that is constantly running on my machine so I could just add the line
Process, Priority, Dropbox.exe, Low
to my AutoHotkey script, and the CPU priority gets set to low.
Not interested in getting into AutoHotkey? There’s always standard windows scripting with a Powershell script. Caveat: Powershell .ps1 scripts are not runnable by default on windows. We get around this by starting it from a batch file like the following:
@ECHO OFF PowerShell.exe -Command "& '%~dp0DropboxSetPriority\DropboxSetPriority.ps1'"
I have put the powershell script DropboxSetPriority.ps1 in a folder in shell:startup also called DropboxSetPriority. If you do not put the .ps1 file in a folder, windows will try and run it by opening it in notepad. Bloody hell, pretty complicated for a one-liner script! Here’s the one-liner in question:
# Set priority of "Name: Dropbox.exe" to "Idle" # FYI Possible priority values: Idle/BelowNormal/Normal/AboveNormal/High/RealTime $proc = Get-Process -Name Dropbox $proc.PriorityClass = [System.Diagnostics.ProcessPriorityClass]::Idle "Process [$proc] is now set to " + $proc.priorityclass
Why did I call that a one-liner? Because I could have written it like this:
(Get-Process -Name Dropbox).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::Idle
Any questions, ask in the comments below.