SSD wear for overwriting the same bytes
If writing to an ssd wears out its cells but reading does not, does an ssd read cells to avoid unnecessary writes?
For example, suppose I already zero'd an SSD, would the SSD write anything at all if I were to try and re-zero it?
I think this may be covered by the general technique of SSD "data buffering & caching", but I've not read explicit details...
Is this dependent on the exact scenario, for example:
- The amount being written vs. the size of the SSD cache?
- The speed of the write being pushed vs. the speed SSD's reads (to check) and writes (as necessary)?
- The SSD controller?
- The SSD brand?
ssd physical-wear
add a comment |
If writing to an ssd wears out its cells but reading does not, does an ssd read cells to avoid unnecessary writes?
For example, suppose I already zero'd an SSD, would the SSD write anything at all if I were to try and re-zero it?
I think this may be covered by the general technique of SSD "data buffering & caching", but I've not read explicit details...
Is this dependent on the exact scenario, for example:
- The amount being written vs. the size of the SSD cache?
- The speed of the write being pushed vs. the speed SSD's reads (to check) and writes (as necessary)?
- The SSD controller?
- The SSD brand?
ssd physical-wear
The only way you'll know from any specific hardware is to read the SMART information after writing to determine if it recorded it as writes. That said, using this data I've been able to determine that my own SSDs are going to far outlive any conventional drives I've ever had.
– shawn
Feb 7 at 8:16
The actual likelihood that the sector data is 100% identical in practice is typically very low, so the overhead of performing such a read and compare is pure wasted time. Adding (unnecessary) overhead to a write operation is detrimental to performance. A manufacturer would probably choose to maintain performance (i.e. not add dubious overhead to every write operation) than possibly extend device life by occasionally not perform an erase/write cycle.
– sawdust
Feb 7 at 10:04
Somewhat related to your example: How to fill a device with zeros, without overwriting the bytes that are already zeros?
– Kamil Maciorowski
Feb 7 at 10:36
add a comment |
If writing to an ssd wears out its cells but reading does not, does an ssd read cells to avoid unnecessary writes?
For example, suppose I already zero'd an SSD, would the SSD write anything at all if I were to try and re-zero it?
I think this may be covered by the general technique of SSD "data buffering & caching", but I've not read explicit details...
Is this dependent on the exact scenario, for example:
- The amount being written vs. the size of the SSD cache?
- The speed of the write being pushed vs. the speed SSD's reads (to check) and writes (as necessary)?
- The SSD controller?
- The SSD brand?
ssd physical-wear
If writing to an ssd wears out its cells but reading does not, does an ssd read cells to avoid unnecessary writes?
For example, suppose I already zero'd an SSD, would the SSD write anything at all if I were to try and re-zero it?
I think this may be covered by the general technique of SSD "data buffering & caching", but I've not read explicit details...
Is this dependent on the exact scenario, for example:
- The amount being written vs. the size of the SSD cache?
- The speed of the write being pushed vs. the speed SSD's reads (to check) and writes (as necessary)?
- The SSD controller?
- The SSD brand?
ssd physical-wear
ssd physical-wear
asked Feb 7 at 2:49
dumb0dumb0
83
83
The only way you'll know from any specific hardware is to read the SMART information after writing to determine if it recorded it as writes. That said, using this data I've been able to determine that my own SSDs are going to far outlive any conventional drives I've ever had.
– shawn
Feb 7 at 8:16
The actual likelihood that the sector data is 100% identical in practice is typically very low, so the overhead of performing such a read and compare is pure wasted time. Adding (unnecessary) overhead to a write operation is detrimental to performance. A manufacturer would probably choose to maintain performance (i.e. not add dubious overhead to every write operation) than possibly extend device life by occasionally not perform an erase/write cycle.
– sawdust
Feb 7 at 10:04
Somewhat related to your example: How to fill a device with zeros, without overwriting the bytes that are already zeros?
– Kamil Maciorowski
Feb 7 at 10:36
add a comment |
The only way you'll know from any specific hardware is to read the SMART information after writing to determine if it recorded it as writes. That said, using this data I've been able to determine that my own SSDs are going to far outlive any conventional drives I've ever had.
– shawn
Feb 7 at 8:16
The actual likelihood that the sector data is 100% identical in practice is typically very low, so the overhead of performing such a read and compare is pure wasted time. Adding (unnecessary) overhead to a write operation is detrimental to performance. A manufacturer would probably choose to maintain performance (i.e. not add dubious overhead to every write operation) than possibly extend device life by occasionally not perform an erase/write cycle.
– sawdust
Feb 7 at 10:04
Somewhat related to your example: How to fill a device with zeros, without overwriting the bytes that are already zeros?
– Kamil Maciorowski
Feb 7 at 10:36
The only way you'll know from any specific hardware is to read the SMART information after writing to determine if it recorded it as writes. That said, using this data I've been able to determine that my own SSDs are going to far outlive any conventional drives I've ever had.
– shawn
Feb 7 at 8:16
The only way you'll know from any specific hardware is to read the SMART information after writing to determine if it recorded it as writes. That said, using this data I've been able to determine that my own SSDs are going to far outlive any conventional drives I've ever had.
– shawn
Feb 7 at 8:16
The actual likelihood that the sector data is 100% identical in practice is typically very low, so the overhead of performing such a read and compare is pure wasted time. Adding (unnecessary) overhead to a write operation is detrimental to performance. A manufacturer would probably choose to maintain performance (i.e. not add dubious overhead to every write operation) than possibly extend device life by occasionally not perform an erase/write cycle.
– sawdust
Feb 7 at 10:04
The actual likelihood that the sector data is 100% identical in practice is typically very low, so the overhead of performing such a read and compare is pure wasted time. Adding (unnecessary) overhead to a write operation is detrimental to performance. A manufacturer would probably choose to maintain performance (i.e. not add dubious overhead to every write operation) than possibly extend device life by occasionally not perform an erase/write cycle.
– sawdust
Feb 7 at 10:04
Somewhat related to your example: How to fill a device with zeros, without overwriting the bytes that are already zeros?
– Kamil Maciorowski
Feb 7 at 10:36
Somewhat related to your example: How to fill a device with zeros, without overwriting the bytes that are already zeros?
– Kamil Maciorowski
Feb 7 at 10:36
add a comment |
1 Answer
1
active
oldest
votes
It might, or it might not. Without knowing the exact model and it's exact firmware I don't think you can tell (and even then, unless you wrote the firmware it's still hard to be sure).
It's safe to assume that an SSD (or basically any flash media) might not overwrite what you want it to, it could:
- write any sector anywhere
- move old sectors to normally inaccessible "reserve" areas
- some use compression, so writing GB's of zeros could take up virtually no space & actually write almost nothing
- some always use encryption (whether or not you enter a password), and issuing a special "wipe drive" command only forgets the old encryption key & sets a new one, writing virtually nothing. (I've read some could implement this very poorly too)
The only constant should be that if you just wrote zeros somewhere, then you should read back zeros from there. But what actually happens behind the scenes is almost a literal "black box".
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1402941%2fssd-wear-for-overwriting-the-same-bytes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It might, or it might not. Without knowing the exact model and it's exact firmware I don't think you can tell (and even then, unless you wrote the firmware it's still hard to be sure).
It's safe to assume that an SSD (or basically any flash media) might not overwrite what you want it to, it could:
- write any sector anywhere
- move old sectors to normally inaccessible "reserve" areas
- some use compression, so writing GB's of zeros could take up virtually no space & actually write almost nothing
- some always use encryption (whether or not you enter a password), and issuing a special "wipe drive" command only forgets the old encryption key & sets a new one, writing virtually nothing. (I've read some could implement this very poorly too)
The only constant should be that if you just wrote zeros somewhere, then you should read back zeros from there. But what actually happens behind the scenes is almost a literal "black box".
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
add a comment |
It might, or it might not. Without knowing the exact model and it's exact firmware I don't think you can tell (and even then, unless you wrote the firmware it's still hard to be sure).
It's safe to assume that an SSD (or basically any flash media) might not overwrite what you want it to, it could:
- write any sector anywhere
- move old sectors to normally inaccessible "reserve" areas
- some use compression, so writing GB's of zeros could take up virtually no space & actually write almost nothing
- some always use encryption (whether or not you enter a password), and issuing a special "wipe drive" command only forgets the old encryption key & sets a new one, writing virtually nothing. (I've read some could implement this very poorly too)
The only constant should be that if you just wrote zeros somewhere, then you should read back zeros from there. But what actually happens behind the scenes is almost a literal "black box".
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
add a comment |
It might, or it might not. Without knowing the exact model and it's exact firmware I don't think you can tell (and even then, unless you wrote the firmware it's still hard to be sure).
It's safe to assume that an SSD (or basically any flash media) might not overwrite what you want it to, it could:
- write any sector anywhere
- move old sectors to normally inaccessible "reserve" areas
- some use compression, so writing GB's of zeros could take up virtually no space & actually write almost nothing
- some always use encryption (whether or not you enter a password), and issuing a special "wipe drive" command only forgets the old encryption key & sets a new one, writing virtually nothing. (I've read some could implement this very poorly too)
The only constant should be that if you just wrote zeros somewhere, then you should read back zeros from there. But what actually happens behind the scenes is almost a literal "black box".
It might, or it might not. Without knowing the exact model and it's exact firmware I don't think you can tell (and even then, unless you wrote the firmware it's still hard to be sure).
It's safe to assume that an SSD (or basically any flash media) might not overwrite what you want it to, it could:
- write any sector anywhere
- move old sectors to normally inaccessible "reserve" areas
- some use compression, so writing GB's of zeros could take up virtually no space & actually write almost nothing
- some always use encryption (whether or not you enter a password), and issuing a special "wipe drive" command only forgets the old encryption key & sets a new one, writing virtually nothing. (I've read some could implement this very poorly too)
The only constant should be that if you just wrote zeros somewhere, then you should read back zeros from there. But what actually happens behind the scenes is almost a literal "black box".
edited Feb 7 at 11:03
answered Feb 7 at 3:57
Xen2050Xen2050
11.1k31636
11.1k31636
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
add a comment |
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
"I've read some ignore zero writes and do a discard/TRIM instead" -- I'd be interested in reading about that. Please provide some links. Re: superuser.com/questions/1242000/…
– sawdust
Feb 7 at 10:32
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
@sawdust I thought I remember reading something similar, but didn't find any concrete hits, so may have misremembered that detail, I'll remove it (it's kind of overlapping the compression case anyway, and the main idea is still "an ssd could do almost anything" ;-)
– Xen2050
Feb 7 at 11:02
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1402941%2fssd-wear-for-overwriting-the-same-bytes%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The only way you'll know from any specific hardware is to read the SMART information after writing to determine if it recorded it as writes. That said, using this data I've been able to determine that my own SSDs are going to far outlive any conventional drives I've ever had.
– shawn
Feb 7 at 8:16
The actual likelihood that the sector data is 100% identical in practice is typically very low, so the overhead of performing such a read and compare is pure wasted time. Adding (unnecessary) overhead to a write operation is detrimental to performance. A manufacturer would probably choose to maintain performance (i.e. not add dubious overhead to every write operation) than possibly extend device life by occasionally not perform an erase/write cycle.
– sawdust
Feb 7 at 10:04
Somewhat related to your example: How to fill a device with zeros, without overwriting the bytes that are already zeros?
– Kamil Maciorowski
Feb 7 at 10:36