0

If I just set checkbox for compressing drive C in Windows Explorer, I will get numerous file sharing errors, because many files are opened when Windows is running.

Is it possible to compress drive in monopole mode somehow, so that it compress all files>

Dims
  • 12,244
  • 78
  • 161
  • 252
  • It is recommended not to compress the C drive or System Drive. It could cause driver installations to fail. Even if you want to do so, DO NOT compress the root directory, and DO NOT compress the Windows directory. Doing so, could even cause your Windows computer un-bootable. But yes, you can do so. – Animesh Patra Aug 22 '16 at 08:59
  • I am compressing drive `C` for many years with no apparent problems, related with this. Even more: for SSD it can make it live longer! – Dims Aug 22 '16 at 09:07
  • @Ramhound says brain. From common reasoning, it is required less r/w operations when accessing compressed files. – Dims Aug 22 '16 at 10:25
  • @Ramhound I prefer to have some reasoning, not just mystical accurate warnings – Dims Aug 22 '16 at 10:35
  • @KinameCole do you have any explanations of your warnings? – Dims Aug 22 '16 at 10:36
  • @Dims I have already explained it. "It could cause driver installations to fail. Even if you want to do so, DO NOT compress the root directory, and DO NOT compress the Windows directory. Doing so, could even cause your Windows computer un-bootable". Now, if you're compressing C drive for many years, then you do not need any explanation, please go on and ignore the warnings. I will always smile though. – Animesh Patra Aug 22 '16 at 11:02
  • @KinameCole you didn't explained, you just threaten with God punishment; why would compression cause driver installation fail? compression is part of `NTFS`, so if compression may fail driver, then it probably can't work with `NTFS` at all? I was using compression for many years but have never compressed entire drive, so explanation is essential – Dims Aug 22 '16 at 12:26
  • use a separate bootable disk. [How to NTFS compress the system drive?](https://superuser.com/q/790420/241386) – phuclv May 24 '17 at 15:18

4 Answers4

1

DO NOT, I REPEAT, DO NOT DO THIS!!

Source: I did the exact same thing a year back and it renders the system entirely unusable. In my case, the process completed without any error, but when you boot, Windows doesn't create a mechanism to properly decompress the data and boot fails. You can compress other folders but leave out Windows and Program files at the least.

Besides, compressing might even mean slower performance depending on your processing power, since everything has to be decompressed every time (though it could be marginally faster if your I/O speeds are the bottleneck).

pulsejet
  • 2,211
  • 2
  • 14
  • 35
  • Your final sentence is not necessarily true: the specific results depend on whether you are bottlenecked by I/O or CPU during the decompression process. I recall reading that Windows' file system compression is deliberately tailored toward speed, precisely so as to not be a bottleneck. If the decompression algorithm can keep up with the compressed data it's being fed from disk, then turning compression on can be a net performance gain because it reduces the amount of disk I/O; even more so if it can compress the files sufficiently that they fit inside the MFT, which can save at least one seek. – user May 22 '17 at 17:09
  • @MichaelKjörling, yeah you're right, edited. – pulsejet May 24 '17 at 15:12
  • 2
    probably you have compressed the boot files. In most cases nowadays the boot partition is on a separate 100-450MB partition, making it possible to boot compressed or encrypted system drive without problem – phuclv May 24 '17 at 15:20
  • A data point, not necessarily entirely relevant here but for comparison: With ZFS, it is generally suggested to turn on LZ4 compression (or LZJB if your ZFS implementation does not support LZ4) because it provides decent compression at a very low processing overhead. It is likewise generally recommended to stay away from gzip compression (at any level) simply for the very large overhead compared to the gain in compression ratio vs lzjb or lz4. – user May 24 '17 at 15:25
  • This answer is full of FUD. There are some specific files that should not be compressed, but it is NEVER Windows+PF folders. – Oleg V. Volkov May 01 '21 at 07:53
1

I compressed through windows recovery system before boot, via command line.compact /C /S /I E:\*.*

All works fine, tested in VMWare

Image

Stephen Rauch
  • 3,091
  • 10
  • 23
  • 26
iperov
  • 111
  • 3
  • 2
    plus I did this this my computer, all works fine, +27GB on my SSD, boot speed same, performance same. So I cannot understand why people dont trust NTFS compression. May be HDD with old processors bad for NTFS compression, but haswell+SSD works perfect http://i.imgur.com/g16rri8.png – iperov May 24 '17 at 10:01
1

I'd say use a Windows 10/11 installation media, then use SHIFT+F10 to open the console, then issue compact however you wish.

Why am I posting then? Just wanted to say that I've used compact/compression on Win10 for years on business, home machines and never had any issue. You can compress the whole system just fine.

You can even issue compact /CompactOs always and have no issues whatsoever.

There is even a GUI for Compact: https://github.com/ImminentFate/CompactGUI

Apache
  • 15,981
  • 25
  • 100
  • 152
-1

For SSD using NTFS compression reduces a lot the life of the SSD, because NTFS compression works as follows:

  1. It writes the file in uncompressed mode
  2. Then it parses the file looking for chunks of clusters that when compressed can leave at least one 4KiB free, if so then re-writes that chunk in compressed mode at the same start location of that chunk, freeing the last 4KiB clusters of that chunk that on compressed mode are not needed.

That is why BIG files that get high NTFS compression ratio also get so fragmented.

Using NTFS compression causes more writes to the disk (if write cache and empty cache are not active for the whole drive, Disk Management -> Drive Properties -> Directives).

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 03 '22 at 09:36