Why is chkdsk using 90% of my RAM?

When I built my new computer, I gave my old one to my parents who were in dire need of an upgrade, after cleaning everything out of it, of course, leaving just the OS and a few programs. It worked fine for a while, before it started to fail to load Windows (it would just get stuck). After investigating this behavior and asking around, I decided that it might be a failing hard drive, so I pulled it out and plugged it into my own computer to run chkdsk on it (I initially did this to try and boot to the drive, but since my computer is set up with RAID and that Windows installation didn't have RAID drivers, I just booted into my own Windows 7 installation and ran chkdsk on it).

I did this last Friday evening, and it's been running since then (which makes it about 6 days so far). I am not surprised since it can be slow, it's a 1 TB hard drive, and a Western Digital "green" one at that, so it's likely running at a slower RPM anyway. I do see it make progress, so I know it's not stuck, and the hard drive light has been perpetually on, on my computer, which I haven't used for much of anything else, other than sharing files over the network and light web browsing, while this has been running.

My computer has 16 GB of RAM, and is running Windows 7 Pro x64. Why does chkdsk take up 90% of that? It's holding that level steady, and has been for days, going between 90% and 91%, as it frees and fills memory constantly. CPU usage is very low (which I expect since this is a very I/O heavy operation).

It doesn't look like anything bad is going on, but I am curious. Why is chkdsk taking up so much memory? I am at least glad that it seems to be doing this intelligently, as it's maintaining a high level without starting to thrash the main HDD by paging.

Does anyone know? Is this normal?


Solution 1:

If it's been running for several days, I'm assuming that you ran chkdsk with the /r flag.

With Windows 7, using that much RAM is normal. Source

The file system team immediately began to look into the issue. [...][F]rom their perspective the memory usage was by design and was a specific Windows 7 change for this scenario (the /r flag grabs an exclusive lock and repairs a disk and so our assumption is you'd really like the disk to be fixed before you do more stuff on the machine[...]).

Solution 2:

I am running CHKDSK /r on a Seagate 1TB SATA 3GBs drive at the moment - Windows 7 x64 Ultimate, CHKDSK is consuming 31GB of my 32GB RAM. However, if you load up another program such as After Effects, CHKDSK releases RAM to allow the program to run quite well.

Solution 3:

If you have more than 4 GB RAM then you can limit chkdsk RAM usage to 4 GB by using the chkdsk 32bit version. It is found in C:\Windows\SysWow64\chkdsk.exe

This may be an advantage, because other already loaded programs will not be swapped to disk and disk cache not be emptied. So running chkdsk in parallel with other programs does not hurt the other programs performance, except if they use the same disk.

Solution 4:

As already posted, this is by design in Windows 7. The "design" is fixed starting with Windows 8 and now chkdsk uses less RAM. If you want the Win7 way to use all RAM to improve performance run chkdsk with the parameter /perf.

/perf NTFS only: (Must be used with "/scan") Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.

Solution 5:

This appears to be by design. Unused RAM is a wasted resource. There is no reason whatsoever to minimize ram use and keep RAM in "reserve" when it can be almost instantly re-purposed as needed. Windows 8 will use ram for anything rather than let it sit idle. Perhaps this philosophy started back in Windows 7 and involved CHKDSK. I don't know what benefit CHKDSK obtains from high RAM use, but I am willing to believe there is a benefit. I learned long ago that just because I don't understand, doesn't mean there isn't a good reason. As long as its memory use decreases as other programs need memory, this is not a problem.