0% found this document useful (0 votes)
10 views

SAP HANA-Persistence

SAP HANA-Persistence

Uploaded by

freekross
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

SAP HANA-Persistence

SAP HANA-Persistence

Uploaded by

freekross
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

SAP HANA: Persistence

Dr. Ralf Czekalla


Product & Management Strategy (SAP HANA)

© 2011 SAP AG. All rights reserved. 1


Disclaimer

This presentation outlines our general product direction and should not be relied on in
making a purchase decision. This presentation is not subject to your license
agreement or any other agreement with SAP. SAP has no obligation to pursue any
course of business outlined in this presentation or to develop or release any
functionality mentioned in this presentation. This presentation and SAP's strategy and
possible future developments are subject to change and may be changed by SAP at
any time for any reason without notice. This document is provided without a warranty
of any kind, either express or implied, including but not limited to, the implied
warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP assumes no responsibility for errors or omissions in this document, except if
such damages were caused by SAP intentionally or grossly negligent.

© 2011 SAP AG. All rights reserved. 2


SAP HANA Persistence:
In-Memory Data Is Regularly Saved to Disk

Data: HANA
SQL data and undo log information
Additional HANA information, Memory
such as modeling data
Data
Kept in-memory to ensure maximum
performance
Write process is asynchronously
Log:
Information about data changes (redo log) Information about Regular automatic
Directly saved to persistent storage when
data changes savepoints
transaction is committed
Cyclical overwrite (only after backup)
Savepoint:
Log Data
Changed data and undo log is written from
memory to persistent storage Volume Volumes
Automatic
Persistent Storage
At least every 5 minutes (customizable)

© 2011 SAP AG. All rights reserved. 3


SAP HANA Persistence:
Regular Saving of In-Memory Data to Disk, Restart

In-memory computing is secure


The SAP in-memory database holds the bulk of its data in memory for maximum
performance, but still uses persistent storage to provide a fallback in case of failure. The
log is capturing all changes by database transactions (redo logs)
Data and undo log information (part of data) are automatically saved to disk at regular
savepoints
The log is also saved to disk continuously and synchronously after each COMMIT of a
database transaction (waiting for end of disk write operation)
After a power failure, the database can be restarted like a disk-based database:
System is normally restarted („lazy“ reloading of tables to keep the restart time short)
System returns to its last consistent state (by replaying the redo log since the last savepoint)

Time

1 2 3
Savepoint: Continously and after each COMMIT, Power failure
Data & undo log is written redo log is written to disk (log area)
to disk (data area)
© 2011 SAP AG. All rights reserved. 4
SAP HANA Persistence:
Data Volumes

Data Volumes are located in file systems or RAW devices


Per instance one data volume
Growing until disk or LUN is full
Logical Volume Manger (LVM) or similar needed on OS level to extend the file systems or
dedicated partition/LUN
Different PageSizes (4k, 16k, ...16M)

Typical sizing of the disks for data volumes


4 times main memory of HANA node

© 2011 SAP AG. All rights reserved. 5


SAP HANA Persistence:
Log-Buffers in memory and Log-Segments on disk

Memory Log writing


Fix size log
Fix size log buffer (1MB) Fix size log Log is written to Log-Buffers in
buffer (1MB) buffer (1MB) Memory
Fix size log Fix size log If a Log-Buffer becomes full OR a
buffer (1MB) buffer (1MB)
commit entry is written, the Log-
Fix size log Fix size log
buffer (1MB) buffer (1MB)
Buffer will be written to the assigned
Fix size log
buffer (1MB)
Log Volume
The log is finally written into Log-
Segments where multiple Log-
Disk Buffers can be combined into
With the new persistence (SPS2)
the log writing rate was dramatically
Log Volume reduced and chunks got much
==
bigger (often 1MB)
Log Disk

© 2011 SAP AG. All rights reserved. 6


SAP HANA Persistence:
Log modes

4 Log modes are implemented with new persistence


SPS2 – behavior of Ramp-up Log writing is simulated
NO
o Log writing is completely switched off
LEGACY
o Log is kept only since the last data backup
o Older log is purged asynchronously after data backup
o No Log Backup possible
SPS3 – two additional Log modes
OVERWRITE
o No backup necessary
NORMAL
o Backup must be performed
o Only log which is backed up will be freed
o This is the preferred Log mode

© 2011 SAP AG. All rights reserved. 7


© 2011 SAP AG. All rights reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
without the express permission of SAP AG. The information contained herein may be Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
changed without prior notice. mentioned herein as well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP company.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
products and services mentioned herein as well as their respective logos are trademarks or
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft
registered trademarks of Sybase, Inc. Sybase is an SAP company.
Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, All other product and service names mentioned are the trademarks of their respective
System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, companies. Data contained in this document serves informational purposes only. National
z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, product specifications may vary.
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, The information in this document is proprietary to SAP. No part of this document may be
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, reproduced, copied, or transmitted in any form or for any purpose without the express prior
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, written permission of SAP AG.
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered
This document is a preliminary version and not subject to your license agreement or any
trademarks of IBM Corporation.
other agreement with SAP. This document contains only intended strategies, developments,
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. and functionalities of the SAP® product and is not intended to be binding upon SAP to any
particular course of business, product strategy, and/or development. Please note that this
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or
document is subject to change and may be changed by SAP at any time without notice.
registered trademarks of Adobe Systems Incorporated in the United States and/or other
countries. SAP assumes no responsibility for errors or omissions in this document. SAP does not
Oracle is a registered trademark of Oracle Corporation. warrant the accuracy or completeness of the information, text, graphics, links, or other items
contained within this material. This document is provided without a warranty of any kind,
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. either express or implied, including but not limited to the implied warranties of
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are merchantability, fitness for a particular purpose, or non-infringement.
trademarks or registered trademarks of Citrix Systems, Inc. SAP shall have no liability for damages of any kind including without limitation direct,
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World special, indirect, or consequential damages that may result from the use of these materials.
Wide Web Consortium, Massachusetts Institute of Technology. This limitation shall not apply in cases of intent or gross negligence.

Java is a registered trademark of Sun Microsystems, Inc. The statutory liability for personal injury and defective products is not affected. SAP has no
control over the information that you may access through the use of hot links contained in
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for these materials and does not endorse your use of third-party Web pages nor provide any
technology invented and implemented by Netscape. warranty whatsoever relating to third-party Web pages.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,
StreamWork, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and other
countries.

© 2011 SAP AG. All rights reserved. 8

You might also like