Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > News > Mac News > Exclusive Testing: Apple's Trim implementation and Samsung SSDs

Exclusive Testing: Apple's Trim implementation and Samsung SSDs
Thread Tools
NewsPoster
MacNN Staff
Join Date: Jul 2012
Status: Offline
Reply With Quote
Jul 12, 2015, 12:30 PM
 
Continuing the refresh of MacNN, we've launched some testing initiatives. The first, a rundown of iTunes Match/Music problems with stored libraries is still underway, and we're hoping for more information later this week. The second: a close look at Apple's Trim activation for third-party SSDs, which was introduced in the launch of 10.10.4 -- and we've got some initial results to report.

History

Solid state drives (SSDs) are very fast, relying on flash cells to store data rather than spinning platters like conventional hard drives. The drive speed is generated by both the speed of the media as a whole, as well as parallelism, where the data is broken up across the range of flash cells, in a sort of de facto striped RAID.

In general, pieces of a file won't occupy an entire block of space on the drive, only part of it. So, when a file is deleted, the OS "forgets" where the file is -- but the data is still physically present, and generally scattered all over the SSD.

Regardless of how much data has to be written to a block, a SSD has to process the entire block when it is writing. A write to a completely empty block is faster, as the drive doesn't have to copy the partially-full block to cache, and make the changes in cache before it completely overwrites the cell. If the block was empty in the first place, then the write is faster, since the cache isn't involved. While a drive is idle, the Trim feature -- if needed -- cleans up partially-full cells, allowing for fastest writes without having to swap to the drive's cache.

As we mentioned earlier this month following the OS X 10.10.4 update, Apple has implemented a way to enable Trim for third-party SSDs, without resorting to a potentially-unsafe third party hack. However, prior to executing the terminal command to turn the feature on, Apple issues a stern warning, making it perfectly clear that the risk of data loss falls squarely in the hands of the user.

Reports have circulated about various Linux deployments having issues with Trim data collection, with drives corrupting data under the open-source OS. Given the reports from the Linux side, and Apple's warning, we thought we'd test the issue on OS X.

There are two types of Trim -- queued, and sequential. We're testing sequential Trim, as implemented by the drive's firmware.

Testing Gear

We've got four SSDs from Samsung for this round of testing: either old retail stock, or original firmware and in-use for some time. On the testing block are the 840 EVO and Pro, and the 850 EVO and Pro drives, all 2.5-inch size, and 512GB capacity. All of the drives are pre-loaded with 200GB of data, which isn't modified in any way by the testing process.

The testing hardware is a 2012 i7 Mac mini running OS X 10.10.4. Connected to the Mac mini to support the drives are a RocketStor 5212 Thunderbolt SATA dock, and a dual-channel USB 3.0 RocketStor 5122B dock. All of the power supplies for the hardware are connected to an uninterruptible power supply, to prevent power outages or brownouts from effecting the testing process or inducing any SSD failure.

Protocol

Transferred files vary in size from 64KB through 6.3GB, adding up to 350GB per transfer. The drive copies were set up "round robin," progressing through drives one through four, one copy at a time. When a copy option off the drive was completed, the data was deleted through a normal Finder move to trash and empty trash routine.

Drives sat completely idle between transfer rounds other than OS indexing, giving each drive as much time idle as both reading and writing, and more than enough time for Trim collection to begin between operations. At this time, each drive has seen over 300TB of data copied to and from the drive.

Initial Conclusions

So far, so good. We are seeing some cell failures, but since we're slamming the drives with well more data than a SSD will see in regular OS drive use, that's to be expected. What we're not seeing is any Trim-related data corruption.

The future of this test

We've already started phase two -- all of the drives have been updated to the most recent version of the firmware, some of which rectified a different slow data access and writing issue. The "round robin" data moves is now underway, and will be complete in about 11 days. We're not expecting any problems, other than more cell failures. As we explained above, this is normal, expected, and compensated for by the drive firmware.

We're aware that the test isn't perfect. It is an accelerated process, where we're artificially loading and unloading the SSDs to implement the idle Trim feature faster than normal use. Our use pattern on the drives is far heavier than normal OS drive usage, and less sporadic -- a SSD with an installed OS is "tickled" a lot, for virtual memory, OS file access, app loading, and the like. What we're doing is more akin to constant use of the drive for a Photoshop scratch disk.

What this test is not is a comprehensive test of Trim's reliability under OS X and with all SSDs ever manufactured. Results specifically apply only to the Samsung 840 and 850 Pro and EVO series. This test could have been performed under Windows as well, as the real issue here is the drive's firmware routines, and less about any "implementation" by Apple, as all Apple did was provide a tool to enable the feature in firmware.

MacNN will report back when the second phase of the testing is complete. We are watching for more reports of drive issues with Trim, and will consider adding drives from other manufacturers to the test rig -- if you've got a drive in mind, either leave a comment here or let us know in an email..
( Last edited by NewsPoster; Jul 12, 2015 at 02:20 PM. )
     
tvalleau
Fresh-Faced Recruit
Join Date: Feb 2005
Status: Offline
Reply With Quote
Jul 12, 2015, 01:54 PM
 
"While a drive is idle, the Trim feature cleans up partially full cells, and completely erases cells that don't have addressable data. This clears an entire cell, allowing for fastest writes without having to swap to the drive's cache."

Sorta. TRIM doesn't delete or clear anything. TRIM is part of the OS, and the OS doesn't understand anything at all about how an SSD controls or stores files or SSD cells. What TRIM -does- do is mark those previously used cells as stale as soon as a file is deleted. That, in turn, means that the SSD's garbage collection (which does the actual work) can work on it right away (during idle) instead of waiting until the OS tries to write to that space, and doing all the moving about while a write is pending. TRIM makes the SSD's garbage collection more efficient.
     
Mike Wuerthele
Managing Editor
Join Date: Jul 2012
Status: Offline
Reply With Quote
Jul 12, 2015, 02:00 PM
 
I see what you're saying, and some sacrifices in the explanation were made for comprehension, as we're not Anandtech. Cleaned up a bit.

The point, and testing, remains the same.
     
panjandrum
Dedicated MacNNer
Join Date: Dec 2004
Location: West Michigan
Status: Offline
Reply With Quote
Jul 12, 2015, 05:26 PM
 
I've had pretty good luck with the OWC SSDs that don't require TRIM support enabled. If you're looking for large amounts of budget SSD storage space they may not be the way to go. But if you are looking for a good fast boot drive then if you are willing to spend just a few bucks more you can avoid the entire TRIM issue altogether. (I install a lot of these in older school laptops and iMacs; only 1 failure so far out of 50+ drives, and that one had a manufacturing defect of some sort, as it failed within a few days of installation).
     
Mike Wuerthele
Managing Editor
Join Date: Jul 2012
Status: Offline
Reply With Quote
Jul 12, 2015, 07:03 PM
 
Yeah, SSDs have infant failures, then soldier on until cell death is a real problem, generally. We like the OWC SSDs too, but the 840 and 850 series are very inexpensive, and on the PC side of the fence are generally considered best in class.

To be perfectly clear about Trim, Apple SSDs have it by default, and some drives just don't need it.
     
I-ku-u
Junior Member
Join Date: Aug 2011
Location: Cambridge, MA
Status: Offline
Reply With Quote
Jul 12, 2015, 07:46 PM
 
I've seen numerous mentions regarding TRIM support that not all external enclosures forward TRIM commands to the drives. Are you sure your enclosures are forwarding TRIM commands to the drives?
     
Mike Wuerthele
Managing Editor
Join Date: Jul 2012
Status: Offline
Reply With Quote
Jul 12, 2015, 10:44 PM
 
Originally Posted by I-ku-u View Post
I've seen numerous mentions regarding TRIM support that not all external enclosures forward TRIM commands to the drives. Are you sure your enclosures are forwarding TRIM commands to the drives?
Yes, upon inspection, as well as consultation with Highpoint and the bridge board manufacturer.

Not all external enclosures do, but most do.
     
PJL500
Junior Member
Join Date: Jun 2011
Status: Offline
Reply With Quote
Jul 15, 2015, 01:04 PM
 
For several years I've had a Crucial M4-CT128M4SSD2 128 GB Model: M4-CT128M4SSD2 Rev: 309 SSD coupled with a Seagate Momentus ST750LX003-1AC154 Rev: SM12 (hybrid) in a Late 08 MBP in a fusion drive setup. It makes this old machine very responsive - especially since 10.10.4 with TRIM activated. But might it be unsafe with TRIM?
     
Mike Wuerthele
Managing Editor
Join Date: Jul 2012
Status: Offline
Reply With Quote
Jul 15, 2015, 01:24 PM
 
Dunno. I'll see if I can get a hold of that model drive. Given the age of the drive, I'd say to stay away for now.
     
ablatt
Fresh-Faced Recruit
Join Date: Jul 2015
Status: Offline
Reply With Quote
Jul 16, 2015, 12:46 AM
 
From what I can gather from scanning posts on the Internet, Trim is not supported on USB 3.0 in OS X without the use of a driver.
     
Mike Wuerthele
Managing Editor
Join Date: Jul 2012
Status: Offline
Reply With Quote
Jul 16, 2015, 06:42 AM
 
This is less a case of lack of Trim USB 3.0, and more a case of bridge boards, and manufacturer firmware preventing it. Yeah, this can be bypassed with some trickery, but proper selection of hardware makes this a non-issue.

Due diligence was performed -- that's why we're using the higher-end Highpoint docks instead of more generic hardware.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 10:58 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,