Why NTFS Compression Might Slow Down Your Computer

When you use a Windows computer or server, you might find a feature called NTFS compression. This is supposed to make your files take up less space on your hard drive, which sounds great, right? But there’s a catch: sometimes, this compression can make your computer slower. Let’s explore why that happens.

What Does NTFS Compression Do?

NTFS compression squishes your files and folders so they use less space. Each time you open or change a file, the system needs to un-squish (decompress) it or squish it again (compress). This can use a bit of your computer’s brain power — its CPU for LZNT1 or LZX algorithm, which optimised to utilise minimum CPU.

Compress by LZNT1

Testing How It Works

Some people think that if you have a strong CPU and a slow hard drive, NTFS compression will make your computer faster. To see if this is true, you can do a test.

First, check if compression is turned on or off with this command:

fsutil behavior query DisableCompression

To turn it off, type:

fsutil behavior set DisableCompression 1

To compare, try a test after you change settings. Use a program called diskspd to do this. Here are the steps:

1. Download diskspd from GitHub and unzip it.

2. Create a folder called C:\temp.

3. Use diskspd with a special command to run your test.

Here’s the command and what each part means:

.\diskspd.exe -c32048M -d360 -r -w40 -t16 -o128 -b8k -Sh -L C:\temp\test.test

• -c: The test file size.

• -d: How long the test should run.

• -r: The test will mix up reading and writing to the file.

• -w: What portion of the test is writing.

• -t: How many helpers (threads) are used for the test.

• -o: How many tasks each helper does.

• -b: Size of the chunks of data the test writes.

• -Sh: This makes sure the test doesn’t use tricks to speed up.

• -L: This measures how long tasks take.

What Happens?

Here are some example results:

With compression:

  • Throughput: 25.76 MB/s
  • I/O per sec: 3297.25
  • Average Latency: 616.369 ms
  • Latency deviation (LatStdDev): 1326.232 ms

With compression turned off:

  • Throughput: 714.18 MB/s
  • I/O per sec: 91414.94
  • Average Latency: 22.402 ms
  • Latency deviation (LatStdDev): 12.118 ms

When compression is off, the computer is much faster! It doesn’t spend time squishing and un-squishing files, so it saves time.

So, What’s Wrong With Compression?

Using NTFS compression can slow things down. If you have a lot of files changing often or if you need your computer to be really quick, compression can be a problem. It can be harder for things like databases, where files get used and updated a lot.

What Should You Do?

Think about these things before you decide:

1. How strong your CPU is and how quick your hard drive is.

2. How you use your files — whether you read, write, or do both.

3. The size of the files you usually work with.

4. Do tests that match how you use your computer.

Final Thoughts

NTFS compression can be useful to save space, but it can make your computer slow. It’s important to make sure saving a little space is worth the trade-off in speed. Running some tests is a very good idea before you decide to use NTF compression on your Windows ecosystem.

Comments

Popular posts from this blog

Overview and practical use cases with open source tracing tool for Java Apps. Glowroot. Installation

How only 2 parameters of PostgreSQL reduced anomaly of Jira Data Center nodes

Atlassian Community, let's collaborate and provide stats to vendors about our SQL index usage