Home » Home With One Sidebar » What Is Wear Levelling and How Does It Make a Memory Card Last?

What Is Wear Levelling and How Does It Make a Memory Card Last?

by Bebup Editorial Team
0 comments

Wear levelling can make a memory card last for years because the card’s controller spreads every write across all of its blocks. No single block then reaches its erase limit early. Flash memory wears a little each time a block is erased. A card that always rewrote the same spot would fail within weeks, which is why the trick matters. The figures here describe an invented 64 GB card, so yours will differ. One year of use is followed block by block. Next come an analogy and a list of limits, and the common wrong beliefs close the page.

What wear levelling is, and how it can make a memory card last

Wear levelling is the controller’s habit of sending each new write to the least-worn free block, while a table inside the card remembers where every piece of data now lives. The computer asks for the same address as before. The controller quietly writes elsewhere and updates the table, and the old block joins a pool waiting to be erased.

Flash can be written in small pages of about 16 KB. It can be erased only in whole blocks, here 4 MB. Each erase strains the cell insulation a little. A block is good for a limited number of erases, here 3,000. That limit is the budget everything else spends.

The table is tiny, perhaps 0.1% of the card. Losing it would scramble every file, so controllers update it with care. That summary leaves out how the controller treats data that never changes. It also hides the extra writes that the moving itself creates. The sections below fill in both gaps with a card followed through a year.

Following a memory card to its last block, one write at a time

Start with the made-up 64 GB card. It holds 16,384 blocks of 4 MB. Each block survives 3,000 erases, so the whole card has a budget of 49,152,000 erases. The camera updates a small table that lists the photos, and that table is rewritten about 200 times a day. Without levelling the table would sit in one block. That block reaches 3,000 erases after 3,000 ÷ 200 = 15 days. The card would then fail with 99.99% of its budget unused.

Now follow the same table with levelling. On day 1 the camera asks to rewrite the table at logical address 7. The controller picks the free block with the fewest erases and writes the new table there. It then points address 7 at that block and marks the old one as stale. The camera never knows what happened. A background job erases stale blocks and returns them to the pool, each with one more tick on its counter.

Over a year the table’s 73,000 rewrites land on 16,384 blocks, which is 4.5 erases per block. Photos add more to that. At 20 GB a week the camera fills 5,120 blocks a week, or about 266,000 a year. That adds roughly 16 erases per block. The total of about 21 erases per block per year is under 1% of the 3,000 budget. At that pace the blocks would last well over a century.

Spread this thin, the wear never shows.

One more step keeps the spread honest. Suppose 40 GB of holiday photos sit untouched, which occupies 10,240 blocks. Their counters stay near zero. The other 6,144 blocks absorb every new write, so those wear 2.7 times faster (16,384 ÷ 6,144). Static levelling fixes this. The controller occasionally copies old photos into worn blocks and frees the fresh ones for use. Each such copy costs an erase of its own, so the controller does it sparingly.

Rotating tyres, and where the comparison breaks

Rotating the tyres on a car works like wear levelling in spirit. A tyre wears according to its wheel position. Swapping them spreads the loss evenly, so no tyre is bald while the others are fresh. Levelling does the same by sending writes to different blocks in turn. Only erasing wears a block, and reading it is free.

The comparison breaks on cost. A tyre costs nothing to swap, whereas a flash block pays for every move. Copying a stale photo into a worn block takes an erase, and an erase is the very thing that causes wear. The controller must weigh each rotation against its own price, which no garage ever has to do.

What levelling cannot do for a card

Levelling shares the wear around and leaves the total unchanged, so the budget of our card stays at 49,152,000 erases whatever the controller does. A heavy writer still spends it. A dashcam that overwrites the whole 64 GB once a day uses one erase per block per day. Then 3,000 erases last about 8 years. If the controller’s moving doubles the real writes, that falls to about 4 years.

A nearly full card is the second limit.

Free blocks are the pool the controller rotates through. A card that’s 95% full pushes the same writes onto far fewer blocks. Cards also vary in how much freed space their controllers can reuse, so a fifth free is a safe margin rather than a guarantee. Even so, wear levelling can make a memory card last years for a photographer, which is why these limits matter mainly to heavy writers.

When a block fails the controller retires it. The usable space shrinks a little, and many cards eventually switch to read-only, so the photos usually stay readable.

What people get wrong about card wear

Many people think formatting resets a card’s wear. That belief forms because formatting clears errors and returns an empty card, which feels like a fresh start. A corrupt table gets rebuilt, and the repair looks like healing. The erase counters live in the controller, so a format leaves them alone.

Others assume a full card is no worse than an empty one. It forms because capacity looks like a label on the box. Free space is actually the working pool. A full card tends to wear faster, because a card at 95% has so little room to rotate.

The third belief is the strongest: wear levelling means a card never wears out. It forms because the word suggests perfect fairness. Nothing in the term promises that wear levelling will make a memory card last forever. The total budget stays fixed, and only its spread improves.

How to decide whether your card needs more than it has

Work out how often per day you rewrite the whole card. Under 0.1 full rewrites a day, ignore wear entirely, and at about one a day choose a card sold with an endurance rating. Our photographer rewrites 20 GB a week on 64 GB. That’s about 0.05 a day, so any card will do. The dashcam rewrites 1.0 a day, so it needs the rated card and a replacement every few years. Round the answer up if the card is usually nearly full, since the pool shrinks then. Both inputs are easy to find: the capacity printed on the label, and the size of a typical day’s photos or video in your folder.

To make a memory card last, leave about a fifth of its space free. Replace it on a schedule rather than waiting for the first failure. On our card a fifth free means 3,277 blocks in the pool. That’s enough to spread even a busy day’s writes thinly. A new card costs less than a lost afternoon of footage. Store a second copy of anything you can’t retake, since a schedule only lowers the odds. A duplicate removes the risk.

Questions readers keep asking

What happens when a memory card finally wears out?

The controller first retires failed blocks, so the usable space shrinks. Eventually many cards turn read-only or stop responding. Your photos are often still readable at that stage, so copy them off at the first warning. Write errors and a shrinking capacity are the usual signs, and a duplicate of anything precious is cheap insurance.

Do I need to think about wear levelling at all?

For holiday photos and ordinary video, no. A card rewritten a fraction of once a day sits far under its budget. The topic matters only if you record continuously, as a dashcam does. Then the budget really does run out within a few years.

Is a memory card the same as an SSD for wear?

Both use flash and both level wear, so the principle matches. An SSD usually reserves more spare blocks and has a stronger controller. That spreads wear more evenly and handles heavy writing better. A memory card suits light, steady use, while an SSD suits a machine that writes all day.

You may also like

Leave a Comment

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?
-
00:00
00:00
Update Required Flash plugin
-
00:00
00:00