SAP HANA Memory Utilization-Corporate Memory _ SCN

5
Getting Started Newsletters Store Products Services & Support About SCN Downloads Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation Log On Join Us Hi, Guest Search the Community Activity Communications Actions Browse 0 Tweet 0 created by Rupak Nandi on Jun 30, 2015 11:38 AM, last modified by Rupak Nandi on Jun 30, 2015 12:09 PM 1 Corporate Memory While working with big clients having businesses throughout the globe, it becomes really important to manage the data and wherever possible, reduce the data base size. When dealing with millions of records, we often come up with a situation where the data base size reaches almost the maximum capacity and data loading is no longer possible. We always cannot ask client increase the DB size as lot of money is involved. Especially if you are using HANA data base. Several Archiving techniques have been introduced in HANA like NLS and Dynamic Tiering for Using Extended Tables, but these are not only expensive but have some restriction. For example if a document is already achieved using NLS, then if you want to load delta of that record into DSO, you will come up DSO activation error. We have a simple technique that can be used easily to reduce main memory size without incurring too much of implement cost. Here we are storing the not so important data in separate memory called Corporate Memory. 1.1 Data in Corporate memory First we need to analyze which are the large tables in DBACOCKPIT. Then we need to take decision based on business requirement which data is not so important. Data are classified into 3 types: Hot, Warm and Cold Hot Data: Data which is regularly used and often changed e.g. Last 3 years of data Warm Data: Data which is rarely used and may need once or twice in a quarter e.g. Data between year 2012 and 2006. Cold Data: Data which is most likely never going to be used but still business wants to keep e.g. data beyond 2006. The production data can be classified into these groups based on business requirement. The selection filed can be time or company code or anything. It should be purely a business decision. With corporate memory we intend to keep both Warm data and Cold data out of main memory and thus reduce drastically the size of main memory Create Inflow DSO which will be copy of the large BW tables. 1.2 Hana Data Base To understand the advantages of corporate memory, we first need to understand how the data is stored in the HANA data base. When a data is loaded into an Info Provider in HANA, it actually gets loaded into two storage area: Memory and Disk. Thus a data will be accessed very quickly since it resides in memory like RAM. The screen shot suggests that it has got two Memories: Current total Memory and Size on disk With Corporate memory concept, we can offload some of the data from Main memory and keep it only in disk, so main memory size gets reduced SAP HANA Memory UtilizationCorporate Memory Share 0 Like Version 1

description

SAP HANA

Transcript of SAP HANA Memory Utilization-Corporate Memory _ SCN

  • 7/7/2015 SAPHANAMemoryUtilizationCorporateMemory|SCN

    http://scn.sap.com/docs/DOC65057 1/5

    GettingStarted Newsletters Store

    Products Services&Support AboutSCN Downloads

    Industries Training&Education Partnership DeveloperCenter

    LinesofBusiness UniversityAlliances Events&Webinars Innovation

    LogOn JoinUsHi,Guest SearchtheCommunity

    Activity Communications Actions

    Browse

    0 Tweet 0

    createdbyRupakNandionJun30,201511:38AM,lastmodifiedbyRupakNandionJun30,201512:09PM

    1CorporateMemoryWhileworkingwithbigclientshavingbusinesses throughout theglobe, itbecomesreally important tomanage thedataandwhereverpossible,reducethedatabasesize.Whendealingwithmillionsofrecords,weoftencomeupwithasituationwherethedatabasesizereachesalmostthemaximumcapacityanddataloadingisnolongerpossible.WealwayscannotaskclientincreasetheDBsizeaslotofmoneyisinvolved.EspeciallyifyouareusingHANAdatabase.Several Archiving techniques have been introduced in HANA like NLS and Dynamic Tiering for Using ExtendedTables,butthesearenotonlyexpensivebuthavesomerestriction.ForexampleifadocumentisalreadyachievedusingNLS,thenifyouwanttoloaddeltaofthatrecordintoDSO,youwillcomeupDSOactivationerror.We have a simple technique that can be used easily to reducemainmemory sizewithout incurring toomuch ofimplementcost.HerewearestoringthenotsoimportantdatainseparatememorycalledCorporateMemory.1.1DatainCorporatememoryFirstweneedtoanalyzewhicharethelargetablesinDBACOCKPIT.Thenweneedtotakedecisionbasedonbusinessrequirementwhichdataisnotsoimportant.Dataareclassifiedinto3types:Hot,WarmandColdHotData:Datawhichisregularlyusedandoftenchangede.g.Last3yearsofdataWarmData:Datawhichisrarelyusedandmayneedonceortwiceinaquartere.g.Databetweenyear2012and2006.ColdData:Datawhichismostlikelynevergoingtobeusedbutstillbusinesswantstokeepe.g.databeyond2006.Theproductiondatacanbeclassifiedintothesegroupsbasedonbusinessrequirement.Theselectionfiledcanbetimeorcompanycodeoranything.Itshouldbepurelyabusinessdecision.WithcorporatememoryweintendtokeepbothWarmdataandColddataoutofmainmemoryandthusreducedrasticallythesizeofmainmemoryCreateInflowDSOwhichwillbecopyofthelargeBWtables.1.2HanaDataBaseTounderstandtheadvantagesofcorporatememory,wefirstneedtounderstandhowthedataisstoredintheHANAdatabase.WhenadataisloadedintoanInfoProviderinHANA,itactuallygetsloadedintotwostoragearea:MemoryandDisk.ThusadatawillbeaccessedveryquicklysinceitresidesinmemorylikeRAM.

    ThescreenshotsuggeststhatithasgottwoMemories:CurrenttotalMemoryandSizeondiskWithCorporatememoryconcept,wecanoffloadsomeofthedatafromMainmemoryandkeepitonlyindisk,somainmemorysizegetsreduced

    SAPHANAMemoryUtilizationCorporateMemory

    Share 0Like

    Version1

    AT00335981Sticky NoteWhile working with big clients having businesses throughout the globe, it becomes really important to manage the data and wherever possible and reduce the data base size.

    when dealing with millions of records, we often come up with a situation where the data base size reaches almost the maximum capacity and data loading is no longer possible .

    we always cannot ask client increase the db size as lot of money is involved.

    Especially if you are using hana database.

    several archiving techniques have been introdued in hana like NLS and Dynamic tiering for using extended tables, but these are not only expensive but have some restriction.

    For example if a document is already archived using nls, then if you want to load delta of that record into dso, you will come up dso activation error

    we have a simple technique that can be used easily to reduce main memory size without incurring too much of implement cost.

    Here we are storing the not so important data in separate memory called corporate memory.

    AT00335981Highlight

    AT00335981Highlight

    AT00335981Highlight

  • 7/7/2015 SAPHANAMemoryUtilizationCorporateMemory|SCN

    http://scn.sap.com/docs/DOC65057 2/5

    Unload"SAPMIW"."/BIC/B0002683000"

    2Architecture2.1FunctionalDetailsLetstakeanexampleofFIDSO.Weassumethatithasdatafromyear2000to2015.BusinessapprovedthatDataform2012onwardswillonlybeusefulforreportingandrestarehistoricaldataandmaynotrequireoften.HenceDatafromyear2000to2011canbeconsideredasColdandWarmdata.HencethesemaynotberequiredtobekeptinMaunmemory.ThesedatawewillbestoredinInflowDSOandthenwillberemovedfromtheMainDSO.2.2TechnicalDetails

    CreateanInflowDSO(CorporateDSO)whichwillbeacopyoftheMainDSO.CreatetransformationandDTPToandFrofrombetweentheCorporateDSOandMaiDSOLoadperiodwiseDatatotheCorporateDSO.(Year2000to2011)OnceDataisloadedintheCorporateDSO,doselectivedeletionofyear2000to2011fromtheMainDSO.InDBACOCKPITrunSQLstatement:

    Unload"SAPMIW"."/BIC/AFIXXXXX"(Here/BIC/AFIXXXXXistheactivetableofCorporateDSO)TheabovestatementwilloffloadwholedataofthemainmemoryofcorporateDSO

    3DBACOCKPITTest3.1BeforeCorporatememoryLoad

    RuntcodeDBACOCKPIT

    ExpandCurrentStatus

    DoubleclickonOverview

    Wewillgettheoveralldatabasesize

    3.2CorporatememoryLoad

  • 7/7/2015 SAPHANAMemoryUtilizationCorporateMemory|SCN

    http://scn.sap.com/docs/DOC65057 3/5

    Aftertakingthestatisticsfromthecockpit,weneedtodothesebelowsimplestepsLoadPeriodwisedatatoCorporatememoryDSOfromtheMainDSODoselectivedeletionofDatafromtheMainDSOoftheperiodsthatareloaded.CheckthesizeoftheMainmemorytableinDBACOCKPITInDBACockpit,ExpandDiagnostics,doubleclickontableView

    EntertheActiveDatatablenameinTable/ViewSectionandDisplayfind

    ThenextscreenwillgiveyouthecurrentsizeoftheCorporatetable

    HerewecanseetheMainMemoryishaving1.12GBofdataallocatedforthisDSO

  • 7/7/2015 SAPHANAMemoryUtilizationCorporateMemory|SCN

    http://scn.sap.com/docs/DOC65057 4/5

    3.3OffloadofMainMemory

    RunSQLcommandinDBACOCKPITSQLEditor:Unload"SAPMIW"."/BIC/AFIXXXXX"

    ExpandDiagnostics

    DoubleclickonSQLeditorandenterthecommand

    ClickonexecuteAllthedatafromthemainmemoryofthisCorporateDSOwillbedeleted

    CheckagainthesizeofthistableinDBACOCKPITTablesView

    HerewecanseetheSizeofMemoryisZeroThesizeonDiskRemainssameaswehaveonlydeleteddatafromthemainmemoryandnotfromthedisks

    4ImportantNotesandConclusion4.1Notes:

    WecanrepeatthisactivityforasmanynoofDSOsorcubethatwewant.Oncewefinishthisactivity,sometimeswecanseethedatagaincomesbacktomainmemoryautomatically.ThisisbeingdonebythesystemifsomeoneeventriestocheckthedataofcorporatememoryinSE11orLISTCUBE.ThishappensbecauseofHANAfunctionalitycalledDELATMERGE.DELATMergeisaHANAstandardfunctionalitywheredeltadataisinitiallystoredinDeltamemory.LatteritismovedtoMainMemory.ToavoidthiswecanrunajobthroughProgramthatwillperformtheoffloadofMainMemoryusingtheaboveSQLcommandonaperiodicbasissothatevenifsomeonedoesopenCorporatememoryDSOs,anddataagainloadedintheMainmemory,thesewillperiodicallydeleteMainMemoryandkeepscheckthesize

  • 7/7/2015 SAPHANAMemoryUtilizationCorporateMemory|SCN

    http://scn.sap.com/docs/DOC65057 5/5

    FollowSCNSiteIndex ContactUs SAPHelpPortalPrivacy TermsofUse LegalDisclosure Copyright

    AverageUserRating

    (1rating)

    0 Tweet 0

    4.2Conclusion

    AftertheCorporateMemoryactivityisperformedwecanagainchecktheOverallDBACOCKPITsize,youwillseethatthereisamassivereductionThiswillhelptoreallycontroltheMainMemorySizeinthedatabaseandcansavegoodamountofmoneyforthecustomersbuynotaskingtheincreasethesize.ThisisacoastaffectivesolutionandalsohavelessmaintenancecostSelectivedeletionfromtheOriginalDSOhelpsreducethesize.

    141Views

    Share 0Like

    1Comment

    Like(1)

    LarsBreddemannJul1,20152:09AM

    Thereseemtobeamixupoftermshere.CorporateorOrganizationalmemoryWikipedia,thefreeencyclopediaisaconceptforhowanorganizationdealswiththeinformationitproducesandgathers.It'snotthesameasSAPBW,SAPHANAdatabaseorthememoryallocationofanyofthosesystems.WhileyoutrytoexplainmemoryallocationandusageconceptsofSAPHANA,unfortunatelyyoubrushthemtolightly.TablesgetunloadedfromSAPHANAmemoryautomaticallyandPSAtablesevenareprioritizedforthat.Manualunloadisandshouldbetheexception.BesidesthatIthinkyoushouldcontinuewritingblogs.Theideaofprovidinganoverviewonthistopiciscertainlygood.Lars