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

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?


Some discussion on the subject here

http://ask.metafilter.com/51652/Could-turning-on-disk-compression-actually-speed-up-disk-access

and here

http://arstechnica.com/civis/viewtopic.php?f=17&t=801882

too many variables for a direct answer.


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...


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.


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!