Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Chkdsk said my system was "dirty" – what does dirty mean?

Question:

During a chkdsk scan, the system was characterized as “dirty”. What
does that imply?

For the record, it has nothing at all to do with porn. Smile

But it does have everything to do with how Windows manages your hard
disk, how it optimizes reading and particularly writing to the disk,
and how you turn off your computer.

Yes, the most common reason for a dirty hard drive is turning off
your system the wrong way.

]]>

To oversimplify, the concept is very simple, Windows sets a “dirty” flag on your hard drive whenever it has unfinished business with the drive.

One example of “unfinished business” is that Windows can optimize disk access by buffering data to be written so that it can be written in a single, larger operation, rather than a number of smaller ones. While the data has been collected, but before it’s completely written to disk, the disk is considered “dirty” – not all the data that should be written to the disk has been. Once all the data has been actually, physically placed on the hard disk, the disk might be considered “clean”.

“… Windows sets a ‘dirty’ flag on your hard drive whenever it has unfinished business with the drive.”

This kind of halfway state, with data only partially written on the hard disk, is actually common, and programs running on the system – and even large parts of Windows itself – are completely unaware that this is happening. They hand off data to the disk management system to be written, and simply assume that it will be, in some kind of timely fashion. (Optimizing disk access while maintaining data integrity and system speed is actually a very complex topic and the subject of a lot of system design effort. How data eventually makes it to the disk and in what order can be thought of as so much black magic these days.)

So why is all of this important? Well, consider this: you perform a “Save As…” in your favorite word processing program to save a copy of your document under a new name. Until both all of the file’s data, and its entry in the filesystem’s list of files or “directory” are physically on the disk, the filesystem could be considered dirty. What happens if the power goes out halfway through writing the file?

Your machine has been shut down with a dirty file system.

Typically, that means on reboot CHKDSK will be run automatically to check for and repair any errors on the disk.

And it also means you might lose the file you were writing at the time the power went out.

Now, losing power in the middle of editing a document is something most people understand, but the situation is actually a lot more common than you might think for two reasons:

  • For all intents and purposes, Windows is constantly writing files to the hard disk.

  • Many people “shut down” their computer by just turning off the power. This is bad.

By just turning off the power to your computer there’s a very high chance that you would be interrupting Windows as it writes its files to your hard disk. Most of the time it turns out to be benign, but sometimes it can be disastrous. Sometimes you’ll get unlucky enough to interrupt Windows writing something extremely important and you could suffer significant loss of data.

The correct way to turn off your system is to click on the Start button (to Start the process of shutting down), and click “Turn off Computer” or the equivalent. Windows will take a little time to clean things up, shut down all the programs on your machine, and ensure that the disks are marked “clean” before finally turning your machine off.

One source of confusion is that the power button on many computers will actually act as a software shortcut to this process of shutting down. If pressing and releasing the power button starts what appears to be a sequence of applications closing, and eventually the message “Windows is shutting down”, then you’re ok. If everything suddenly just turns off, or if you have to hold down your power button for several seconds and everything turns off, then you’re risking a serious problem.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

5 comments on “Chkdsk said my system was "dirty" – what does dirty mean?”

  1. Oops, glad someone asked that. We have some really “slow” computer days here on the island, going from one web page to another takes ages, so it’s easier to just shut the whole thing off pulling out the plug! I’m going to learn more patience!

    Reply
  2. My start-up programs will not shut off causing my computer to become extremely slow and freezing. I tried running “MSCONFIG” but the problem is still there. What do you suggest?

    If chkdsk continues to run with each start-up how do I turn it off?

    If chkdsk says the system is dirty – how do I fix it?

    Of chkdsk fails – what should I do next?

    Thanks.

    Reply
  3. Once my computer shut down improperly and I think it has slowed down my system. Now CHKDSK is running every time I boot and it finds nothing serious. But the computer is still slow and CHKDSK still runs. I tried mscofig but CHKDSK wasn’t there. I tried to do it your way by running “regedit” but the “BootExecute” file has the instruction “autocheck autochk *”. I’m really helpless. Please help me.

    Thank you.

    Reply
  4. i have done the chkdsk /f /x

    i checked the registry and it appears exactly as it is supposed to without any changes needed.

    i use a disk utility that shows no problems with SMART,etc.

    my problem started after i did a fresh install of windows 7. immediately it started this check disc every boot up after this fresh install on a new drive. please advise. I really don’t want to got thru the ordeal of another fresh install, if at all possible. i should note that the new OS drive is a 2 TB drive. is it possible this is too large of a drive for the OS?

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.