The two compress options aren't the same, but more on that later. The first thing to note is that compressing data is not the best solution when the drive is full. NTFS will suffer badly from lack of space, because there are no more good places to allocate new files or move old files around and fragmentation will increase. Especially when it begins to use the reserved space for the MFT then the MFT might become fragmented and worse things may happen
So at first some other things need to be done
- Reduce pagefile size. Your system will crawl to death if just 1-3GB of pagefile is used. But you can't disable it entirely (at least not a good idea), so a lower limit of 1GB and upper limit of 4GB might be a fine choice. That will save you a few GBs compared to the default setting. You can add more page files on other drives if available
- Reduce hiberfil.sys. Open cmd as admin and run
powercfg /h /size 40
to set the size to 40% of your RAM. From Windows 7 onwards it defaults to 75% the amount of RAM, so setting it to 50% will save you 3GB of disk space. You can also turn it off completely with powercfg /h off
if you don't need hibernation
- Clean up the WinSxS folder with the
DISM
command. For more information read How to Reduce the Size of Your WinSXS Folder
- Check your data usage with some tools like TreeSize or WinDirStat. You'll be surprised by how big some files or folders are, esp some temp and cache folders. Move or delete them if possible. For more suggestions see The Four Best Free Tools to Analyze Hard Drive Space on Your Windows PC
- If you have another HDD then don't store too many unnecessary things on the system drive. Leave it for apps and files that need fast access
- Move the documents folders to another drive
- Move the store app install folder and save folder
- Some other folders can also be moved by changing some configurations, or by creating a symlink. For example many folders in Windows\System32 or Program Files can be moved to HDD. Some tutorials on that
The above is sorted in order of ease of applicability. Just doing the first 2 steps saves you tons of space immediately. Then after doing everything if more space is still needed then just compact the OS. The performance difference is often negligible
The CompactOS feature does indeed worth it on small SSDs compared to HDDs. My old laptop has a 1TB HDD with a 32GB SSD cache. I've tried installing Windows onto the 32GB SSD and it ran noticeably smoother than on the HDD+cache
Regarding your questions:
I'm not sure whether there are any performance penalty associating with compressing the OS drive.
Compressing files always have a CPU time penalty. That doesn't mean that it'll be slow though, since on slow storage devices like HDDs that penalty might be far less than the wasted time on accessing/reading the data from HDD. That's why sometimes compressing easily-compressed data will make it faster to access. One example is that hibernation in newer Windows compresses data before writing to disk, which makes shutdown much faster because the CPU can compress faster than the drive can write
The difference may be less obvious on SSDs, but there's no way to know that for sure except benchmarking for your specific situation. Each use case is different, and not all disks are created equal. For example old SSDs may run at only ~200MB/s which is just about as fast as an HDD nowadays (but their obvious advantage is the fast access time), whereas newer algorithms like LZ4 (which is used in Linux's zram) can sustain ~3.9GB/s which is even faster than modern SSDs. See
There are often no need to worry, because Windows will do a benchmark while installing to assess whether CompactOS should be enabled or not. Although after installing apps and things that benchmark result may not be correct anymore and you may want to do a reassessment yourself
And I'm not even sure whether this option is the same with "Compress this drive to save disk space" at the C drive property as per below
Basically both use the compression feature of NTFS and can be configured by compact.exe
, but there are many major differences
The "Compress your OS drive" (i.e. CompactOS) feature uses the newly introduced compression algorithms XPRESS* and LZX in Windows 10's NTFS. They're designed for efficient storage for "static" files that don't change much (like executables)
OTOH the "Compress this drive to save disk space" feature uses LZNT1 algorithm and is designed for compressing frequently changed data files for optimum performance. That means it'll be faster but the compression ratio will not be as high. It's like checking the "Compress contents to save disk space" option for all files and folders on the drive
![Compress contents to save disk space](../../I/static/images/83e612b1438691834cc6643452dae45958906ab69435f5136edaae95c0916ece.png)
Files compacted by CompactOS will not be marked as compressed (either shown in blue or with double arrows) if that feature is enabled
- CompactOS compresses selected system files, while NTFS whole-disk-compression compresses every file on the disk
In fact you can use the new algorithms for CompactOS for any user files, but you can't do on-the-fly editing on them, as they're designed for static read-only files like mentioned above. Writing to those files will uncompress them. For more information about that as you can read NTFS compressed folders: is it possible to tweak compression ratio?
Further reading:
The link given by Xen2050 is also good. It shows that even with the drive compression feature the difference is not that much, and in some cases it'll be faster, as I mentioned above
Is this on an 8-16 core monster desktop, or a single core atom netbook? I'm pretty sure there'll be some performance penalty, not sure if it'll be noticeable or not. This article from 2011 might be interesting & mentions "With information being compressed on the fly, you're consuming more of an SSD's available write cycles than if you were writing the files uncompressed. This could have negative implications on the drive's endurance" but it's not obvious why. And I thought I read SSD's might do their own compression?
– Xen2050 – 2019-02-16T05:56:26.950@Xen2050, it's a 4 core system – Graviton – 2019-02-16T06:50:43.967
2@Xen2050 that's about NTFS compression for general purpose files that can be read and write constantly, not CompactOS which compresses read-only system files, so no write-amplification is involved and write cycle doesn't further change. And worrying about drive wear nowadays is pretty much nonsense, because wear-leveling algorithms are increasingly good, and the total data write is enough for at least 4-8 years even if you write hundreds of GBs a day, that's why modern SSDs have 5-year warranties. I have an old workstation from 2009 or 2012 and its SSD just passed half its life – phuclv – 2019-02-16T14:46:14.883