Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Klyith
Aug 3, 2007

GBS Pledge Week

Atomizer posted:

Nope, TRIM won't cause any more wear on an SSD, it merely lets the OS inform the SSD of deleted blocks so the latter can free them up upfront rather than doing so later, at a performance penalty. I'd say "TRIM daily" but you probably don't even need to bother doing it that much (unless you're actually doing a lot of write/rewrite/delete operations on the system drive.)

AFAIK sending TRIM will in practice cause the drive to do writes, because the drive interprets the command as the OS saying "hey, we got some idle time so here's all the deleted data" and does garbage collection in response. Garbage collection takes time and will hurt performance for other jobs, and the TRIM command itself used to be non-queued and interfered normal read/write during use. So accepted practice is that the OS treats TRIM like a defrag and only does it during idle times. And SSDs react accordingly.

OTOH I have no idea what's going on inside the drive firmware, it could be that if you sent a TRIM every 5 minutes the drive would not run a garbage collection each time because it knows that is dumb and pointless.

On the third hand, if you did send TRIMs every 5 minutes most of them would have no changes and the drive wouldn't do writes even during garbage collection, because there are no stale blocks to collect. You'd just be wasting OS, CPU, and SSD controller time with no longevity implications.


Fourth tentacle, drive writes don't matter because any normal person isn't going to run through the write endurance of even a QLC drive before the heat death of the universe. Large, fast drives with plenty of capacity make garbage collection faster & easier than it used to be, even if you didn't use TRIM. tl;dr leave it at default unless you're doing something unusual with your SSD.

Adbot
ADBOT LOVES YOU

Atomizer
Jun 24, 2007



Klyith posted:

AFAIK sending TRIM will in practice cause the drive to do writes, because the drive interprets the command as the OS saying "hey, we got some idle time so here's all the deleted data" and does garbage collection in response. Garbage collection takes time and will hurt performance for other jobs, and the TRIM command itself used to be non-queued and interfered normal read/write during use. So accepted practice is that the OS treats TRIM like a defrag and only does it during idle times. And SSDs react accordingly.

OTOH I have no idea what's going on inside the drive firmware, it could be that if you sent a TRIM every 5 minutes the drive would not run a garbage collection each time because it knows that is dumb and pointless.

On the third hand, if you did send TRIMs every 5 minutes most of them would have no changes and the drive wouldn't do writes even during garbage collection, because there are no stale blocks to collect. You'd just be wasting OS, CPU, and SSD controller time with no longevity implications.


Fourth tentacle, drive writes don't matter because any normal person isn't going to run through the write endurance of even a QLC drive before the heat death of the universe. Large, fast drives with plenty of capacity make garbage collection faster & easier than it used to be, even if you didn't use TRIM. tl;dr leave it at default unless you're doing something unusual with your SSD.

TRIM isn't causing any new writes, though, it's going to result in resetting/zeroing those pages that can now be re-used. That's not a "write" in the sense that it's not new data and has to be done anyway for you to re-use that page; TRIM just does it on-demand rather than later on when there are new data to write that could potentially result in a performance deficit (as the page has to be zeroed first, but an imminent write has to wait for that to happen first.)

In practice, though, we've all basically arrived at the actual conclusion: TRIM isn't bad at all (which is the answer to the original question) and you shouldn't have to worry about doing it manually, or the performance hit from it (or not doing it.)

WhyteRyce
Dec 30, 2001

Media management most certainly results in writes to the drives though, unless everything is you deleted happens to fall nicely within the entire block. You're going to want to move some of those random still valid pages somewhere else so you can free up that entire block. Trim is just about trying to pay the price when it hurts less

Although I'm probably confusing this talk with fragmentation. Ugh NAND management stuff still throws me when I don't play with it for awhile. The stuff we deal with because NAND is cheap

Basically don't worry about this stuff at all the drive probably knows better than you. Unless you have to deal with Open Channel or ZNS then you are probably used to yelling at drive vendors and telling them you want to do things yourself

WhyteRyce fucked around with this message at 08:36 on Aug 16, 2020

Zedsdeadbaby
Jun 14, 2008

You have been called out, in the ways of old.
I'm currently using a Z170 pro gaming motherboard with a Samsung Evo 850 SSD. The board says it supports m.2 nvme as well, so can I just insert a 970 Evo stick in there to add more drive space to my current Windows installation? I just want to increase my storage amount, not reinstall/reformat or anything.

DrDork
Dec 29, 2003
commanding officer of the Army of Dorkness

Zedsdeadbaby posted:

I'm currently using a Z170 pro gaming motherboard with a Samsung Evo 850 SSD. The board says it supports m.2 nvme as well, so can I just insert a 970 Evo stick in there to add more drive space to my current Windows installation? I just want to increase my storage amount, not reinstall/reformat or anything.

Yes--though for clarification, the 850 EVO will run in SATA mode, not PCIe/NVMe mode, because the 850 Evo is a SATA drive at it's core, even though it's using the m.2 physical format.

The catch with that is, on a lot of motherboards like yours, it will disable the normal SATA 1 port, so if you have anything plugged in there now you'd have to move the cable to a different port. Otherwise it should work fine.

Klyith
Aug 3, 2007

GBS Pledge Week

Zedsdeadbaby posted:

I'm currently using a Z170 pro gaming motherboard with a Samsung Evo 850 SSD. The board says it supports m.2 nvme as well, so can I just insert a 970 Evo stick in there to add more drive space to my current Windows installation? I just want to increase my storage amount, not reinstall/reformat or anything.

Yes, though 970 Evos are hella overpriced and you can get just-as-good NVMe drives for much less. The WD SN750, Inland Premium, Adata SX8200 Pro, or HP EX950 are all good drives with similar speed.

Atomizer posted:

TRIM isn't causing any new writes, though, it's going to result in resetting/zeroing those pages that can now be re-used. That's not a "write" in the sense that it's not new data and has to be done anyway for you to re-use that page; TRIM just does it on-demand rather than later on when there are new data to write that could potentially result in a performance deficit (as the page has to be zeroed first, but an imminent write has to wait for that to happen first.)

The process of garbage collection totally involves writes: any page that has both good data and deleted data the good data gets moved to a new location. It's the partially-in-use pages problem that TRIM was made to fix, because having a lot of partial pages on the drive is what causes bad write amplification. That's when you get cascades of writes from having to move data in order to move data.


Lets say we copy a 1GB file to a SSD that has plenty of free space in a system without TRIM. The OS is likely going to write it in large blocks of contiguous CHS areas. On the drive level it will occupy a lot of full pages. Delete the file and write a new 1GB file, and it will go into the same LBA areas (for anyone else reading, it won't go into the same flash pages because the drive spreads wear). Even without TRIM, this will inform the SSD that that all those pages are dead and can be re-used. Any that were fully occupied by the now-deleted data get used in the future with no impact.

Contrast the maximum opposite: a ~1GB page file in a PC that has to page stuff in and out of memory. The OS will write smaller non-contiguous sections all the time, it may abandon some LBA sections as the page file grows and shrinks, there's lots stale data that the OS considers deleted but the drive doesn't know that. That's the type of thing that produces tons of partial pages that need to be trimmed. (And why in the early days of SSDs before we knoew that write endurance specs were pretty conservative, some people said to keep the page file on spinning rust.)


quote:

In practice, though, we've all basically arrived at the actual conclusion: TRIM isn't bad at all (which is the answer to the original question) and you shouldn't have to worry about doing it manually, or the performance hit from it (or not doing it.)

True dat!

mmkay
Oct 21, 2010

To throw some more info into the mix - the drive generally wants to do the garbage collection as late as possible (though not too late) - it reduces the amount of data it needs to relocate. Though it probably matters more for data center SSDs.

Also I think this is the first time I saw someone else mention Open Channel - these are pretty cool, you get to learn all the geometry and media management bullshit a NAND drive has to keep up with and it's very enlightening.

WhyteRyce
Dec 30, 2001

Zoned Namespace apparently is the sane compromise. Basically, you deal with your NAND poo poo so I don't have to and I promise I will only do predictable sequential patterns and more tracking on my end and we both enjoy reduced WAP and decreased latency spikes and surprise events I have no control or visibility of. Also you can sell more QLC and I will actually buy it

WhyteRyce fucked around with this message at 07:13 on Aug 17, 2020

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
I have a couple of ancient SATA SSDs that I need to get rid of. I’m unable to connect them up into a computer and write random data onto them and I know that at least 1 of them is unencrypted and was in an old PC.

What can/should I physically do to these SSDs before tossing them into the electronics waste bin? I’m not looking to protect myself from a state level actor but from Joe the electronic waste sorter who might decide to pull my SSD out from the conveyer belt and take it home.

Fame Douglas
Nov 20, 2013

by Fluffdaddy
Writing random data isn't the best way to securely erase an SSD; sending an ATA secure erase command is and takes mere seconds.

Pikehead
Dec 3, 2006

Looking for WMDs, PM if you have A+ grade stuff
Fun Shoe

Boris Galerkin posted:

I have a couple of ancient SATA SSDs that I need to get rid of. I’m unable to connect them up into a computer and write random data onto them and I know that at least 1 of them is unencrypted and was in an old PC.

What can/should I physically do to these SSDs before tossing them into the electronics waste bin? I’m not looking to protect myself from a state level actor but from Joe the electronic waste sorter who might decide to pull my SSD out from the conveyer belt and take it home.

Use a hammer and put a nail through it. Or, well, break it up with the hammer.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Boris Galerkin posted:

I have a couple of ancient SATA SSDs that I need to get rid of. I’m unable to connect them up into a computer and write random data onto them and I know that at least 1 of them is unencrypted and was in an old PC.

What can/should I physically do to these SSDs before tossing them into the electronics waste bin? I’m not looking to protect myself from a state level actor but from Joe the electronic waste sorter who might decide to pull my SSD out from the conveyer belt and take it home.

Get something like this or one of its cheaper USB 3.0 brethren so you can connect the SSDs to any computer that has a USB port. You should be able to perform an ATA Secure Erase through any sufficiently modern USB-SATA adapter. I know how to do it in Linux, not exactly sure what you'd need to get it done on Windows.

As Fame Douglas says, writing random data isn't the preferred way, although I'm sure that if you write enough multiples of the raw capacity of the drive (say, 10x or more), it's a reasonably good bet that everything gets erased and rewritten at least once.

To physically destroy data, disassemble the drive, remove the PCB, and use a drill to put a hole through each flash IC. Or make sure they're all crushed by hammering at them.

But seriously just get one of those adapters, they're cheap and very handy to have lying around. If you think you'll ever need to use it for a 3.5" SATA HDD, look around for the slightly more expensive versions which include a little PSU. (USB ports generally can't provide enough power to run a 3.5"). Or get a USB drive dock, same electronics packaged in a bigger housing.

Geemer
Nov 4, 2010



"BobHow posted:


To physically destroy data, disassemble the drive, remove the PCB, and use a drill to put a hole through each flash IC. Or make sure they're all crushed by hammering at them.

He said he's not worried about state level. Just bending it in half or drilling a couple holes through it will be enough to keep randos from accessing it.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I have like 10 cardboard boxes of HD's I want to throw away to free up room at work, they've all been degaussed, but we need to get them 'shredded'.

:rolleyes:

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!

BobHoward posted:

Get something like this or one of its cheaper USB 3.0 brethren so you can connect the SSDs to any computer that has a USB port. You should be able to perform an ATA Secure Erase through any sufficiently modern USB-SATA adapter. I know how to do it in Linux, not exactly sure what you'd need to get it done on Windows.

As Fame Douglas says, writing random data isn't the preferred way, although I'm sure that if you write enough multiples of the raw capacity of the drive (say, 10x or more), it's a reasonably good bet that everything gets erased and rewritten at least once.

To physically destroy data, disassemble the drive, remove the PCB, and use a drill to put a hole through each flash IC. Or make sure they're all crushed by hammering at them.

But seriously just get one of those adapters, they're cheap and very handy to have lying around. If you think you'll ever need to use it for a 3.5" SATA HDD, look around for the slightly more expensive versions which include a little PSU. (USB ports generally can't provide enough power to run a 3.5"). Or get a USB drive dock, same electronics packaged in a bigger housing.

:lol: SATA to USB to USB-C. The future is here. So is this basically a portable hard drive enclosure without the “enclosure” part? I might be able to borrow one real quick just to get this done.

My bad on the “writing random data” part, didn’t know that doing the secure erase was something different.

E: Smashing the thing with a hammer does sound more fun though.

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

If you're only concerned about casual drive salvage just gently caress up the SATA ports.

Binary Badger
Oct 11, 2005

Trolling Link for a decade


Bob Morales posted:

I have like 10 cardboard boxes of HD's I want to throw away to free up room at work, they've all been degaussed, but we need to get them 'shredded'.

:rolleyes:

https://www.whitakerbrothers.com/datastroyer-acd-hs-automatic-hard-drive-crusher

Only 5 grand! Any good IT dept. worth its salt expenses one of these for security anyways..

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.
Can’t you just use a press and do basically the same thing. Our soldering room has a pretty beefy press for some reason it could smoosh drives good I bet.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

priznat posted:

Can’t you just use a press and do basically the same thing. Our soldering room has a pretty beefy press for some reason it could smoosh drives good I bet.

We have a press but it would take forever to destroy that many.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:
You still get paid while you smash drives right

DrDork
Dec 29, 2003
commanding officer of the Army of Dorkness

taqueso posted:

You still get paid while you smash drives right

Sometimes destruction is its own reward.

Thanks Ants
May 21, 2004

#essereFerrari


Bob Morales posted:

We have a press but it would take forever to destroy that many.

Just have a nice few afternoons when you put music on and crush some drives

Seamonster
Apr 30, 2007

IMMER SIEGREICH
$5200?? Buy a .50 rifle with API rounds and post the results in TFR.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Boris Galerkin posted:

:lol: SATA to USB to USB-C. The future is here. So is this basically a portable hard drive enclosure without the “enclosure” part? I might be able to borrow one real quick just to get this done.

My bad on the “writing random data” part, didn’t know that doing the secure erase was something different.

E: Smashing the thing with a hammer does sound more fun though.

Yeah, they're a USB 2.5" disk enclosure without the enclosure part.

Writing random data isn't always fully effective because SSDs have to do some super complicated poo poo behind the scenes to present the illusion of being a normal hard drive. The relevant consequences are:

A. the SSD has significant amounts (think gigabytes) of extra, "overprovisioned" storage, above and beyond its advertised capacity
B. the SSD uses this extra capacity to help with wear leveling
C. old data can hang around in some of that extra physical storage long after you think you've erased it

Secure Erase is supposed to guarantee that all the storage gets wiped, even the extra stuff which the OS has no direct access to. The two best ways SSD designers can implement it are:

1. Issue erase commands for every physical block.
2. If the drive encrypts data all the time (a lot of them do), just destroy the key and now the drive's contents will be scrambled.

#2 is popular because it's faster and doesn't wear the media out at all, but is riskier than #1 because maybe the encryption algorithm gets broken someday, or the designer implements encryption poorly and manages to have a security flaw.

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.
I saw this on, er, LinkedIn and it made me chuckle

WhyteRyce
Dec 30, 2001

Always enjoy watching someone think they are slick by putting multiple commands on a single line and then forgetting to put a ; after the rm command

Also use the sanitize command will do it if your NVMe drive supports it

WhyteRyce fucked around with this message at 21:00 on Aug 19, 2020

BIG HEADLINE
Jun 13, 2006

"Stand back, Ottawan ruffian, or face my lumens!"
SKHynix has been busy - if you're in the market for a 500GB or 1TB NVMe drive, might want to give this a look: https://www.storagereview.com/review/sk-hynix-gold-p31-ssd-review

And SSD Review, for good measure: https://www.thessdreview.com/our-reviews/nvme/sk-hynix-gold-p31-1tb-nvme-ssd-review-worlds-1st-128-layer-ssd-performs-at-an-amazing-price/

BIG HEADLINE fucked around with this message at 03:47 on Aug 22, 2020

Zedsdeadbaby
Jun 14, 2008

You have been called out, in the ways of old.
Wow, that's a crazy price point for that performance.

Palladium
May 8, 2012

Very Good
✔️✔️✔️✔️
Ugh green PCBs for consumer should be illegal

Zedsdeadbaby
Jun 14, 2008

You have been called out, in the ways of old.
It's vintage :colbert:

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Tell me something about QLC drives in regards to reliability and total drive writes. My current SSDs are getting fuller and eventually I'm in need for more storage space. I was looking into something like a 4TB QLC drive to store crap like video files and other large stuff that wouldn't hurt that much to lose.

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

Combat Pretzel posted:

Tell me something about QLC drives in regards to reliability and total drive writes. My current SSDs are getting fuller and eventually I'm in need for more storage space. I was looking into something like a 4TB QLC drive to store crap like video files and other large stuff that wouldn't hurt that much to lose.

They're warranted for <1 drive write per day.

For storage they should be fine, it's not like you're going to fill it up and then overwrite all those files on a regular basis.

Klyith
Aug 3, 2007

GBS Pledge Week

Combat Pretzel posted:

Tell me something about QLC drives in regards to reliability and total drive writes. My current SSDs are getting fuller and eventually I'm in need for more storage space. I was looking into something like a 4TB QLC drive to store crap like video files and other large stuff that wouldn't hurt that much to lose.

Even QLC drives have more write endurance than a normal person will ever use. QLC is just "you could use this for decades" rather than until the end of time.

The most common 2TB QLC drives have 400 TB of endurance at the 2 TB drive size. The oldest SSD in my current system, a 500gb samsung 850 with 2 years of power on time and which was my main system drive when I got it, is sitting at 7 TB written.

QLC downsides are 100% about write speed, and how the SLC cache that they utterly depend on to have usable write speed shrinks as the drive fills up in ways that somewhat erase the $/GB advantage. As a storage drive that is not a problem.

redeyes
Sep 14, 2002

by Fluffdaddy
Nevermind write endurance. NAND chips failing are the thing taking out SSDs.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

The joke is QLC drives are too slow (after the cache is filled) to write enough data to wear out

katka
Apr 18, 2008

:roboluv::h: :awesomelon: :h::roboluv:
So I need some more storage in my current rig. I'm wanting to a 2tb m2 drive to put in there cause I'm to lazy to bother installing a 2.5 inch drive. Any recommendations?

I was looking at this Intel drive. Is this one any good or is there something just as good that's cheaper. This drive is going to used pretty much only for games so no critical data I'm going to be super upset if I lose.

Klyith
Aug 3, 2007

GBS Pledge Week

katka posted:

So I need some more storage in my current rig. I'm wanting to a 2tb m2 drive to put in there cause I'm to lazy to bother installing a 2.5 inch drive. Any recommendations?

I was looking at this Intel drive. Is this one any good or is there something just as good that's cheaper. This drive is going to used pretty much only for games so no critical data I'm going to be super upset if I lose.

Yeah, the 660P is a QLC drive that's totally fine.

Though looking at that amazon page I see that there's now an Inland Professional QLC drive. Inland is microcenter's house brand, and their TLC NVMe drives are great bang for the buck. I wanna look around to make sure that QLC isn't using some awful controller (like adata's cheapest drives using realtek :barf:), but if not that would be a good & cheap storage drive.


edit: Seems to be a phision, though paired with some pretty slow toshiba flash. This drive is one to consider at 2TB only. But if anyone wants a big ol' drive to dump their steam library, 2TB on NVMe for only $190 is quite a deal. As long as the job is read-focused (games) it equals the 660P.

Klyith fucked around with this message at 19:31 on Aug 23, 2020

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!

Klyith posted:

The oldest SSD in my current system, a 500gb samsung 850 with 2 years of power on time and which was my main system drive when I got it, is sitting at 7 TB written.
Err, what?

I have an 1.5 year old 1TB Samsung 970 Evo, and it has like 25TB.

My 4 year old 850 Evo, which mostly just worked as data storage since ever the 970 is my main drive, has like 35TB. Altho I'm fairly certain that stupid rear end SQLite bug in Spotify a long while ago is responsible for 2-3TB of it.

Both of them have been running nearly 24/7.

(I also have an older 840 Pro, but Magician says it's not supposed (anymore), so not sure how much that one racked up. It's just standing by with a spare Linux install.)

Klyith posted:

QLC downsides are 100% about write speed, and how the SLC cache that they utterly depend on to have usable write speed shrinks as the drive fills up in ways that somewhat erase the $/GB advantage. As a storage drive that is not a problem.
Yeah, write speeds aren't that important as standby storage. It'll work out I guess.

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

Combat Pretzel posted:

Err, what?

I have an 1.5 year old 1TB Samsung 970 Evo, and it has like 25TB.

My 4 year old 850 Evo, which mostly just worked as data storage since ever the 970 is my main drive, has like 35TB. Altho I'm fairly certain that stupid rear end SQLite bug in Spotify a long while ago is responsible for 2-3TB of it.

Both of them have been running nearly 24/7.

(I also have an older 840 Pro, but Magician says it's not supposed (anymore), so not sure how much that one racked up. It's just standing by with a spare Linux install.)

Yeah, write speeds aren't that important as standby storage. It'll work out I guess.

That seems excessive. Still, 25 TB over 1.5 years is still only 0.04 dwpd, so it's far far below the threshold of concern.

Adbot
ADBOT LOVES YOU

Potato Salad
Oct 23, 2014

nobody cares


35 TBW is under 10% of 400 TBW

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply