* blkdiscard vs hdparm for erasing a SSD?
@ 2014-10-15 13:12 Peter Wu
2014-10-15 14:21 ` Tim Small
2014-10-28 2:09 ` Mark Lord
0 siblings, 2 replies; 5+ messages in thread
From: Peter Wu @ 2014-10-15 13:12 UTC (permalink / raw)
To: linux-ide-u79uwXL29TY76Z2rM5mHXA,
util-linux-u79uwXL29TY76Z2rM5mHXA
Hi,
Recent versions of util-linux have a blkdiscard program. How does this compare
to the --security-erase option of hdparm? The goal is to erase the contents of
an previously used SSD to improve performance.
Is the command `blkdiscard -s /dev/sdd` equivalent to the instructions listed on
https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase?
--
Kind regards,
Peter
https://lekensteyn.nl
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: blkdiscard vs hdparm for erasing a SSD?
2014-10-15 13:12 blkdiscard vs hdparm for erasing a SSD? Peter Wu
@ 2014-10-15 14:21 ` Tim Small
[not found] ` <543E82DE.8070405-v0yPK6tSSg/10XsdtD+oqA@public.gmane.org>
2014-10-28 2:09 ` Mark Lord
1 sibling, 1 reply; 5+ messages in thread
From: Tim Small @ 2014-10-15 14:21 UTC (permalink / raw)
To: Peter Wu, linux-ide, util-linux
On 15/10/14 14:12, Peter Wu wrote:
> [ blkdiscard vs hdparm --security-erase] How does this compare. The goal is to erase the contents of an previously used SSD to improve performance.
>
When you use blkdiscard, the SSD (assuming a SATA SSD) will receive an
ATA TRIM command, whereas hdparm --security-erase will issue an ATA
SECURITY ERASE UNIT command.
What the drive then actually does is dependant on the implementation
details of that particular SSD's firmware.
In general, I would expect the performance gain from TRIMing the entire
drive to be either the same-as, or possibly less-than the gain from
SECURITY ERASE. For a sane firmware implementation I'd expect them to
have the same effect on performance. Firmware implementations are not
always sane.
Personally, unless I want to keep some of the data on the drive, I use
hdparm --security-erase, as I feel that this is most likely to reset the
drive to its as-new state (or at least close to it), but the real answer
is that it depends on the drive, so if you really want to know, you'll
have to do some performance tests on your drive(s).
Tim.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: blkdiscard vs hdparm for erasing a SSD?
[not found] ` <543E82DE.8070405-v0yPK6tSSg/10XsdtD+oqA@public.gmane.org>
@ 2014-10-16 10:17 ` Peter Wu
2014-10-21 17:06 ` One Thousand Gnomes
0 siblings, 1 reply; 5+ messages in thread
From: Peter Wu @ 2014-10-16 10:17 UTC (permalink / raw)
To: Tim Small
Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
util-linux-u79uwXL29TY76Z2rM5mHXA
On Wednesday 15 October 2014 15:21:18 Tim Small wrote:
> On 15/10/14 14:12, Peter Wu wrote:
> > [ blkdiscard vs hdparm --security-erase] How does this compare. The goal is
> > to erase the contents of an previously used SSD to improve performance.
> >
>
> When you use blkdiscard, the SSD (assuming a SATA SSD) will receive an
> ATA TRIM command, whereas hdparm --security-erase will issue an ATA
> SECURITY ERASE UNIT command.
>
> What the drive then actually does is dependant on the implementation
> details of that particular SSD's firmware.
>
> In general, I would expect the performance gain from TRIMing the entire
> drive to be either the same-as, or possibly less-than the gain from
> SECURITY ERASE. For a sane firmware implementation I'd expect them to
> have the same effect on performance. Firmware implementations are not
> always sane.
The names suggest that TRIM is for marking sectors for garbage collection while
SECURITY ERASE tries a bit harder. From the runtime performance point of view, I
would expect that S.E. is at least as fast as TRIM as no more garbage needs to
be collected at a later point. From a durability PoV, not so sure, it could be
that S.E. overwrites all blocks (or not).
Anyway, I have not read into the details and unless the standards (and
manufacturers) can guarantee certain behavior, it will likely vary between
device models.
Thank you for your reply!
--
Kind regards,
Peter
https://lekensteyn.nl
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: blkdiscard vs hdparm for erasing a SSD?
2014-10-16 10:17 ` Peter Wu
@ 2014-10-21 17:06 ` One Thousand Gnomes
0 siblings, 0 replies; 5+ messages in thread
From: One Thousand Gnomes @ 2014-10-21 17:06 UTC (permalink / raw)
To: Peter Wu
Cc: Tim Small, linux-ide-u79uwXL29TY76Z2rM5mHXA,
util-linux-u79uwXL29TY76Z2rM5mHXA
> The names suggest that TRIM is for marking sectors for garbage collection while
> SECURITY ERASE tries a bit harder. From the runtime performance point of view, I
> would expect that S.E. is at least as fast as TRIM as no more garbage needs to
> be collected at a later point. From a durability PoV, not so sure, it could be
> that S.E. overwrites all blocks (or not).
>
> Anyway, I have not read into the details and unless the standards (and
> manufacturers) can guarantee certain behavior, it will likely vary between
> device models.
On a decent SSD security erase is almost immediate and does not need to
overwrite anything.
Alan
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: blkdiscard vs hdparm for erasing a SSD?
2014-10-15 13:12 blkdiscard vs hdparm for erasing a SSD? Peter Wu
2014-10-15 14:21 ` Tim Small
@ 2014-10-28 2:09 ` Mark Lord
1 sibling, 0 replies; 5+ messages in thread
From: Mark Lord @ 2014-10-28 2:09 UTC (permalink / raw)
To: Peter Wu, linux-ide, util-linux
On 14-10-15 09:12 AM, Peter Wu wrote:
> Hi,
>
> Recent versions of util-linux have a blkdiscard program. How does this compare
> to the --security-erase option of hdparm? The goal is to erase the contents of
> an previously used SSD to improve performance.
>
> Is the command `blkdiscard -s /dev/sdd` equivalent to the instructions listed on
> https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase?
--security-erase is the nearest thing to a "low level format" that exists.
On some mechanical drives, it actually performs a true low level format.
For SSDs, most manufacturers that I have dealt with use --security-erase
as their preferred method for reinitializing a corrupted drive.
--security-erase is normally much faster than TRIM as well.
Cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-28 2:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-15 13:12 blkdiscard vs hdparm for erasing a SSD? Peter Wu
2014-10-15 14:21 ` Tim Small
[not found] ` <543E82DE.8070405-v0yPK6tSSg/10XsdtD+oqA@public.gmane.org>
2014-10-16 10:17 ` Peter Wu
2014-10-21 17:06 ` One Thousand Gnomes
2014-10-28 2:09 ` Mark Lord
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).