decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
Wrong! | 283 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
Wrong!
Authored by: DieterWasDriving on Wednesday, November 07 2012 @ 03:18 PM EST

Yes, write cycles are really erase-write cycles.

But you misunderstand how wear-leveling works.

Hidden moves are taking place internally so that frequently written logical
sectors refer to different physical sectors over time. Rarely written logical
sectors are internally copied to new physical locations, so that their
little-used sectors are available to the wear-leveling mechanism.

When the operating system references a "disk block", the device uses a
redirection table to look up the physical section of memory that actually stores
the data. That allows the wear-leveling firmware freedom to do this shuffling.

There is an hidden cycle counter associated with each flash block, and an
average-wear counter. Once a physical block write count goes significantly
above the average, the device firmware finds a little-used block (which
presumably is part of a rarely updated system file) and copies the data to the
over-used block.

The algorithms can be considerably more complex than this simple model,
identifying frequently written logical blocks and grouping sectors into larger
blocks that are frequently accessed together e.g. are likely part of the same
file. But the basic idea is that a block the OS thinks is at a specific sector
address is actually migrating over the physical memory locations.

[ Reply to This | Parent | # ]

Wrong!
Authored by: Anonymous on Thursday, November 08 2012 @ 08:51 AM EST
Couple of points here - older larger geometry flash used to
have 100k Erase cycles but modern <20ns devices it is more
like 3000 Erase cycles.
The data is written page by page and each page must be
written in one go. Pages must be written sequentially into
the Erase block - typically 256 pages to an Erase Block. The
page size varies and may be anything from 2k up to 32k in
size. One technique used to ensure space is available for
moving data is to overprovision. In enterprise drives this
is likely to be 25% or more - consumer drives only 7%.
If you buy a 128 GByte drive you get access to 120GB the
other 8G is used to allow continuous writing and wear
leveling.

When you overwrite data to the drive -e.g. paging file - the
drive will mark the old data as invalid and store the new
data in a blank page. When all the pages in a block are
invalid pages the block can be erased and used again. If
nearly all blocks have some used pages then a blank block
can be used to aggregate the valid pages into a single block
to freeing blocks that contained a mix of valid and invalid
pages - this is why over provisioning allows
continuous writing. It also shows write amplification
happening - the data was written to the drive once but has
now been copied internally for a second write to the flash.
Wear leveling also adds to the write amplification. Wear
leveling occurs when some blocks are heavily cycled but some
have had data written once and then never overwritten - the
Operating system might be a good example - is moved so that
the erase cycles of those blocks can be used for the rapidly
changing stored data. Further write amplification occurs as
the drive needs to store the location of the physical data
relative to the logical address - the internal metadata.

It is fairly easy to calculate how much data a drive can
handle - Number of Erase Cycles Maximum x Size of drive/
write amplification.
What is not so easy to estimate is how long before this
limit is reached. Usage pattern summarised as GBytes written
per day. Write amplification will also vary according to
usage pattern.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )