Hard drive goes to sleep and wakes up causing game to lag.

Apr 8, 2018
12
0
20
I was reading yp on the cause of my lag, thinking it was thermal reasons but after investigating my task manager and other forums, I figured out that this was the reason

http://prntscr.com/jtgopy

other people have had my problem, but what from i could find, no one had a solution, someone referenced a batch file to keep writing to the disk, but I couldn't find it
 
The batch file to keep writing to the disk is for a problem with WD drives (super-short head parking timeout) which cannot be overridden by Windows settings. Based on your screenshot, it looks like you have a Seagate drive. It has a normal head parking timeout. The drive sleep timeout (when to spin down the drive) can be adjusted in:

Power options -> (change plan settings) -> advanced -> Hard disk -> Turn off hard disk after x minutes

Simply increase it from the current setting to something longer.

However, I'm not convinced that's your problem. Normally when a HDD goes to sleep (spins down), there's no disk activity until it spins up again. The second peak in your pic shows disk activity shortly before your lag spike. My guess is you've got another program or process running in the background which is occasionally generating a lot of HDD activity. Do you happen to be low on RAM? The type of HDD spikes and lag are very common when Windows tries to swap memory pages to the pagefile.