PoWer Loss Protection In SsDs - Samsung Electronics

Transcription

White Paper:Power Loss Protection in SSDsHow SSDs are Protecting Data Integrity

iNTRODUCTION: Power Loss Protection in SSDsSSDs are usually categorizedas client and enterprise SSDs.Client SSDs are designed forPC applications, which includeslaptops, desktops, tablets andother devices purposed forpersonal computing, whereasenterprise SSDs have beenbuilt for more strenuous serverand data center usage. It’sgenerally well understoodthat enterprise SSDs offerhigher endurance and betterconsistent performance, whichare often required in enterpriseenvironment. The lower costper gigabyte and highperformance makes clientSSDs tempting for enterpriseusers as well, but it’s notalways understood that clientSSDs don’t provide the sameguarantee of data integrity.This white paper explainsthe differences in power lossprotection techniques usedin Samsung’s enterpriseand client SSDs. Power lossprotection is a critical elementin data integrity because nearlyall modern SSDs contain avolatile DRAM cache that isvulnerable to unexpected powerlosses. Potential data loss orcorruption can be a seriousrisk for an enterprise handlingimportant customer data, henceunderstanding the significanceof power loss protection isimportant when evaluatingdrives for enterprise usage.Why SSDs Need Power Loss ProtectionUsually SSDs send anacknowledgement to the OSthat the data has been writtenonce it has been committed toDRAM. In other words, the OSconsiders that the data is nowsafe, even though it hasn’t beenwritten to NAND yet. The reasonNAND NANDNAND NANDHostWhen the host operatingsystem (OS) sends an IO writecommand to the SSD, the datais first received and processedby the SSD controller. The datais then moved to the volatileDRAM cache to improveperformance and perform writeoptimization, after which datais eventually written to nonvolatile NAND. While NAND isnon-volatile and thus data init is protected against powerlosses, the data that has yet toreach NAND is vulnerable andsubject to corruption in case ofan unexpected power loss.Write IOSSDControllerDRAMNAND NANDNAND NANDThe Journey of Data Inside an SSDwhy SSDs use DRAM for writeIO caching is because NANDcan only be programmedat the page-level (typically 8KBor 16KB in modern NAND), sowrite IOs need to be combinedfor optimal performance andendurance. Otherwise, forexample a common 4KBwrite, would have to be writtento NAND as 8KB or 16KBdepending on the page size,which would seriously reduceendurance and performance.

Flash Translation Layer: Keeping Data OrganizedThe other purpose of theDRAM is to cache the FlashTranslation Layer (FTL), whichis used to map Logical BlockAddresses (LBA) used by theoperating system to physicalNAND addresses. The FTL isconstantly changing as newwrite IOs from the host arewritten to the drive and the driveperforms background taskssuch as garbage collectionand wear leveling, thus usingDRAM for FTL caching isnecessary because DRAMhas substantially lower latencythan NAND, its endurance ispractically unlimited and it’sbit-addressible. Without theDRAM cache, SSDs would notperform as well as they do, andthere would also be enduranceconcerns as FTL changesconsist of very small writes andNAND can only be programmedat the page-level (typically 8KBor 16KB in modern NAND).data in the DRAM may be lost.Since DRAM hosts the mostcurrent version of the FTL, anunexpected power loss maycorrupt all data in the SSD ifproper power loss protectionsare not in place.Because of the volatile natureof DRAM (i.e. all data is lost inan event of power loss), SSDsneed to incorporate power lossprotection (PLP) techniques toprevent against data loss andcorruption. During a normal shutdown or sleep, an SSD is givenenough time by the operatingsystem to write all contents ofDRAM to NAND, but in case ofan unexpected power loss, theUnexpected power lossesmay be due to power outages,but also due to power supplyglitches that don’t impact therest of the system. Hence anuninterruptible power supply(UPS) or any other form ofbackup power is not enoughto prevent against unexpectedpower losses, and SSDsneed internal mechanisms toguarantee data integrity.Overview of SSD Software ArchitectureFile SystemBlock Device DriverFTL (Flash Translation Layer)Sector TranslationBlock ManagementLow Level DriverSoftwareHardwareNAND Flash DeviceRaw NAND NAND ControllerMapping, Garbage Collection,Wear LevelingBad Block Management,Error HandlingFlash Interface

Power Loss Protection in Samsung Enterprise SSDsTo guarantee data integrity,Samsung’s enterprise SSDsfeature full power loss protectionwith backup power circuitry in 1.7trillionannual cost of data lossand resulting torCapacitorNAND NANDBackup PowerPower SupplyBecause data centers areused to store customers’ data,data integrity and availabilityare a very high priority. Anydata loss or delay in availabilitywill immediately degrade thecustomer’s experience and it’slikely that the customer will notcontinue to use the service dueto lack of trust. Imagine thata customer is using an imagehosting service to store photosof his or her children for example,and one day the customerfinds out that some of the mostprecious memories have gonemissing because of a poorlydesigned storage architecture.Not only is the customer furious,but the customer will also makesure that others hear his or herexperience through social mediaand word of mouth, which woulddamage the reputation of theservice.NAND NAND/SSDControllerDramNAND NANDNAND NANDPower Loss Event in a Samsung Enterprise SSDthe form of tantalum capacitors.When the SSD is powered on,the tantalum capacitors arecharged and if external power issuddenly lost for any reason, thecharged current in the capacitorsis discharged to provideadditional power to the SSD.This additional power is usedto provide power to the SSDcontroller, DRAM and NANDto flush all the data in theDRAM to the NAND in order toavoid loss or corruption of data.With the help of the capacitors,Samsung enterprise SSDs areguaranteed to provide full powerloss protection for all data thathas been acknowledged to thehost as written.29%53%of data loss isdue to corruptionof enterprise storagedisruptions are causedby hardware failuresEMC Global Data Protection Index, 2014.

Power Loss Protection in Samsung Client SSDsDue to the high cost ofcapacitors and the pricesensitivity of the client SSDmarket, client SSDs do notnormally include full power lossprotection in the form of backuppower circuitry. While the FTLis frequently flushed from theDRAM to the NAND, there is stilla window of opportunity wherethe DRAM contains a newerversion of the FTL in the eventof an unexpected power loss.Fortunately, there are alternativeand more cost efficientmechanisms to prevent the FTLfrom corrupting.The most important mechanismis journaling, which is used atboth the FTL and file systemlevel. A journal is a separate logthat keeps track of upcomingchanges that have yet to becommitted to main file systemor FTL. In case of an SSD, thejournal basically keeps trackof all data that has yet to bewritten to NAND in full in order toavoid the FTL from corruption.If the FTL in the DRAM is newerthan the version in NAND in anevent of an unexpected powerloss, the controller only has tocheck the data integrity of thejournal rather than the wholeFTL, which typically only takesa few seconds compared to atleast several minutes for a fullFTL checkup. In a client usage,a rare few second delay is anon-issue, but in an enterprisedeployment with thousands ofdrives such delays would addup and potentially causeserious problems.Furthermore, the small amountof pending write data that isstored in DRAM is lost duringan unexpected power loss. InPC environment, such data lossisn’t critical because modernfile systems use journaling inorder to avoid corruption, andit’s important to acknowledgethat hard disk drives (HDDs) alsocontain a DRAM cache, thusthe power loss phenomenon isnothing new in the PC space.However, in the enterpriseeven small data losses can becritical because they may resultin corruption of customer’sdata, which would degrade thereputation of the service.Journaling Process Inside an SSDJournal LogJournal is updatedto indicate a new write IOWrite IO1Write IO is marked completeand journal entry is deleted23Data is written to NANDand FTL is modified toinclude the new dataFlash TranslationLayer

ConclusionAs we live in a data driven world,there is nothing more importantfor an enterprise than to protectits own or its customers’data. Using client SSDs inenterprise may seem like a goodinvestment at first due to thelower cost per gigabyte, but thecost of data losses overtimemay considerably outweighthe initial savings in acquisitioncost. Thus enterprise SSDs area better, risk-free investmentfor customers looking todeploy SSDs in an enterpriseenvironment.Samsung enterprisessd portfolioWith Built-in Power Loss ProtectionPM863 Series Data Center SSDs 3 bit MLC NAND Designed for read-intensiveapplications SATA 6Gb/s Interface Form-factors: 2.5”SM863 Series Data Center SSDs 2 bit MLC NAND Designed for write-intensiveapplications SATA 6 Gb/s Interface Form-factors: 2.5”Samsung Workstationssd portfolioAbout the AuthorKristian Vättö is a technical marketing specialistand started his career as a news editor atAnandTech.com in 2011. He later becamethe site’s SSD editor and was responsible forproducing highly-detailed and professional SSDreviews. In addition to his work with Samsung,Kristian is currently studying economics at theUniversity of Tampere in Finland.Without Built-in Power Loss Protection950 Pro Series Client PC SSDs 2-bit MLC V-NAND Designed for high-end PCs PCIe Interface NVMe protocol Form-factors: M.2850 Pro Series Client PC SSDs 2-bit MLC V-NAND SATA 6Gb/s Interface Form-factors: 2.5”Learn more: samsung.com/enterprisessd insights.samsung.com 1-866-SAM4BIZFollow us:youtube.com/samsungbizusa @SamsungBizUSA 2016 Samsung Electronics America, Inc. All rights reserved. Samsung is a registered trademark of Samsung Electronics Co., Ltd.All products, logos and brand names are trademarks or registered trademarks of their respective companies. This white paper is forinformational purposes only. Samsung makes no warranties, express or implied, in this white paper. WHP-SSD-POWERLOSSPROTECTION-FEB16J

feature full power loss protection with backup power circuitry in the form of tantalum capacitors. When the ssD is powered on, the tantalum capacitors are charged and if external power is suddenly lost for any reason, the charged current in the capacitors is discharged to provide additional power to the ssD. this additional power is used