Increase the performance and lifespan of your SSD

C

Charlie Hoffpauir

One more point.... It's is a fact that an erase of a cell takes longer
than a write. Given that, if the OS sosmehow demanded that the SSD
would write to the same locations that were previously used, that
would actually slow down the swap file function...... based on early
adopters of SSDs that did not do effective garbage collection, this
actually occurred and they found their once fast SSD drives operating
at about or slower than conventional rotating disks.
 
L

Loren Pechtel

Firmware shmirmware. Back when I bought an IBM PC, using some
instruction from a Peter Norton book and the C programming
language, I wrote directly to video memory. The operating system
deals directly with hardware drivers. Just because wear leveling
is done by firmware, doesn't mean it does it all.

The wear leveling takes place within the drive itself, it's not
accessible to the OS.

(And, yes, I've done plenty of direct writes to memory. Not just the
video memory, either, but back on the old TRS-80 I wrote a program to
cache the OS overlays into some of the extra memory on a Mod IV
computer. That involved patching the in-memory OS code with my own
loader which had to reside in a tiny bit of unused memory I found in
the system space. Assembly, not C.)
 
L

Loren Pechtel

I don't see why you are so confident that the SSD wear leveling
algorithm would treat (pagefile.sys) like any ordinary file.
Obviously it doesn't, considering a reboot is required whenever
that file is changed.

You're still looking at the OS level. Wear leveling takes place
within the block reallocator on the drive itself.

*EVERY* time a block is written it's moved due to the slow handling of
erasing a block. (You get a new block, the old one is tossed in the
wipe-this queue. Once it's wiped it goes into the empty block queue.)

When the wear leveler senses that a block is getting worn down it
swaps it with one that just sits there. The OS knows nothing of this.
As far as I know, the operating system addresses the swap file
differently than other files. That's why it is unmovable on the
drive. Seems to me it would be addressing the actual locations on
the drive, instead of working its way through drive software.
Unless you're an engineer, I'm very sure you don't know better.

In *ALL* cases it comes down to read this sector, write that sector.
The wear leveler works at a level below this.


The reason the pagefile can't be moved in operation is not that there
is anything special about it's IO, but rather the fact that a page
fault can force access to it at any time. It would be *POSSIBLE* to
write code that allowed it to be moved in operation but the number of
times it gets messed with is so low that it's not worth it. Besides,
there would be a slight performance penalty from doing it--all page
faults would have to go through the locking mechanism and the code in
question would have be held permanently in memory, it can't be swapped
out (if it were you would get a double fault--that halts the CPU
without even a blue screen.) Thus a piece of code that is needed
*VERY* rarely takes a bit of memory out of everybody's systems. A bad
idea.
 
L

Loren Pechtel

One more point.... It's is a fact that an erase of a cell takes longer
than a write. Given that, if the OS sosmehow demanded that the SSD
would write to the same locations that were previously used, that
would actually slow down the swap file function...... based on early
adopters of SSDs that did not do effective garbage collection, this
actually occurred and they found their once fast SSD drives operating
at about or slower than conventional rotating disks.

It can happen to any SSD even now if you write to it faster than it's
garbage collector can keep up.
 
D

DevilsPGD

John Doe said:
The SSD might not, but Windows does. Windows is able to deal on a
very low level with hardware.

Wear leveling happens at the firmware level, below what Windows is aware
of or can interact with.
 
M

Mike Tomlinson

On 1/17/2013 1:31 PM, John Doe wrote:
If

That's why you ask so many questions, then. Even the same question in
two threads, starting the second thread because you didn't like the
answers you were given in the first. You're clueless.
 
J

John Doe

some troll

Mike Tomlinson said:
Path: eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: Mike Tomlinson <[email protected]>
Newsgroups: alt.comp.hardware.pc-homebuilt,alt.comp.os.windows-8
Subject: Re: Increase the performance and lifespan of your SSD
Date: Fri, 18 Jan 2013 06:40:05 +0000
Organization: The Pub
Lines: 13
Message-ID: <[email protected]>
References: <[email protected]> <[email protected]> <[email protected]> <[email protected]>
Mime-Version: 1.0
Injection-Info: mx04.eternal-september.org; posting-host="76ebf49c2d448e64d0f0bc520b060d0c"; logging-data="27425"; mail-complaints-to="(e-mail address removed)"; posting-account="U2FsdGVkX191McaawLD9nZPUEPrXwxmnU4Ig8uu9Luk="
X-Newsreader: Turnpike Integrated Version 5.02 U <VITPiXL5Yau8Wv1ejuVbt3PZcv>
Cancel-Lock: sha1:ajQ9F3rqB6YDOnl/GG29muUgVdQ=
Xref: mx04.eternal-september.org alt.comp.hardware.pc-homebuilt:25860 alt.comp.os.windows-8:2913



That's why you ask so many questions, then. Even the same question in
two threads, starting the second thread because you didn't like the
answers you were given in the first. You're clueless.
 
P

Paul

DevilsPGD said:
Wear leveling happens at the firmware level, below what Windows is aware
of or can interact with.

Wear leveling is totally automated, and below the level Windows
can see or work at.

There is one level of indirection inside the SSD. You say
read block 0, the SSD consults an internal table, and
reads physical block 12345. If you write block 0 on the
outside of the drive, the drive internal controller
goes to the list of free blocks, and picks the next one
there. Maybe it is 13579. The new data is written there.
Windows (and the user) may think they've just dealt
twice with block zero, but inside, physical block
12345 and 13579 were used. The user has no idea, where
exactly the data is stored. (You wouldn't immediately
know where to look with your electron microscope.)

By the controller keeping count of how many times that
has happened to each block, it's possible to point more
of the operations towards blocks that haven't been used yet.

Commands such as TRIM, provide "hints" to the controller.
Some controllers function without TRIM, and they figure out
which blocks aren't being used, which blocks are fractionally
used, or whatever. If TRIM information is available, that
just adds to the knowledge base the internal controller
has to work with. Data may be rearranged, for best
efficiency when the drive is next used.

As an example, if you use an Anandtech-style 4KB random
block write test, that makes a mess out of your SSD. Later,
an attempt to do what you think is a sequential write, seems
to be a lot slower. That's because the drive is now fragmented,
and some internal rearrangement is needed. If instead,
you leave the SSD powered up overnight, the internal
controller can attempt to clean up the mess from the 4KB random
write test. By the next morning, it's shifted enough fragments
around, such that your next attempt to do a sequential write,
is back to full speed.

These are examples of, as "DevilsPGD" describes them,
firmware-based operations, below the level that Windows
sees. And just like a hard drive has a controller, and
fully automated operations it does (bad block substitution),
the SSD has even more of those kinds of operations.

*******

The first wear-leveling implementation, was done as a
software driver. I thought at the time, that the patent
on wear leveling (by M-Systems), would create an uneven playing
field for flash devices, but it hasn't seemed to hurt at all.

http://en.wikipedia.org/wiki/Wear_leveling

"M-Systems product DiskOnChip used a software driver
named TrueFFS which performed wear-leveling of
NAND flash chips and made them appear to OS like
a conventional disk drive."

http://en.wikipedia.org/wiki/M-Systems

"After 17 years of business, they were acquired by
their prior competitor, SanDisk, in 2006."

Since that time, and especially with SSD designs,
that function has "moved underground", and it's not
done as a Windows driver. It's fully automated, and
done in hardware.

I'm not really sure, whether USB flash sticks
have that feature or not. I suspect they do,
but I don't know whether there is a controller
in there to do it or not. I don't think it's done
with an OS driver.

Paul
 
J

John Doe

Silly troll

--

DevilsPGD said:
Path: eternal-september.org!mx04.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: DevilsPGD <boogabooga crazyhat.net>
Newsgroups: alt.comp.hardware.pc-homebuilt,alt.comp.os.windows-8,free.UseNet,free.spam,free.spirit
Subject: Re: Increase the performance and lifespan of your SSD
Date: Thu, 17 Jan 2013 23:56:51 -0800
Organization: Disorganized
Lines: 9
Message-ID: <ogvhf81b35jfbgv70iep7gapl6qhdqpal2 4ax.com>
References: <kd9dje$i8m$1 dont-email.me> <LiXJs.54671$411.4207 newsfe02.iad> <kd9jin$1up$1 dont-email.me> <4sYJs.54672$411.50662 newsfe02.iad> <iZlrCCFF5O+QFwOe jasper.org.uk> <kdasib$s0k$1 dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: individual.net C2ELp1b7JDUY6WStN4e62wmR2jhRNyUhXAtYUjvpYosq9QKxiqGGB9TxLWrQott1DM
Cancel-Lock: sha1:kdH6gX1C6zJej8GyoJJg94+NmuI=
User-Agent: ForteAgent/7.00.32.1200
Xref: mx04.eternal-september.org alt.comp.hardware.pc-homebuilt:25862 alt.comp.os.windows-8:2916 free.spam:9639 free.spirit:965



And now you've forgotten how to quote. That's special.
 
B

Brandon Staggs

on Fri, 18 Jan 2013 02:22:11 +0000 (UTC):
I did with this troll said, I searched for

"static wear leveling" "pagefile.sys"

You don't get it. pagefile.sys is just more data on your drive. Why
would you expect your SSD to treat it differently than all of the
other data it automatically manages?
 
D

David

I don't see why you are so confident that the SSD wear leveling
algorithm would treat (pagefile.sys) like any ordinary file. Obviously
it doesn't, considering a reboot is required whenever that file is
changed.

So, the contention is that the solid state drive firmware is somehow
aware of or behaves differently when it reads or writes a file with a
particular FILE NAME? What happens then, when you use an operating
system does not use a special file named "pagefile.sys"?

Think carefully about what you're claiming.
 
Z

Zaphod Beeblebrox

Stripped extraneous newsgroups - again...
Firmware shmirmware. Back when I bought an IBM PC, using some
instruction from a Peter Norton book and the C programming
language, I wrote directly to video memory. The operating system
deals directly with hardware drivers. Just because wear leveling
is done by firmware, doesn't mean it does it all.

OS talks to drivers, drivers talk to, wait for it, the firmware. In
the case of SSD wear leveling, it is all done by the firmware which is
*the only way you can write to the disk* so it handles it for *all
writes to disk*. Get a clue, man. Google SSD wear leveling *without*
throwing in your precious pagefile.sys term and read, and learn.

--
Zaphod

If I had two heads like you, Zaphod,
I could have hours of fun banging them against a wall.
-Ford Prefect
 
J

John Doe

I think we can stop kicking a dead horse already.

Don't post something as if you knew, when in fact
yours was pure speculation.

--

Brandon Staggs said:
Path: eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: Brandon Staggs <nospam nowhere.invalid>
Newsgroups: alt.comp.hardware.pc-homebuilt,alt.comp.os.windows-8,free.UseNet,free.spam,free.spirit
Subject: Re: Increase the performance and lifespan of your SSD
Date: Fri, 18 Jan 2013 06:56:27 -0600
Organization: Unorganized
Lines: 13
Message-ID: <1uy3ok1t5o8vr$.ez6hsnejvj32.dlg 40tude.net>
References: <kd9dje$i8m$1 dont-email.me> <caidnUDv9eUFz2XNnZ2dnUVZ8jGdnZ2d brightview.co.uk> <kd9nqe$u0b$2 dont-email.me> <MPG.2b62333ef08288969897fc news.eternal-september.org> <kd9s8q$rje$1 dont-email.me> <sgphucgeexps$.whxcehjkmsbs$.dlg 40tude.net> <kdabki$kuv$2 dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: mx04.eternal-september.org; posting-host="493bb5a3ff6902da0dd86040d8eb6031"; logging-data="13621"; mail-complaints-to="abuse eternal-september.org"; posting-account="U2FsdGVkX1/Xv0piD7ZZjBcOGZDGNlRV"
User-Agent: 40tude_Dialog/2.0.15.84 (7dfd0b0e.341.221)
X-Face: (SC?5s>E1d)'gcANm,+;"E70c9H/b(hxY[MU%8k>mU%tKc+BJc]7]Xi.C|cgq\rxA2Q gJ' g{e{-N5U)k]bAu^V%}gDT|2/C}k'Z34'Q}TP)(fL*$>kJj&.6V+n?'^~::[p_qem}'w sc41w}cw[V F
Cancel-Lock: sha1:ZOe6AKcQQ6LlCK9k0ttFDCMLJ4I=
Xref: mx04.eternal-september.org alt.comp.hardware.pc-homebuilt:25865 alt.comp.os.windows-8:2922 free.spam:9642 free.spirit:967

on Fri, 18 Jan 2013 02:22:11 +0000 (UTC):
I did with this troll said, I searched for

"static wear leveling" "pagefile.sys"

You don't get it. pagefile.sys is just more data on your drive. Why
would you expect your SSD to treat it differently than all of the
other data it automatically manages?
 
G

Gene E. Bloch

Stripped extraneous newsgroups - again...


OS talks to drivers, drivers talk to, wait for it, the firmware. In
the case of SSD wear leveling, it is all done by the firmware which is
*the only way you can write to the disk* so it handles it for *all
writes to disk*. Get a clue, man. Google SSD wear leveling *without*
throwing in your precious pagefile.sys term and read, and learn.

Nice try, but those last three words will not work :)
 
Z

Zaphod Beeblebrox

On Fri, 18 Jan 2013 11:24:00 -0800, "Gene E. Bloch" <not-
(e-mail address removed)> wrote in article <31dmfk94gnsz
[email protected]>...
Nice try, but those last three words will not work :)

Yup, got that. I'm done here.

--
Zaphod

Adventurer, ex-hippie, good-timer (crook? quite possibly),
manic self-publicist, terrible bad at personal relationships,
often thought to be completely out to lunch.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top