PDA

View Full Version : NTFS Compression


Sir Patrick Crocodile
6th June 2010, 08:50 PM
For all those who want a lil' ol' optimization of disk space, if you have any of the following versions of Windows, this applies:

Windows NT 3.1 Windows NT 3.5 Windows NT 3.51 Windows NT 4.0 Windows 2000 Windows XP Windows Server 2003 Windows Vista Windows Server 2008 Windows 7 Windows Server 2008 R2

Your hard disk MUST be formatted in NTFS for it to work. On Windows Vista or above, the system drive is formatted in NTFS anyway, so that's no problem.

But you can compress your hard drive to save space (and in some cases, make read access even faster too if your hard drive is slow) on your drive.

Simple old command (open up Command Prompt and make sure the Command Prompt is elevated or running with administrator privileges):
COMPACT /C /S:#: /I /F /A

Note that "#" should be replaced with the letter of the drive you want to compress. Letters such as C or G or I for example.

Minimize the command prompt to speed the process (sounds silly, but it works because a repaint of that window is not required for every file compressed) too.

If you have enabled the display of compressed and encrypted files in different colors (often by default, so you really don't need to do anything here unless you've changed them) then your compressed files will appear blue da ba di da ba dai.

Thought I might share a lil' ol something for fellow NT users to work on. No noticeable peformance degradation, even running off my Windows NT machine.

davo
6th June 2010, 09:16 PM
I don't see how this could be faster? Ref :
http://www.tomshardware.com/forum/178301-32-file-compression-faster-performance

Sir Patrick Crocodile
6th June 2010, 09:19 PM
If the bottleneck happens to be your HDD, then it will be faster. Otherwise, if your HDD is quite fast, you will either notice no difference, or a slight performance penalty. At least that is what I have noticed.

Sir Patrick Crocodile
6th June 2010, 09:41 PM
If your hard drive is very slow, there is less to read from the hard drive. Then, the decompression is faster than the reads from the hard drive. Now that CPU speeds are going up significantly, the difference is probably not noticeable. I definitely do not notice any significant difference on my laptop, but it makes access to the system drive of my NT machine a lot faster. Takes less time to boot up, load application software, etc.

davo
6th June 2010, 09:51 PM
If your harddrive is slow, I/O is the limiting factor, to decompress would take I/O ...

Sir Patrick Crocodile
6th June 2010, 10:00 PM
Decompression is entirely software-based in the case of NTFS though, and as such this means that it is done in RAM and/or the CPU's cache. Both are a lot faster than the hard drive will ever be.

Sir Patrick Crocodile
6th June 2010, 10:08 PM
But it has to read less from the hard drive, thus it takes less time. :)

davo
6th June 2010, 10:10 PM
According to the link i gave that then linked to MS it actually decompresses on disk ... Will re check ....

davo
6th June 2010, 10:11 PM
It would have to with files larger than ram

Sir Patrick Crocodile
6th June 2010, 10:13 PM
Yes - files that exceed the buffer that is. Also block sizes >4KB will not work with compression from what I read.

Sir Patrick Crocodile
6th June 2010, 10:20 PM
true but it doesn't make the access time faster.. I'm being pedantic Croc.

It doesn't speed up the access time of the heads finding and reading the data on the platter as you suggested.Maybe not speed up the heads (seek and read) time, but it will speed up access by shortening the amount of time required to read all the data from the disk. Since the data is compressed, there is not as much to read from the hard drive, and hence you don't need to spend as much time reading from it. Therefore, the overall access time is reduced, and overall access speed is increased.

Sir Patrick Crocodile
6th June 2010, 10:22 PM
And a stubby. Fulli >HIC< bro.