5

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?

2
  • 3
    good 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
    Jun 25, 2010 at 16:53
  • 1
    I'm seeing interesting things (hardforum.com/showthread.php?t=1520475) for SSDs, an actual test for this would be awesome, I hope that I can find one... Apr 24, 2012 at 7:57

4 Answers 4

4

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.

2
  • 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
    Jul 2, 2010 at 17:11
  • @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. Apr 24, 2012 at 7:47
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...

1
2

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.

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!

Not the answer you're looking for? Browse other questions tagged .