[SOLVED] New SSD

Here you can discuss every aspect of Debian. Note: not for support requests!

Re: New SSD

Postby ticojohn » 2016-12-08 00:32

phenest wrote:
Head_on_a_Stick wrote:EDIT: more opinions can be found in this thread:

viewtopic.php?f=17&t=130615

That thread is quite enlightening.

So, discard is a kernel option that issues a TRIM command immediately, whereas fstrim issues the TRIM command whenever you choose to. However, not all SSD's support the TRIM command which is why there is specific code in the kernel to deal with this. SSD's that do not support the TRIM command are not "buggy", it's just they have garbage collection functionality that means TRIM is not needed. It also means that if your SSD does not support TRIM, then fstrim is also a pointless exercise.


So, you buy SSD with TRIM support. Easy choice.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 678
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: [SOLVED] New SSD

Postby wizard10000 » 2016-12-08 12:37

phenest wrote:
pylkko wrote:Also, I believe some drives/firmware suffered from problems/bugs with discard, which didn't apply to fstrim.

How do you know it doesn't apply to fstrim?


It does apply to fstrim as well. Garbage collection was broken when under heavy load and data corruption happened.

http://forums.crucial.com/t5/Crucial-SS ... d-p/151028

Dangerous for use in kernels:
3.12 (before 3.12.29);
3.13 (before 3.13.7);
3.14 (before 3.14.20);
3.17 (before 3.17.1) - regression in the blacklist, fixed in 3.17.1.

Safe kernels:
anything before 3.12;
3.12.29 and later;
3.13.7 and later;
3.14.20 and later;
3.15 (all);
3.16 (all);
3.17.1 and later.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: New SSD

Postby phenest » 2016-12-08 15:11

ticojohn wrote:
phenest wrote:
Head_on_a_Stick wrote:EDIT: more opinions can be found in this thread:

viewtopic.php?f=17&t=130615

That thread is quite enlightening.

So, discard is a kernel option that issues a TRIM command immediately, whereas fstrim issues the TRIM command whenever you choose to. However, not all SSD's support the TRIM command which is why there is specific code in the kernel to deal with this. SSD's that do not support the TRIM command are not "buggy", it's just they have garbage collection functionality that means TRIM is not needed. It also means that if your SSD does not support TRIM, then fstrim is also a pointless exercise.


So, you buy SSD with TRIM support. Easy choice.

Why?
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Re: [SOLVED] New SSD

Postby phenest » 2016-12-08 15:29

Taken from http://forum.crucial.com/t5/Crucial-SSDs/TRIM-and-SSD-performance-why-is-it-important/ta-p/100276
Recently we’ve received multiple calls about the TRIM feature and how it relates to Crucial SSDs. In a nutshell, TRIM is a feature that helps increase the efficiency of your SSD by preparing data blocks for reuse. Here’s how it works.

TRIM and Data Blocks

On hard drives and SSDs, data is stored in blocks (“data blocks”). Each data block has data from more than one file, and on a hard drive the blocks can be split whenever necessary. When you delete a file in your operating system, for example, the hard drive deletes only that specific file’s information from the data block, leaving the rest in place. When a file is deleted in the computer’s file system, the data stays on the block until the next time that block is needed. At that point the drive swiftly deletes that particular piece of data from that part of the block, and writes the new file there. Essentially, hard drives are able to delete information from part of a data block – they don’t have to delete the whole thing.

In contrast, SSDs have to delete an entire data block before they’re able to reuse it. As such, when an SSD is trying to clear a data block, it puts a copy of everything on the block into a cache (“holding place”) and makes the necessary changes there. The SSD then deletes all of the data on the original block and writes the new data that it was trying to write in the first place.

Understandably, going through all these steps takes a lot longer than it would have taken to simply write data to an empty block. Since the SSD knows this, it simply locates an empty block and writes there. This works great – as long as empty blocks are still available on the drive. When all of the blocks are filled up, the SSD has no choice but to start deleting blocks and reusing them, resulting in a drop in write speeds. This problem, however, can be overcome with TRIM – a feature that prompts the SSD to clear previously used data blocks. With TRIM, the next time an SSD’s filing system wants to write to those blocks, they are already empty and ready for use.

And now the the part specific to Crucial SSD's...
Crucial SSDs and TRIM/Garbage Collection

Since not all operating systems support TRIM, Crucial SSDs have a special feature called Active Garbage Collection. Active Garbage Collection is a process that helps an SSD maintain optimal performance by freeing up memory sectors that are no longer in use. Garbage collection is part of the SSD itself and thus not dependent on your computer’s operating system. Since garbage collection is part of the SSD’s firmware, it works regardless of which operating and filing systems your computer is using.

Note: Garbage collection only works when your Crucial SSD is idle, so make sure to configure your system so it doesn’t go to sleep when it’s idling. Garbage Collection takes time to do its job, but as long as it gets time to idle every now and then, your Crucial SSD will maintain its high level of performance over time.


It's possible other manufacturers do something similar.

In a nutshell, I would say that manufacturers have already responded to performance issues using built-in functionality that requires no OS intervention. In which case, unless you're running a server or have little empty space left for example, TRIM isn't an issue.
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS Sabertooth P67 i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1571
Joined: 2010-03-09 09:38
Location: The Matrix

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable