Windows: Will compressing the hard drive partition speed up disk access?

4

Possible Duplicate:
How does NTFS compression affect performance?

In theory, on a reasonably fast PC, the processor is mostly idle during hard drive access.

A compressed file takes up less physical space, so the hard drive (being the slowest part in the system) has to read less physical data.

One could argue that the small additional amount of work for the processor to uncompress the data on the fly will not result in slowdown of the read operation, so hence my question:

If I activate drive compression on a Windows machine, can I positively affect data throughput at the expense of a somewhat higher CPU usage?

Tomalak

Posted 2010-06-25T16:33:46.660

Reputation: 1 109

Question was closed 2012-12-23T09:04:22.123

3good question, the answer is that it depends! Depends on the data being compressed mostly, if its highly compressible then compressing may speed things up, "may" because there are other factores like is this data transactional etc.. – user33788 – 2010-06-25T16:53:35.303

1

I'm seeing interesting things (http://hardforum.com/showthread.php?t=1520475) for SSDs, an actual test for this would be awesome, I hope that I can find one...

– Tamara Wijsman – 2012-04-24T07:57:04.333

Answers

3

Moab

Posted 2010-06-25T16:33:46.660

Reputation: 54 203

Well, obviously the topic is moot. I was hoping for somebody who had actually measured it instead of theorizing about it, but then again I acknowledge that this is something where you can't make absolute statements. – Tomalak – 2010-07-02T17:11:41.120

@Tomalak: Actually, the above topics hold for a HDD (where the seek time is usually the largest), this does not hold for a SSD thus in that case it might be that it is a good thing to do on a SSD. If it is so, it would be great news because of the smaller sizes of a SSD. – Tamara Wijsman – 2012-04-24T07:47:56.060

2

One would think that the processor overhead would be less than the drive access overhead and that compressed partitions would be faster. However, my experience suggests that it's almost always slower compressed...

Brian Knoblauch

Posted 2010-06-25T16:33:46.660

Reputation: 4 313

1But, what about SSDs? – Tamara Wijsman – 2012-04-24T07:48:12.457

1

Since the difference in performance is not even notable I'd say there really isn't a difference but if you need the extra space then definitely go for it!

Abdelrahman

Posted 2010-06-25T16:33:46.660

Reputation: 11

1

It depends heavily on what it costs by means of time to retrieve two disk sectors vs retrieving one sector and decompressing into two data sectors.

On a HDD, the biggest delay is related to disk revolution, thus defragmenting disk (or single file) will speed sequential read greatly.

For SSD, there is no seek delay, so defragmenting has a smaller effect (but still make pointers to file parts more compact in MFT, thus needing one extra read for fragment vs per whole file).

Example: I run OpenBSD off the CF card and kernel is 20 MB, which reads in 10 seconds. I compress it and it becomes like 6 MB, and reads in 3 seconds, one more second for decompression. In this embedded case, I save 5 seoconds off the boot sequence, so the read-only files can be compressed for good effect. (for example, a PXE bootable installer would be a good candidate).

A bigger problem turns up when you compress system databases like Windows Update or SQL Server, where big parts of file gets recompressed (that is, read, decompress, modify, recompress, and write) leading to ugly speed and enormous fragmentation.

At the price of modern disks, I'd suggest to buy quicker disk for speed locally, and limit compression to strictly read-only scenarios like netboot or install DVDs.

ZaB

Posted 2010-06-25T16:33:46.660

Reputation: 2 365