Can you defrag an encrypted file system

4

I just encrypted my entire hard drive with truecrypt and was wondering can I still defrag it?

Or will that not work anymore or break something.

Jake Anderson

Posted 2013-05-09T03:38:11.323

Reputation: 121

Answers

5

Usually, yes you can since the encrypting file system is presenting itself as a traditional file system to Windows and unaware applications.

The larger question is what do you plan to gain with defragmentation since it was conceived when systems were older and slower and fragmented volumes could impact systems performance.

If you're striving to max out your systems performance, defragmentation is the bottom of the list as far as return of investment.

Karen3819x4

Posted 2013-05-09T03:38:11.323

Reputation: 450

Agreed, unless the encryption software implicitly says not to do it, you should be safe. – Keltari – 2013-05-09T03:47:17.813

For Windows and SATA based drives, I beg to argue about performance and fragmentation. Working on Windows machines for years now, fragmentation has always been on the top of my list I've seen to be the main cause to slow a system down. – Jake Anderson – 2013-05-09T04:10:19.207

And you have the benchmark results of improvements of defragged file system b4 and after ? Because the misconception of defragging is legacy thinking from Microsoft who doesn't offer even approximate benchmarks of performance improvements. The Pagefile, another useless superstition from a time that RAM used to cost $100 a MB and just a spacewaster. I don't care what your results are if you plan to post them, but rate your drive pre defrag then rerate it and you won't see a performance improvement. – Karen3819x4 – 2013-05-09T04:49:04.533

What is your defrag method anyway, which app and how are you performing it cause i bet you're making the first mistake in the method that isn't even effecitively defragging anything. Share your tool and style, the worst that can happen is I'll learn you about what you're doing wrong and you can rest in the comfort of misconception. – Karen3819x4 – 2013-05-09T04:50:37.697

I make use of MyDefrag. Paid wise I like PerfectDisk. I've always seen massive improvements on app start time and responce times on boot up with a defrag. – Jake Anderson – 2013-05-09T06:58:36.387

Too bad you aren't defragging your locked system files, the ones that count and cost you two hours to respond while you were defragging your "whatever" before responding to the challenge. It's your personal time to waste defragging, probably paging and even using Windows Defender I'm sure. You should be proud .... ok. – Karen3819x4 – 2013-05-09T07:01:37.237

PerfectDisk can defrag normally locked files with its special "boot-time" option. – martineau – 2013-05-09T11:39:45.440

PD and others have boot time defragmentation options. Not really time wasted when they run at 1am ^_^ – Jake Anderson – 2013-05-09T16:37:13.013

-1

Any system using a traditional hard drive needs defragging occasionally. No so with SSD. Rotational delay and mechanical arm movement are minimized when files are more contiguous, resulting in faster seek times and overall performance. Steveo (35 years in IT)

Steveo

Posted 2013-05-09T03:38:11.323

Reputation: 1

1SSDs can still be fragmented – Ramhound – 2017-03-24T19:51:27.877

Erm... Didn't he? What he's saying is, SSD's don't have rotational delay and mechanical arm movement, so they don't really need defragmentation to make the files more continuous, like normal hard drives do. Makes sense to me. – Andrew – 2017-11-01T06:43:52.787

Also, on SSD's: https://askleo.com/should-i-defrag-truecrypt/ "And there’s also some controversy as to whether defragmenting an SSD can actually shorten its life."

– Andrew – 2017-11-01T06:47:42.777

@Andrew: Sorry for stirring up dust, but I believe that ThatRandomGuy is not saying that Steveo's answer should be downvoted (or worse, although I'm not sure what more anyone could ask anyone else to do beyond downvoting); I believe that ThatRandomGuy is beating the old dead horse about anonymous downvotes (i.e., we *shouldn't just* downvote; if we downvote, we should post a comment explaining our vote).  Of course I could be totally wrong. – Scott – 2018-12-03T04:48:44.030

I agree that Steveo's point is valid,  but I believe that it doesn't really address the question of interference between encryption and defragmentation. – Scott – 2018-12-03T04:52:41.057

@Scott You've lost context, comment must have been deleted – Andrew – 2018-12-03T15:01:49.533

@Andrew: Yeah, your comment on Nov 1 '17 at 6:43 appeared to be responding to a comment by ThatRandomGuy, and that comment is now gone.

– Scott – 2018-12-03T15:15:01.773

-2

My understanding of a memory chip is that the 1st random access takes more time. The access of the subsequent bytes takes less time. From this perspective, if data are fragmented across the SSD, then yes, it takes more time than if all bytes are contiguous because each byte would be a "random" access. Though SSD doesn't have moving parts like an HDD, avoiding random access still saves time.

However, unlike volatile memory (DRAM, SRAM, etc) that can be read/written unlimited times, non-volatile memory has LIMITED write cycles! Thus, if you are trying to defrag an SSD, keep this attribute in mind. You ARE wearing it out! After all, it's almost futile. All SSD controllers implement a technology called "wear balancing", ie. you want to spread out writing to a cell as evenly across the SSD as possible so that you are not killing certain sectors. This spreading out process in itself leads to fragmentation.

Alex

Posted 2013-05-09T03:38:11.323

Reputation: 1

2Can you explain how this answers the question? – Scott – 2018-12-03T04:33:02.767

It doesn't answer the OP's question directly but discussions raised by others on SSD. Yes, people sidetracked. However, since the OP didn't specify if he has HDD or SSD, the merit of my post is to warn him that if it is SSD, do NOT do it, regardless of if it's encrypted or not. – Alex – 2018-12-03T06:39:38.837

Please take our short [tour] to see Super User is not a forum. Answers should answer the question. Your answer might be good if the question was "should I defrag an SSD?" where encryption is not taken into consideration. But the question is "should I defrag an encrypted filesystem?" where SSD is a secondary issue (if any). My point is the main concern here is encryption and your answer doesn't address this at all. – Kamil Maciorowski – 2018-12-03T23:18:42.117