1

When repartitioning to a different size on an SSD, is the data in the partition rewritten to the SSD, or is an aggressive rereferencing method used?

Specifically, when using gparted under Ubuntu to repartition an SSD, there is a step whereby it claims it is "copying the partition" to move it up or down, as per the partitioning request. Is this an actual copy, or is the OS smart enough to simply rehome the blocks / sectors? Or does the SSD controller understand the nature of the copy and simply rehome the blocks / sectors?

This question is relevant because it relates to the expected lifespan of the SSD, as well as the expected performance in systems that lack the TRIM directive.

womble
  • 96,255
  • 29
  • 175
  • 230
Paul Sonier
  • 272
  • 4
  • 10
  • Speaking of partitioning and Linux, you might find this article interesting http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/ – Cristian Ciupitu May 29 '09 at 02:04

3 Answers3

2

When you shift the partition in gparted (i.e change the start/end block/cyl locations) the data will be physically moved on the drive.

In general the layout of the SSD is abstracted away from the OS and what the OS is actually doing (moving a partition) is abstracted away from the SSD. All the OS generates is a series of read/write (move) commands and that's all the SSD sees or cares about.

Note that data in the overlapping area between the new and old location is probably kept where it is. The data that preceded it will likely be shunted to first available free space in the new partition by gparted and the filesystem table updated.

Sadly because of the way the partition table is laid out, the data actually has to move. While many SSDs will have their own wear leveling schemes and can actively remap locations within themselves, I doubt the SSD would implement a re-mapping scheme; it's much easier to just move the data.

ParoX
  • 838
  • 6
  • 11
1

I suspect the answer to this is going to depend on the SSD. The OS can't do anything because the block layer doesn't know anything about the media, really, so it's up to the SSD's controller and wear-levelling logic to recognize this kind of thing and optimize it.

pjz
  • 10,595
  • 1
  • 32
  • 40
1

You should check out this PPT presentation that explains how Windows 7 deals with SSD Partitioning

The alignment of NTFS partition to SSD geometry is important for SSD performance in case of Windows XP and Windows XP upgrade to Windows Vista and Windows 7

The first Windows XP partition starts at sector #63; the middle of a SSD page

Misaligned partition can degrade device’s performance down to 50% caused by read-modify-write The example with 4k page size Implementing correct alignment according to the latest ATA and SCSI spec.

While it doesn't say anything about degrading the performance I believe that in order to ensure performance doesn't degrade you'll also need a drive that supports TRIM.

Microsoft implementation of “Trim” feature is supported in Windows 7 NTFS will send down delete notification to the device supporting “trim” File system operations: Format, Delete, Truncate, Compression OS internal processes: e.g., Snapshot, Volume Manager Three optimization opportunities for the device Enhancing device wear leveling by eliminating merge operation for all deleted data blocks Making early garbage collection possible for fast write Keeping device’s unused storage area as much as possible; more room for device wear leveling.

Omar Shahine
  • 3,747
  • 3
  • 26
  • 27