HomeComputer ScienceFlash Wear-Leveling Ring & Wear-Inequality Index (2D)

Flash Wear-Leveling Ring & Wear-Inequality Index (2D)

Interactive 2D top-down simulation of a NAND-flash translation layer: blocks arranged in an erase ring show erase-count heat and a live histogram tracks the Gini-style wear-inequality index, so you can see numerically how static wear leveling flattens the erase-count distribution that garbage collection alone leaves lopsided.

Computer Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-mobile-data-storage ↗ Open standalone

This 2D companion to the 3D flash-storage simulator arranges a small NAND block array around an erase ring and streams a live mix of hot (constantly overwritten) and cold (write-once) data into it while the flash controller's garbage collector runs in real time — the same independently-coded FTL mechanics as the 3D version, so results are directly comparable. What's new here is a quantitative wear-inequality readout: a genuine Gini coefficient computed every frame from the ring's erase-count distribution, plotted alongside a live histogram of how many blocks sit at each P/E-cycle level. Toggle static wear leveling on and off to watch the histogram collapse into a single tight band (Gini near 0) versus spreading into a long tail of red, near-dead blocks sitting beside untouched blue ones (Gini climbing toward 1) — a direct numerical view of why relying on garbage collection alone shortens a real device's life even when it "isn't full."

⚙ Under the hood

2D companion to the flash-storage simulator: NAND blocks arranged in an erase ring show live erase-count heat while a real Gini coefficient and histogram quantify how unevenly garbage collection alone wears the device versus static wear leveling.

flash memoryNANDwear levelinggarbage collectionmobile storageSSDGini coefficient2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)