Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

De-fragging an SSD drive

Thread Tools
 
Search this Thread
 
Old 12th Jul 2014, 11:24
  #1 (permalink)  
Psychophysiological entity
Thread Starter
 
Join Date: Jun 2001
Location: Tweet Rob_Benham Famous author. Well, slightly famous.
Age: 84
Posts: 3,270
Received 37 Likes on 18 Posts
De-fragging an SSD drive

The advantages of de-fragging a rotating drive are obvious, but an SSD?

After ages of aborted updates - during which the drive LED was on a lot of the time - I wondered what dross was left of the 'disc'. The de-frag process worked normally, but I have no idea what delays a fragmented SSD might cause.
Loose rivets is offline  
Old 12th Jul 2014, 11:30
  #2 (permalink)  
 
Join Date: Jan 2008
Location: Timbuktu
Posts: 962
Likes: 0
Received 0 Likes on 0 Posts
You defrag a HDD to reduce seek times (heads jumping to a different place). Because seek times with an SSD don't exist, there's no need to defrag it
Booglebox is offline  
Old 12th Jul 2014, 12:10
  #3 (permalink)  
 
Join Date: Aug 2002
Location: Earth
Posts: 3,663
Likes: 0
Received 0 Likes on 0 Posts
The advantages of de-fragging a rotating drive are obvious, but an SSD?
Defragging SSDs is an utterly pointless activity as seek times exactly the same for any data byte. The choice of your SSD drive (and thus its associated firmware) will have a much greater effect on performance.

Defragging slow (5400rpm or 7200rpm) PC/Laptop drives is also a somewhat questionable activity as there are probably many other things you could do to improve your performance before reaching defragging.
mixture is offline  
Old 12th Jul 2014, 16:48
  #4 (permalink)  
Psychophysiological entity
Thread Starter
 
Join Date: Jun 2001
Location: Tweet Rob_Benham Famous author. Well, slightly famous.
Age: 84
Posts: 3,270
Received 37 Likes on 18 Posts
I'm not at all clear what goes on in a solid state drive. I had wondered if controlling switching would take a greater time if it had to go to a relatively distant array of switches - millions of times.

The thing is, it looks like Windows doesn't differentiate from one technology to the next with its de-frag schedule. So, I wonder if it would be wise to turn it off. If one can.
Loose rivets is offline  
Old 12th Jul 2014, 22:51
  #5 (permalink)  
 
Join Date: Aug 2002
Location: Earth
Posts: 3,663
Likes: 0
Received 0 Likes on 0 Posts
I'm not at all clear what goes on in a solid state drive.
In a nutshell its a bunch of memory components (SLC or MLC) which are bridged to the host computer via a controller running the manufacturer's firmware. Sort of like doing RAID0 with multiple disks for maximum capacity.

But I'll happily concede there are plenty of people who know far more about how SSD works than me...

I had wondered if controlling switching would take a greater time if it had to go to a relatively distant array of switches - millions of times.
However "far" it has to go, it still will be light years quicker than heads moving over a spinning platter.

Most of the voodoo magic is done on the controller and its associated firmware, which is why choice of SSD manufacturer and their track record plays a major part in SSD reliability (along side the correct choice of memory component type for your application).

The thing is, it looks like Windows doesn't differentiate from one technology to the next with its de-frag schedule.
I'll see if I can dig up anything, but I'd hazard a guess that whilst the de-frag runs, the code checks and acts accordingly depending on what type of disk its being asked to act on.

EDIT TO ADD:

See this forum post (the first answer) by a Microsoft employee which pretty much confirms what I said (i.e. they're basically doing "garbage collection" and not a traditional defrag) ....

Hello, In Windows 7 - we turned off defrag for SSDs as you mention in your entry; but in Windows 8, we have changed the defrag tool to do a general optimization tool that handles different kinds of storage, and in the case of SSD's it will send 'trim' hints for the entire volume;

In Windows 8, when the Storage Optimizer (the new defrag tool) detects that the volume is mounted on an SSD - it sends a complete set of trim hints for the entire volume again - this is done at idle time and helps to allow for SSDs that were unable to cleanup earlier - a chance to react to these hints and cleanup and optimizer for the best performance. We do not do a traditional defrag (moving files to optimizer there location for space and performance) on SSDs.
Doing "garbage collection" is important because the SSD can erase and mark capacity as free in its idle time.... which removes the need to erase old data before writing new data at the time you need it (traditional drives can overwrite unused sectors.... SSD is two step... erase then write).

Last edited by mixture; 12th Jul 2014 at 23:02.
mixture is offline  
Old 12th Jul 2014, 23:09
  #6 (permalink)  
 
Join Date: Jun 2009
Location: Canada
Posts: 464
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by Loose rivets
I'm not at all clear what goes on in a solid state drive. I had wondered if controlling switching would take a greater time if it had to go to a relatively distant array of switches - millions of times.
The thing is, the SSD moves blocks around dynamically to spread the wear across the disk. On a hard drive, if the operating system writes to block 1, it's almost certain to write to block 1 on the physical disk, unless that block has failed and the disk reallocated a spare block to replace it. On an SSD, writing to block 1 may write to physical block 1 in the flash RAM the first time, and then to block 23,956,565 the second time because that block hasn't previously been written to.

So there's no real benefit to defragging--it may well end up making the SSD more fragmented at the flash RAM level--and significant downsides.
MG23 is offline  
Old 12th Jul 2014, 23:17
  #7 (permalink)  
 
Join Date: Jan 2008
Location: Timbuktu
Posts: 962
Likes: 0
Received 0 Likes on 0 Posts
SSD moves blocks around dynamically to spread the wear across the disk
I believe that only works if you have TRIM (wear-leveling) enabled, which is it is all recent OSes.
I got a laptop a few years ago with an SSD that had Vista on it before, that doesn't support TRIM... immediately put W7 on it but a few months later the SSD was dead
Booglebox is offline  
Old 13th Jul 2014, 00:06
  #8 (permalink)  
 
Join Date: Aug 2002
Location: Earth
Posts: 3,663
Likes: 0
Received 0 Likes on 0 Posts
I believe that only works if you have TRIM (wear-leveling) enabled
Nope. Any SSD drive worth its salt does wear-levelling on the controller as part of the firmware voodoo magic.
mixture is offline  
Old 15th Jul 2014, 11:06
  #9 (permalink)  
Psychophysiological entity
Thread Starter
 
Join Date: Jun 2001
Location: Tweet Rob_Benham Famous author. Well, slightly famous.
Age: 84
Posts: 3,270
Received 37 Likes on 18 Posts
I had intended investigating Raid 0, thinking it would give backup and more speed. (forgotten the source of that gem) However, I see a LOT of minus points in going that route, including loss of TRIM.

Two separate drives seems to be the answer, and right now I'm using the 2-1/2" drive from a defunct HP laptop as the on-board backup. The next backup level is a remote USB HD and memory sticks.

Both drive types are partitioned to give four logical drives. Any strong opinion about NOT partitioning SSDs?
Loose rivets is offline  
Old 15th Jul 2014, 11:27
  #10 (permalink)  
 
Join Date: Aug 2002
Location: Earth
Posts: 3,663
Likes: 0
Received 0 Likes on 0 Posts
I had intended investigating Raid 0, thinking it would give backup and more speed
Erm.... RAID0 gives the latter but not the former. Whoever wrote the article you read stating the former ought to be hung, drawn and quartered !

Strictly speaking the former, in RAID setups where it does apply, is also defined as "redundancy" rather than "backup" ... for the obvious reason that you're presented with one logical drive ... the number "one" being a big hint that it's not a "backup".

memory sticks
How many times have I said on here that USB sticks will come and bite you in the backside if you start using them as backup devices.

Hard drives, CDs, DVDs, BluRay disks ... hell, even printed copies !

But memory sticks get chucked into the same category of robustness as floppy disks.

If you insist on using USB sticks, at least go off and hunt down some industrial grade ones that use the more expensive SLC cells.
mixture is offline  
Old 15th Jul 2014, 12:16
  #11 (permalink)  
Psychophysiological entity
Thread Starter
 
Join Date: Jun 2001
Location: Tweet Rob_Benham Famous author. Well, slightly famous.
Age: 84
Posts: 3,270
Received 37 Likes on 18 Posts
Erm.... RAID0 gives the latter but not the former. Whoever wrote the article you read stating the former ought to be hung, drawn and quartered !
Hence the 'minus points going that route'. But isn't the punishment just a tad harsh? Hung and drawn - but not quartered, surely?

Yep, it sounds like it's not for me, so just staying with my four partitions for now. My next post is about getting smooth and indeed instant access to the drives.

Sticks? Yes, I do make too much use of them, but only for popping out. It's true a robbery or fire would take out the other backups, and so far I've resisted my stuff going into the clouds. Three sticks hung on different appendages might be a short term solution. Lexar for example seem horribly expensive and one could buy an array of products for the same price.

I do put my book on my phone, my GPS sim, and at least 3 sticks, so quite a lot of carried backup types.

What about SD cards? I've used one for ages since it lies flat in my wallet, but I really don't know much about their reliability since they all seem to claim perfection.
Loose rivets is offline  
Old 15th Jul 2014, 14:08
  #12 (permalink)  
 
Join Date: Aug 2002
Location: Earth
Posts: 3,663
Likes: 0
Received 0 Likes on 0 Posts
But isn't the punishment just a tad harsh? Hung and drawn - but not quartered, surely?
Well, you could just send them to the Danish bacon factory I saw on TV yesterday where a robot will happily conduct all three in one the blink of an eye !

But I digress...

Yep, it sounds like it's not for me
Well, RAID is good and useful.... its RAID0 that's not for everyone.

I do put my book on my phone, my GPS sim, and at least 3 sticks, so quite a lot of carried backup types.
Ok, I'll let you go then since you at least seem to have heard my endless comments about a minimum of three backup copies of anything important !

I want a signed copy of this most valuable sounding book when you publish it !

What about SD cards?
Same technology as in flash cards... so typically not unless they're SLC based "industrial" ones.

However.... I could concede that there are two points in their favour ....

- they are probably less prone to mechanical forms of damage than USB sticks (as your wallet storage implies).

- its also easier to get hold of high quality SD cards from reputable manufacturers, unlike USB sticks where every man and his dog is churning them out and it can be difficult to tell what you're getting.

So as long as you continue to abide by my multiple copy rule, using SD cards for one of your copies would be more acceptable than USBs.
mixture is offline  
Old 15th Jul 2014, 20:45
  #13 (permalink)  
 
Join Date: Jun 2007
Location: UK
Age: 70
Posts: 191
Likes: 0
Received 0 Likes on 0 Posts
My computer doctor told me ;


NEVER defrag an SSD - you may damage it.
NEVER use more than 2/3rd capacity of an SSD for maximum performance.


Works for me
Terry McCassey is offline  
Old 15th Jul 2014, 21:04
  #14 (permalink)  
Psychophysiological entity
Thread Starter
 
Join Date: Jun 2001
Location: Tweet Rob_Benham Famous author. Well, slightly famous.
Age: 84
Posts: 3,270
Received 37 Likes on 18 Posts
Mmm. . . so 2/3 philosophy will imply not partitioning, I would guess. Narrowing the target will no doubt focus the read-writes on a smaller spot. Never gave that a thought when I put the OS and Office on the first partition, though buying an OS dedicated drive of say, 100 gig, would be as burdened as my 240's half. That's of course if an SSD really hides the other partition from the first.

Book? Same The Perfect Code. Still on Kindle, but now being rewritten with a lot of over-thinking complexity ripped out and the sequel ready to combine to make the full yarn. It would have been done a year ago if life hadn't got in the way. Ho hum.
Loose rivets is offline  
Old 15th Jul 2014, 23:39
  #15 (permalink)  
 
Join Date: Aug 2002
Location: Earth
Posts: 3,663
Likes: 0
Received 0 Likes on 0 Posts
NEVER defrag an SSD - you may damage it.
Hmmm, well.

I'd rather say ....

"NEVER defrag an SSD because its an utterly pointless waste of time"

Damage is going a bit too far, and likely technically incorrect because it doesn't do anything that a normal of series of reads and writes does.

NEVER use more than 2/3rd capacity of an SSD for maximum performance.
I call absolute BULL on that one.

Its an SSD. You can access all of it at exactly the same speed.

Now, there may be OS related reasons for only using 2/3rds if the SSD is your boot disk (i.e leaving 1/3 free for memory paging etc.)... but that's nothing to do with SSD capabilities.
mixture is offline  
Old 16th Jul 2014, 03:53
  #16 (permalink)  
 
Join Date: Jun 2009
Location: Canada
Posts: 464
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by mixture
Its an SSD. You can access all of it at exactly the same speed.
I believe there used to be issues with block erase and write levelling on packed SSDs in the early days. But they now all have TRIM support and excess capacity for write levelling and replacing bad blocks (e.g. a 240GB SSD might actually have 256GB of Flash), so it's no longer really a problem.
MG23 is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.