FLASH flash memory

Overview

Thephysicalcharacteristicsofflashmemoryarefundamentallydifferentfromcommonmemory:

Flashmemoryisanon-Volatilememory,Itcankeepdataforalongtimewithoutcurrentsupply.Itsstoragecharacteristicisequivalenttoharddisk.Thischaracteristicisthebasisforflashmemorytobecomethestoragemediumofallkindsofportabledigitaldevices.

Classification

NORandNANDarethetwomainnon-volatileflashmemorytechnologiesonthemarket.

In1984,Toshiba'sinventorFujioKaokafirstproposedtheconceptoffastflashmemory(hereinreferredtoasflashmemory).Unliketraditionalcomputermemory,flashmemoryischaracterizedbyNVM,anditsrecordingspeedisalsoveryfast.

Intelisthefirstcompanyintheworldtoproduceflashmemoryandputitonthemarket.In1988,thecompanyintroduceda256Kbitflashmemorychip.Itisthesizeofashoeboxandisembeddedinataperecorder.Later,thistypeofflashmemoryinventedbyIntelwascollectivelyreferredtoasNORflashmemory.ItcombinesEPROMandEEPROMtwotechnologies,andhasanSRAMinterface.

ThesecondtypeofflashmemoryiscalledNANDflashmemory.ItwasdevelopedbyHitachiin1989andisconsideredanidealreplacementforNORflashmemory.ThewritecycleofNANDflashmemoryis90%shorterthanthatofNORflashmemory,anditssaveanddeleteprocessingspeedisrelativelyfast.ThestorageunitofNANDisonlyhalfofthatofNOR,andNANDhasachievedbetterperformanceinasmallerstoragespace.InviewoftheexcellentperformanceofNAND,itisoftenappliedtomemorycardssuchasCompactFlash,SmartMedia,SD,MMC,xD,andPCcards,USBsticks,etc.

ThestorageunitofNANDflashmemoryadoptsaserialstructure,andthereadingandwritingofthestorageunitiscarriedoutinunitsofpagesandblocks(apagecontainsseveralbytes,andseveralpagesconstitutestorageblocks.NANDstorageblocksThesizeis8to32KB).Thebiggestadvantageofthisstructureisthatthecapacitycanbemadelarge.NANDproductswithacapacityofmorethan512MBarequitecommon,andthecostofNANDflashmemoryislower,whichisconducivetolarge-scalepopularization.

ThedisadvantageofNANDflashmemoryisitsslowerreadingspeed.Ithasonly8I/Oports,muchlessthanNOR.The8I/Oportsinthisareacanonlycompletethedatatransmissioninthewayofsignaltransmissioninturn,andthespeedismuchslowerthantheparalleltransmissionmodeofNORflashmemory.Inaddition,thelogicofNANDflashmemoryisanelectronicdiskmodulestructure,andthereisnodedicatedstoragecontrollerinside.Onceabaddatablockoccurs,itcannotberepaired,anditsreliabilityisworsethanthatofNORflashmemory.

Application

NANDflashmemoryiswidelyusedinmobilestorage,MP3players,digitalcameras,handheldcomputersandotheremergingdigitaldevices.Drivenbythestrongdevelopmentofdigitaldevices,NANDflashmemoryhasbeenshowingexponentiallyrapidgrowth.

"Flashmemory"canoftenbeusedinterchangeablywith"NORmemory".ManypeopleintheindustryarealsoconfusedabouttheadvantagesofNANDflashmemorytechnologyoverNORtechnology,becauseinmostcasesflashmemoryisonlyusedtostoreasmallamountofcode,thenNORflashmemoryismoresuitable.AndNANDisanidealsolutionforhighdatastoragedensity.

ThecharacteristicofNORisthatitisexecutedon-chip(XIP,eXecuteInPlace),sothattheapplicationcanrundirectlyintheflashmemorywithouthavingtoreadthecodeintothesystemRAM.ThetransmissionefficiencyofNORisveryhigh,anditisverycost-effectiveinthesmallcapacityof1to4MB,buttheverylowwritinganderasingspeedgreatlyaffectsitsperformance.

NANDstructurecanprovideextremelyhighcelldensity,canreachhighstoragedensity,andthespeedofwritinganderasingisalsoveryfast.ThedifficultyinapplyingNANDliesinthemanagementofflashandtheneedforaspecialsysteminterface.

Features

Performance

Flashflashmemoryisanon-volatilememorythatcaneraseandreprogrammemorycellscalledblocks.Thewriteoperationofanyflashdevicecanonlybeperformedinanemptyorerasedcell,soinmostcases,theerasemustbeperformedbeforethewriteoperation.ItisverysimpleforNANDdevicestoperformerasingoperations,whileNORrequiresallbitsinthetargetblocktobewrittenas1sbeforeerasing.

SincetheerasingofNORdevicesisperformedinblocksof64-128KB,thetimetoperformawrite/eraseoperationis5s.Onthecontrary,theerasingofNANDdevicesis8-32KB.Itonlytakes4msatmosttoperformthesameoperationinblocks.

ThedifferenceinblocksizewhenperformingerasingfurtherwidenstheperformancegapbetweenNORandNADN.Statisticsshowthatforagivensetofwriteoperations(especiallywhenupdatingsmallfiles),moreManyeraseoperationsmustbeperformedinNOR-basedunits.Inthisway,whenchoosingastoragesolution,thedesignermustweighthefollowingfactors.

●ThereadspeedofNORisslightlyfasterthanthatofNAND.

●ThewritingspeedofNANDismuchfasterthanthatofNOR.

●The4mserasespeedofNANDismuchfasterthanthe5sofNOR.

●Mostwriteoperationsneedtobeerasedfirst.

●TheerasingunitofNANDissmaller,andthecorrespondingerasingcircuitisless.

Reliability

Oneofthekeyconsiderationswhenusingflashmediaisreliability.ForsystemsthatneedtoexpandMTBF,Flashisaverysuitablestoragesolution.ThereliabilityofNORandNANDcanbecomparedintermsoflife(endurance),bitswappingandbadblockhandling.

Durability

ThemaximumnumberoferasingandwritingforeachblockinNANDflashmemoryisonemillion,whilethenumberoferasingandwritingforNORis100,000.InadditiontoNANDmemoryhavingtheadvantageofa10to1blockerasecycle,thetypicalNANDblocksizeis8timessmallerthanthatofaNORdevice,andeachNANDmemoryblockhasfewerdeletesinagiventime.

Easytouse

TheNOR-basedflashmemorycanbeusedverydirectly,itcanbeconnectedlikeothermemories,andthecodecanberundirectlyonit.

DuetotheneedforI/Ointerfaces,NANDismuchmorecomplicated.AccessmethodsforvariousNANDdevicesvaryfrommanufacturertomanufacturer.

WhenusingNANDdevices,youmustwritethedriverfirstbeforeyoucancontinuetoperformotheroperations.WritinginformationtoNANDdevicesrequiresconsiderableskill,becausedesignersmustneverwritetobadblocks,whichmeansthatvirtualmappingmustbeperformedonNANDdevicesfrombeginningtoend.

Otherfunctions

ThedriverisalsousedtosimulateDiskOnChipproductsandmanageNANDflashmemory,includingerrorcorrection,badblockprocessingandwearleveling.

Highlights

Flashisanon-volatilerandomaccessmemory(NVRAM),whichcanbeusedasacacheorasadirectstoragedevice.Although10timesslowerthandynamicrandomaccessmemory(DRAM),butdespitethis,itismuchfasterthanharddrives.Itsspeedanddurabilitymakethewriteoperationmuchfasterthanwritingdirectlytotheharddisk.UseFLASHasacontinuouscache,andthenslowlywriteitbacktodiskforpermanentdatastorage.

Thecachecanbedistributedthroughouttheclustertoprovidefastandreliablecachecopiesformultipletypesofoperatingsystems.ThiscachecopyconsistsofFlashormemoryandwillsharethecacheoftheentirecluster.

Characteristiccomparison

Interfacedifference

NORflashhasSRAMinterface,thereareenoughaddresspinstoaddress,youcaneasilyaccessitsinternalEverybyte.

NANDdevicesusecomplexI/Oportstoseriallyaccessdata,andthemethodsofeachproductormanufacturermayvary.8pinsareusedtotransmitcontrol,addressanddatainformation.

NANDreadandwriteoperationsuse512-byteblocks.Thisisabitlikeharddiskmanagement.Naturally,NAND-basedmemorycanreplaceharddisksorotherblockdevices.

Capacitycost

ThecellsizeofNANDflashisalmosthalfthatofNORdevices.Duetothesimplerproductionprocess,theNANDstructurecanprovidehighercapacitywithinagivenmoldsize.,Whichloweredthepriceaccordingly.

NORflashoccupiesmostoftheflashmemorymarketwithacapacityof1to16MB,whileNANDflashisonlyusedinproductswithacapacityof8to128MB.ThisalsoshowsthatNORismainlyusedincodestoragemedia,andNANDissuitableforFordatastorage,NANDhasthelargestmarketshareinCompactFlash,SecureDigital,PCCardsandMMCmemorycardmarkets.

Bitswap

Allflashdevicessufferfrombitswap.Insomecases(rarely,NANDoccursmoreoftenthanNOR),abitwillbeinvertedorreportedtobeinverted.

Thechangeofonebitmaynotbeobvious,butifithappenstoacriticalfile,thissmallfailuremaycausethesystemtoshutdown.Ifthereisonlyareport,itmaybesolvedbyreadingitafewmoretimes.

Ofcourse,ifthisbitisreallychanged,theerrordetection/errorcorrection(EDC/ECC)algorithmmustbeused.TheproblemofbitinversionismorecommoninNANDflashmemory.WhenNANDflashmemoryisused,NANDsuppliersrecommendusingEDC/ECCalgorithmsatthesametime.

ThisproblemisnotfatalwhenusingNANDtostoremultimediainformation.Ofcourse,iflocalstoragedevicesareusedtostoreoperatingsystems,configurationfilesorothersensitiveinformation,EDC/ECCsystemsmustbeusedtoensurereliability.

Badblockhandling

BadblocksinNANDdevicesarerandomlydistributed.Therehavebeeneffortstoeliminatebadblocksbefore,butitwasfoundthattheyieldwastoolowandthepricewastoohightobecost-effective.

NANDdevicesneedtoscanthemediatofindbadblocksandmarkthemasunusable.Inthemanufactureddevice,ifthistreatmentcannotbecarriedoutbyareliablemethod,itwillleadtoahighfailurerate.

Softwaresupport

Whendiscussingsoftwaresupport,weshoulddistinguishbetweenbasicread/write/eraseoperationsandhigher-levelsoftwarefordiskemulationandflashmanagementalgorithms,includingPerformanceoptimization.

RunningcodeonNORdevicesdoesnotrequireanysoftwaresupport.WhenthesameoperationisperformedonNANDdevices,driversareusuallyrequired,thatis,memorytechnologydriver(MTD),andNANDandNORdevicesareinprogress.MTDisrequiredforbothwriteanderaseoperations.

WhenusingNORdevices,theMTDrequiredisrelativelyless,andmanymanufacturersprovidemoreadvancedsoftwareforNORdevices,includingM-System'sTrueFFSdriver,whichisusedbyWindRiverSystem,UsedbyvendorssuchasMicrosoft,QNXSoftwareSystem,Symbian,andIntel.

Virtualization

Flash-basedstoragecansolvemanyperformanceproblems,especiallythosecausedbyvirtualserverenvironments.ButFLASHflashmemorystillhasalotofmystery:aretheycredible?WhichtypeofFLASHflashmemoryismostsuitableforvirtualenvironments?

FLASHflashmemoryisakindofmemorytechnology.UnlikeRAM,itcanstillretainthestoredinformationwhenthepowerisoff.AlthoughFLASHflashmemoryisnotasfastasRAMwhenperformingreadandwriteoperations,itsperformanceismuchhigherthanthatofatypicalharddisk.Moreimportantly,thereisalmostnotimedelaywhentheFLASHflashmemoryaccessesdata.FLASHflashmemorytechnologyisverysuitableforrandomI/O,andthereisalargeamountofrandomI/Ointhevirtualserverenvironment.

OneofthemainconcernsforFLASHflashmemoryisthewayitperformswriteoperations.ThenumberofwriteoperationsthatcanbeperformedbyFLASHflashmemoryislimited,whichmeansthatFLASHflashmemorymanufacturersneedtodevelopcomplexcontrollertechnologytomanagethewayofwritingtoFLASHflashmemorymodulestoensurethateachFLASHflashmemoryunitreceivesthesamewriterequest.

TherearecurrentlythreetypesofFLASHflashmemorywithdifferentdurability.Single-levelmemorycell(SLC)FLASHflashmemorywritesonebitofdataineachcell,whichhasthebestdurability.Multi-levelmemorycell(MLC)FLASHflashmemorywritesmultiplebitsofdataineachcell,rankingsecondindurability.Thethird-levelmemorycell(TLC)writesthreebitsofdataineachcellandhastheworstdurability.ThemoredatabitswrittenineachunitmeansthehigherthecapacityofeachunitandthelowerthecostperGB,whichalsomeansthattheaveragelifespanisshorter.

SLCisadatacenterstandard,butthecontinuousoptimizationofcontrollertechnologymakesMLCacceptedbymostusecases.Especiallywhenacertainmethodofdataprotectionisused,suchasmirroringorRAID,orwhentheFLASHflashmemorylayerisused.

Specificationintroduction

IntermsofusingFLASHflashmemoryinavirtualenvironment,thereareusuallythreespecificationstochoosefrom.

Themostcommonisthesolidstatedrive,whichhasthesamespecificationsastheharddrive.ThiskindofFLASHflashmemorycanbeeasilyinstalledinsidetheserverorstoragearray,usingthedriveslotoftheHDDdirectly.

ThedisadvantageofSSDliesinperformanceanddensity.PlacingFLASHintheSSDmeansthatallstorageI/OishandledthroughtheSCSIstack.Comparedwithothermethods,somedelaywillbeadded.Nevertheless,thesesystems,especiallyarrays,canstilldelivertensofthousandsofIOPS,sotheyarerarelyaffectedbySSDsthatrequiretheuseoftheSCSIprotocol.Densityhasalsobeenneglected.FlashSSDmanufacturershaveadoptedauniquemethodtoinsertasmuchFLASHflashmemoryaspossibleintotheharddrive.ComparedwiththeequivalentHDD,SSDusuallyprovidesalargerstoragecapacity.

Forsomeenvironments,thelatencyaddedbySCSIisproblematic,althoughusuallywearenotreferringtovirtualenvironments.Whenlatencyisaconcern,PCIeSSDscanbechosentointegrateflashmemorydevicesonPCIeboards.ThisusuallyavoidsthestandardstorageprotocolstackandenableslocalaccesstotheCPU.Butthedrivesusedinthethreemostpopularvirtualenvironmentsarecommon.

PCIeshouldberegardedasanextensionofRAMmemorybythevirtualenvironment.BecausePCIehaslowlatencycharacteristics,itcanprovideaveryhigh-performancevirtualmemorypool,sothatdynamicRAMisusedtostoreswapped-outpagesalmostwithoutanyimpactonperformance.

AnotherFLASHflashmemorythatisbecomingpopularisthememorybusFLASHflashmemory.FLASHmemorybusTheFLASHflashmemoryisinstalledintheFLASHmemoryslotoftheserverinsteadofthePCIebus.FLASHmemorybusFLASHflashmemorylookslikeDRAMdualin-linememorymodule,butitactuallycontainsFLASHflashmemory.ThelatencyofthisimplementationisevenlowerthanPCIeSSDanditprovidesaprivate,high-performancepathwhenaccessingtheCPU.FLASHmemorybusFLASHflashmemoryhaslimitedapplicationsinvirtualenvironments,butitisofgreatbenefittouseFLASHmemorybusFLASHflashmemoryasvirtualswapFLASHmemory.WhenitisdifficulttousePCIeslots,FLASHmemorybusflashmemoryisalsoforblades,1Uand2Uservers.Idealchoice.

Loss

ThelossofFLASHflashmemoryiscaredforinVMwareandHyper-Venvironments.Technologiessuchascachinganddatadeduplicationwillhaveanegativeimpactonitsdurability.

FLASHflashmemoryisconsideredapromisingtechnology,andmanypeoplethinkthattheycandeployflashmemoryinserverstoactasacache.ButeveryoneknowsthatFLASHflashmemoryissuitableforreading,butnotsuitableforwriting.YouneedtopaygreatattentiontothewearandtearofFLASHflashmemoryandmakefulluseofitslimitedlifespan.

FLASHflashmemorymanufacturerswilluseDRAM,whichisbetteratresistingwearandtear.TheyconcentrateallwriteoperationsintheDRAMcache,therebyreducingalargenumberofwriteoperationstotheflashcache.Thispreservestheintegrityoftheflashmemoryandeffectivelypreventsthelossoftheflashmemory.

Hyper-VshowsaslightlydifferentFLASHflashmemorylossproblem.Itappliesdatadeduplicationinstorage,andperformswritingtosourcefiles.Theoriginaldataiswrittenintothecachewithmanysmallwriteoperations.WhenHyper-Visrunningthededuplicationalgorithm,thesewriteoperationswilldamagethecacheasecondtime.

Related Articles
TOP