SSD (de)fragmentation?

X200, X201, X220 (including equivalent tablet models) and X300, X301 series specific matters only.
Post Reply
Message
Author
jamess
Junior Member
Junior Member
Posts: 377
Joined: Mon Jul 03, 2006 3:45 pm
Location: Ljubljana, Slovenia, European Union

SSD (de)fragmentation?

#1 Post by jamess » Fri Mar 07, 2008 3:59 pm

Does SSD need to be defragmented in a same way as HDD?

I am asking because I really dislike the Vista defragmentation process which takes ages - around 14 hours straight with my 7K200. So i am wondering if SSDs need this too for "optimal" performance.

Thanks
X300... own
X61 Tablet... sold
X60s... sold
T60p... sold
T43... sold

SHoTTa35
ThinkPadder
ThinkPadder
Posts: 1597
Joined: Tue May 29, 2007 6:20 pm
Location: Wash, DC
Contact:

#2 Post by SHoTTa35 » Fri Mar 07, 2008 4:17 pm

Vista defragments in the background so no it wont show some francy graphics and defrag in 3 mins. If you just use your PC and not think about defragmenting then Vista does it once a week and takes it sweet lil time. If you are using the PC you don't have to suffer thru defragging since those other programs take up the HD for themselves. If it's done overnight then i guess it shouldn't matter how long it takes.

About the question tho, SSDs don't need to be defragmented like HDDs do. The main reason you defragment is to put the information in order on a circular disk so that when it spins it gets all the info it needs in 1 continuous flow. With SSDs there's no need for that since the 0.1ms access time means it can access data from cluster 1 and cluster 300,000 and 287222, 37,000 and the rest before the HDD can get all from 1 to 300,000. The 16.2ms access time vs 0.1ms is the reason. So while some people will still defragment their SSDs, it doesn't help so much anymore.

This and other old habbits die hard :) (manual defrag)
Last edited by SHoTTa35 on Fri Mar 07, 2008 5:47 pm, edited 1 time in total.
Current - Thinkpad T410si - Core i3 330m, 4GB, 250GB 5400RPM, WXGA+, FPR, BT, Camera, DVDRW, Gobi2000, Win7 Pro x32
Past - Thinkpad T410 - T400 - T61 - T60 - T43 - T42 - T41 - T40 - T23 - 600X

jamess
Junior Member
Junior Member
Posts: 377
Joined: Mon Jul 03, 2006 3:45 pm
Location: Ljubljana, Slovenia, European Union

#3 Post by jamess » Fri Mar 07, 2008 4:25 pm

Thanks for great clarification.
X300... own
X61 Tablet... sold
X60s... sold
T60p... sold
T43... sold

jayk
Freshman Member
Posts: 81
Joined: Tue Jun 01, 2004 5:18 pm

#4 Post by jayk » Fri Mar 07, 2008 7:38 pm

SHoTTa35 wrote:Vista defragments in the background so no it wont show some francy graphics and defrag in 3 mins. If you just use your PC and not think about defragmenting then Vista does it once a week and takes it sweet lil time.
Not only should defragging not be needed on an SSD (as already noted - access times should be independent of 'location' on the disk), I'd imagine it could actually hurt the life of the device. I know the lifetime point with SSDs has been hotly debated, and most of the analyses conclude it should be a non-issue for normal use due to wear-leveling, but fundamentally the flash memory in these things has a lifetime of somewhere between 100K-1M write cycles (that's on a per-block basis, and I think the block-size in these things has gotten up to 1MB or more). OS write-caching can help (although this may be disabled during defrag), but I would think defragmenting of a badly fragmented disk is just the sort of thing you don't want to do to an SSD.

I wonder if there are utilities availble that show how many times each block in an SSD has been erased.

- Jay

w0qj
Senior Member
Senior Member
Posts: 600
Joined: Fri Jun 11, 2004 9:53 pm
Location: Hong Kong

#5 Post by w0qj » Sat Mar 08, 2008 6:05 am

With due respect, defrag actually fulfills 2 functions:

a) defrag (obviously), and

b) keeps your data files in 1 continuous file (instead of fragments of a file), for MUCH easier data recovery effort.


I've personally had a HDD that somehow had a MBR corruption, and I had all my new data recovered (the new data files since my weekly defrag session).

If I never did any defrag before this MBR corruption, I would NEVER have recovered anywhere near the 100% data recovery rate for my new data added weekly.
(It would be almost impossible, needing a time/budget of DoD to manually splice together file fragments found on your 80 GB hard drive).

Some of those files lost its long filenames, but apparently still retained its data correctly and no corruption.

eg: This-is-not-a-test.doc
becomes==> this-i~1.doc

mteddy
Posts: 10
Joined: Sat Oct 14, 2006 1:52 am
Location: Germany

#6 Post by mteddy » Sat Mar 08, 2008 6:38 am

w0qj wrote:..., for MUCH easier data recovery effort.
I don't think so: The defragmenting process overwrites your deleted files, so you cannot longer restore them.
Restoring the MBR is not difficult and is independent of the fragmenting of your hd (MBR is always at the same address). When you restored your files, your software probably found the file system informations and then restoring is never a problem.

jamess
Junior Member
Junior Member
Posts: 377
Joined: Mon Jul 03, 2006 3:45 pm
Location: Ljubljana, Slovenia, European Union

#7 Post by jamess » Sat Mar 08, 2008 6:43 am

Can I (or anyone) really recover data even if i delete a file/folder, and also empty recycle bin?

What about factory restore? If i decide to sell my thinkpad or give it to someone, if I perform factory restore with choosing the option to format and delete all my data - is it safely deleted or do i need to perform any other additional tasks?

thanks
X300... own
X61 Tablet... sold
X60s... sold
T60p... sold
T43... sold

juhap
Posts: 6
Joined: Wed Feb 27, 2008 8:51 am
Location: Espoo, Finland

#8 Post by juhap » Sat Mar 08, 2008 9:51 am

Usually just deleting the files does not really remove the information from disk. Instead the space is just marked as free, meaning it can be overwritten at some point.

If you really want to clean up, for example when you are giving away the machine, you should search for a software that will overwrite the data multiple times with random patterns. There are both commercial and free alternatives available. At least in case of HDD, just formatting the drive is not enough. It will be still possible to retrieve the data. It's not necessarily easy, but certainly possible.

I don't know how things are with SSD.
Upcoming x300 owner

jamess
Junior Member
Junior Member
Posts: 377
Joined: Mon Jul 03, 2006 3:45 pm
Location: Ljubljana, Slovenia, European Union

#9 Post by jamess » Sat Mar 08, 2008 11:05 am

Hmm, that ain't good. I thought at least factory restore actually permanently destroys all your data. Can anyone please suggest sor recommend such a program - software that will permanently delete all my data stored on HDD before giving/selling it away.

Thanks

EDIT: I found it and it's free for ThinkPad users:
http://www.pc.ibm.com/us/think/thinkvan ... posal.html
X300... own
X61 Tablet... sold
X60s... sold
T60p... sold
T43... sold

w0qj
Senior Member
Senior Member
Posts: 600
Joined: Fri Jun 11, 2004 9:53 pm
Location: Hong Kong

#10 Post by w0qj » Sun Mar 09, 2008 3:16 am

May we stressing this point again, as our way of contributing back to this Forum, from my personal data recovery experience:

***If you've lost your data file and it's fragmented, basically there's no practical way to recover it back. Your file recovery utility can only recover the 1st file fragment for you.

w0qj wrote:...b) [defrag] keeps your data files in 1 continuous file (instead of fragments of a file), for MUCH easier data recovery effort.

sjthinkpader
Senior ThinkPadder
Senior ThinkPadder
Posts: 2908
Joined: Tue Jan 22, 2008 8:29 pm
Location: San Jose, CA

#11 Post by sjthinkpader » Sun Mar 09, 2008 4:30 am

For SSD, the number of times cells can be written and erased is limited. The more you write to the cells, the more likely they would fail. So best strategy is not to defrag.

Each chip has spare rows and blocks but they will be used up eventually. In addition, there will be data retention failures. These will be corrected by error detection and correction mechanism in the controller chip.
T60p 2623-DDU/UXGA IPS/ATI V5200
T60 2623-DCU/SXGA+ IPS/ATI X1400
T43p 2668-H8U/UXGA IPS/ATI V3200
R50p 1832-NU1/UXGA IPS/ATI FireGL T2
X61t 7762-B6U dual touch IPS/64GB SSD
X32 2673-BU6/32GB SSD
755CDV 9545-GBK Transmissive Projection LCD

sjthinkpader
Senior ThinkPadder
Senior ThinkPadder
Posts: 2908
Joined: Tue Jan 22, 2008 8:29 pm
Location: San Jose, CA

#12 Post by sjthinkpader » Sun Mar 09, 2008 4:33 am

w0qj wrote:...

***If you've lost your data file and it's fragmented, basically there's no practical way to recover it back. Your file recovery utility can only recover the 1st file fragment for you.

w0qj wrote:...b) [defrag] keeps your data files in 1 continuous file (instead of fragments of a file), for MUCH easier data recovery effort.
This is only due to the utility used for your recovery. The FAT table keeps track of where the fragments are located.

This set of utilities recovered a crashed HDD for me where it would have cost the value of the whole computer at a commercial recovery lab. All the files were recovered:

Svend Olaf Mikkelsen

There were none of the "first fragment recovered" issue you mentioned.
T60p 2623-DDU/UXGA IPS/ATI V5200
T60 2623-DCU/SXGA+ IPS/ATI X1400
T43p 2668-H8U/UXGA IPS/ATI V3200
R50p 1832-NU1/UXGA IPS/ATI FireGL T2
X61t 7762-B6U dual touch IPS/64GB SSD
X32 2673-BU6/32GB SSD
755CDV 9545-GBK Transmissive Projection LCD

OCedHrt
Posts: 4
Joined: Tue Feb 26, 2008 12:19 pm
Location: San Jose, CA

#13 Post by OCedHrt » Tue Mar 11, 2008 6:29 am

sjthinkpader wrote:
w0qj wrote:
There are two kinds of data recovery:

1. Lost or corrupt partition table. This can usually be recovered by the backup that already exists on the disk. In this case, nearly all (if not all) data can be easily recovered. Honestly, this can hardly be considered data recovery.

2. There is no backup. I have experienced this several times. In this case, the only option is to scan the disk and search for recognizable file types. In this case fragmentation will completely destroy any recovery effort.

sjthinkpader
Senior ThinkPadder
Senior ThinkPadder
Posts: 2908
Joined: Tue Jan 22, 2008 8:29 pm
Location: San Jose, CA

#14 Post by sjthinkpader » Tue Mar 11, 2008 2:06 pm

I don't really know which kind of failure I had in the two recovery instances. Once was at a commercial labs that cost arm and a leg. The other instances was using Findpart from Svend. In both case almost all files were recovered.

I think Findpart goes and look for all the file fragments because it ran a long time. It was done using a standalone computer running the utility with the failed drive connected plus a third drive to hold the recovered files.
T60p 2623-DDU/UXGA IPS/ATI V5200
T60 2623-DCU/SXGA+ IPS/ATI X1400
T43p 2668-H8U/UXGA IPS/ATI V3200
R50p 1832-NU1/UXGA IPS/ATI FireGL T2
X61t 7762-B6U dual touch IPS/64GB SSD
X32 2673-BU6/32GB SSD
755CDV 9545-GBK Transmissive Projection LCD

whizkid
ThinkPadder
ThinkPadder
Posts: 1555
Joined: Wed Sep 29, 2004 1:40 pm
Location: Saint Paul, MN
Contact:

#15 Post by whizkid » Tue Mar 11, 2008 3:58 pm

juhap wrote:If you really want to clean up, for example when you are giving away the machine, you should search for a software that will overwrite the data multiple times with random patterns.
You should read this: http://16systems.com/zero/index.html

They claim writing zeroes once on a drive will make any data irretrievable.

Points against them:
- they don't really make a large effort worthwhile in this contest
- you can get free software to write random data multiple times
- it doesn't take very much effort (but could take a long time)
- it's certainly not any less secure to use it

FWIW
Machine-Project: 750P, 600X, T42, T60, T400, X1 Carbon Touch

sjthinkpader
Senior ThinkPadder
Senior ThinkPadder
Posts: 2908
Joined: Tue Jan 22, 2008 8:29 pm
Location: San Jose, CA

#16 Post by sjthinkpader » Tue Mar 11, 2008 4:47 pm

For Flash used in SSD, erase is actually writing all ones to the memory cells. Because zero is trapping electrons in the floating gate, you can't really write in opposite polarity like a magnetic disk.

So the operation is usually read, modify, re-write into an empty area. The old area is then marked for erasure. There may be a erase/reclaim operation being done in the background to hide the long erase operation.
T60p 2623-DDU/UXGA IPS/ATI V5200
T60 2623-DCU/SXGA+ IPS/ATI X1400
T43p 2668-H8U/UXGA IPS/ATI V3200
R50p 1832-NU1/UXGA IPS/ATI FireGL T2
X61t 7762-B6U dual touch IPS/64GB SSD
X32 2673-BU6/32GB SSD
755CDV 9545-GBK Transmissive Projection LCD

Greg Gebhardt
thinkpads.com customer
thinkpads.com customer
Posts: 832
Joined: Tue May 11, 2004 6:29 pm
Location: Jacksonville, Florida

#17 Post by Greg Gebhardt » Mon Mar 17, 2008 2:46 pm

After installing using the recovery disks on my SSD, I defragged the drive and it. Doubt it needed it or helped but thought I would do it before installing my applications. It defragged in only 12 minutes!
Greg Gebhardt
Jacksonville, Florida

beeblebrox
**SENIOR** Member
**SENIOR** Member
Posts: 760
Joined: Thu Nov 11, 2004 3:22 pm
Location: No location is OK - BillM

Defragmenting a SSD drive is the BIGGEST NONSENSE ever!

#18 Post by beeblebrox » Sun Mar 30, 2008 1:43 am

Folks,
before you start discussing various methods of defragmenting an SSD I would suggest to read something about its technology first.

Defragmenting a SSD drive is nonsense, does not work and reduces its lifetime.

There is no difference in access time between a fragmented and defragmented file, because there are no moving parts. Reading from a flash is like reading from main memory.

You can not defrag an SSD, because the internal flash controller writes data according to its least used algorithm to widely different cells to avoid heavy usage of individal cells. The algorithm always spreads the data across the whole flash chip.

Starting a defragger in Vista is actually doing absolut nothing just randomly re-distributing data across the flash chip. Your flash will honor this by constantly diminishing life time.

So, the first thing to do is killing background defrag. And also disabling your time stamp write cycles.

For more information, look for SAMSUNG or SANDISK data material.

Just my 2cts...

beq
Sophomore Member
Posts: 180
Joined: Mon Jan 31, 2005 2:17 am
Location: TX, USA

#19 Post by beq » Sun Mar 30, 2008 9:41 am

Heh I wonder why my X300 with SSD was preloaded with Diskeeper (which I removed) :)

jamess
Junior Member
Junior Member
Posts: 377
Joined: Mon Jul 03, 2006 3:45 pm
Location: Ljubljana, Slovenia, European Union

#20 Post by jamess » Sun Apr 13, 2008 12:41 am

Removed my as well, reading all the above.
X300... own
X61 Tablet... sold
X60s... sold
T60p... sold
T43... sold

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “ThinkPad X200/201/220 and X300/301 Series”

Who is online

Users browsing this forum: No registered users and 9 guests