Windows XP acts strangely when hard drive is being heavily used

2

1

This happens in two situations so far: when I use sabnzbd, after it's done downloading a file and is using par2.exe to stitch it together, and just now, when I'm defragmenting a hard drive from a VM I'm running.

Such use of the hard drive causes XP to become really unresponsive. A lot of GUI elements won't click, or have severely delayed clicks. In Chrome, whenever I go to a tab that I just opened a few minutes ago, the whole page reloads extremely slowly - I can see the page graphics loading line by line. A thing to note is that in the 1st case, my pagefile is on a completely separate hard drive than the one I'm running these operations on, while in the 2nd case, it's on a separate partition but the same hard drive. The same behavior occurs, though.

Any explanations as to why this happens? Any suggestions on how to get it to not happen?

I have 4GB of RAM and a dual core processor, and my CPU is not even close to 25% when these activities are going on, so it doesn't seem like a case of lack of resources. Is XP just not efficient at handling this situation?

user9430

Posted 2009-09-01T20:47:12.273

Reputation: 35

2Only two situations? Don't upgrade to Vista if you dislike slow UI elements. – David Thornley – 2009-09-01T20:51:03.933

Do you know if you're using SATA or PATA drives? – Jared Harley – 2009-09-01T23:09:05.683

Answers

2

Note: I'm assuming you have a spinning disk drive here. Performance metrics in these areas differ greatly for solid-state storage.

While a modern drive can sustain many tens of Mbytes per second when performing bulk reads and writes, both the operations you describe involve at least two locations on the disk so there is a lot of head movements involved. The latency of head movements has a massive effect on throughput because every time the drive needs to move the heads there is a delay in actually kicking them to the right place, a delay waiting for them to settle, and then a delay waiting for the right part of the disc to spin past. These delays are small on the own (not even 10ns per movement in total on average for most modern drives) but if the drive can push 100Mbyte/sec in full flow 10ms each movement wastes the time of 1Mbyte of data transfer. With a lot happening the drive can easily spend more time moving the heads around than it spends actually reading and writing data (read for a couple of 10s of ms, move head, read from there for a bit, move head, write for a few ms, move head...).

As you are defragmenting the drive the utility spends most of its time reading from one place on the disk and writing to another, a small number of blocks at a time. Extracting content from a par protected file set is even worse as there are at least two files being read (a source file and one or more parity files) as well as the output file being written to. Even just a simple copy operation on a large file has the effect. All this is excluding the head movements needed to keep directory structures and free-space maps up-to-date as blocks are moved and/or files extended. Running a VM can be similarly demanding depending on what the VM is doing at the time (and the VM will reduce the RAM available on the host machine to use as cache/buffers which may worsen the situation, and any write operation in the VM can be much more demanding than the same operation on the host directly especially if you use "growable" virtual drives).

With all this going on, if a GUI application needs to ask for even a little I/O it may get queued behind all the other stuff that is going on. Unless the application is fully multi-threaded this is likely to cause it to "block" waiting for the I/O operation to complete meaning it is not in a position to response to any messages (like "the user clicked you here") in the Windows event queue until it gets its turn. The more going on at once, the worse it will get, and you will not notice it in the "CPU busy" readings because the CPU isn't busy - it is sat waiting for IO operations to complete most of the time in these circumstances.

If you have two or more drives you can greatly reduce the effect this has on you by spreading the load over the drives. If you VM is on a separate drive from your primary OS they won't compete for I/O servicing when the VM is busy while the host is defragmenting the system partition. Also, extracting an archive from one drive and writing the output to another will be noticeably faster than extracting it to the same drive because the read operation is not directly competing with the write operation for head positioning on the one drive.

David Spillett

Posted 2009-09-01T20:47:12.273

Reputation: 22 424

I guess this is probably the answer. The only thing is that I don't only have one hard disk. Say I have a disk, Z, all by itself, and I do all the intensive operations there. Would this affect my system performance, even if the rest of the system would never even look at Z? – user9430 – 2009-09-02T00:35:51.210

I looked and: the VM hard disk was on the same hard drive as my swapfile (but not my system drive, or the drive where all my applications are installed). Maybe this explains the 2nd. For the 1st, the file being par'd was on the same drive as the swap, and its output was being sent to the drive w/ my apps and where windows is installed. That's probably the answer then.. thanks! – user9430 – 2009-09-02T00:39:19.537

solution? buy 256gb solid state drive... =P. – user9430 – 2009-09-02T00:42:28.677

The location of the swap file(s) will only make a difference if swap space is being actively used (in which case more RAM might be the answer though that means an OS update if you are running 32-bit and already have 4Gb). – David Spillett – 2009-09-02T09:17:35.150

Though if the machine is swapping with all the other disk activity going on too, that would definitely explain GUI unresponsiveness. – David Spillett – 2009-09-02T09:18:34.163

3

Defragmenting a hard drive on a machine will cause any machine to slow down. It is moving lots of data all over the place.

What kind of computer do you have? Do you have a single or dual core processor? How much ram? There are many factors that could come into play here.

Most likely it is a hanging process or something to that matter. You said you are running a VM. Those can take up a lot of resources if you are performing work in the VM and the host OS. VM's are very cpu intensive operations. It is running an entire other OS under your main OS.

Troggy

Posted 2009-09-01T20:47:12.273

Reputation: 10 191

True, but it's a VM, so it's only heavily processing one file on the real hard disk. Why is my host machine slowing down as a result? Me clicking on Start->Programs shouldn't be affected when a hard drive separate from my windows drive and my pagefile drive is being accessed. – user9430 – 2009-09-01T20:54:04.380

How much Ram does the computer have? and how much Ram is allocated to the VM? – Troggy – 2009-09-01T20:55:55.203

One heavily processed file could take up most of the available transfer speed of the hard drive especialy in a VM, hence everything else slowing down. – Troggy – 2009-09-01T20:57:18.663

500mb on vm, 4gb on host (so 3gb cause of XP limiting). dual-core processor. but the same thing happens even w/out a VM, but just when par2.exe (from a newsgroups downloader) is running to process like a 5gb download. – user9430 – 2009-09-01T20:58:33.077

your VM doesn't know it's a virual hard drive and it certainly doesn't handle the VHD as a single file. if you want the VHD to be one contigeous file, back it up temporarily, delete the original, defragment the real HD, then restore the backup to its original location – None – 2009-09-01T21:27:35.047

true, but I meant the disk accesses that the VM makes eventually go to one file on the host file system. you're right, though, it's large, so it's probably fragmented on the real disk. – user9430 – 2009-09-01T21:33:36.563

2

The problem could be caused by the activity in question (e.g. defragmentation) taking up a very large percentage of the CPU. This leaves very little for the UI, hence the lack of responsiveness.

You could try lowering the priority of par2.exe or the defragmentation. Go to Task Manager > Processes, right click over the offending process and select Set Priority > Low.

Are you running a single core processor? Having 2 or more processors (or cores) will allow the UI to run on the one not being tasked.

ChrisF

Posted 2009-09-01T20:47:12.273

Reputation: 39 650

Actually my CPU, both for par2 and for the defragmentation, is at 0-5% usage. I tried lowering the priority on both par2.exe and on sabnzbd, but it had no effect. If it were high CPU usage I'd understand, but here it seems like my computer has plenty of resources available and is just not using them.. – user9430 – 2009-09-01T21:00:11.030

2

It honestly sounds like you're doing too much all at once. What you're seeing is a bottleneck - the harddrive is being asked to do several things at once (some with more priority than others) so things like GUI clicks are "waiting" for their turn to be processed.

Jared Harley

Posted 2009-09-01T20:47:12.273

Reputation: 11 692

It feels like GUI clicks and hard drive accesses could be done at the same time, though. – user9430 – 2009-09-01T21:16:19.903