SAP HANA Architecture

SAP HANA Architecture

SAP HANA Architecture

The SAP HANA architecture is unique and distinct when compared to other databases. It is a C++-based database that runs on SUSE Linux Enterprises Server. The SAP HANA database was created with the goal of providing a main-memory-oriented data management platform that supports SQL. SAP HANA Database is dispersed across numerous workstations.

SAP HANA Database consists of a set of in-memory processing engines. The calculation engine is the main in-memory processing engine in SAP HANA. It works with other processing engines like Relational Database Engine (Row and Column engines), OLAP engines, etc.

In its Column storage, data is compressed using several compression algorithms (eg. dictionary encoding, run-length encoding, sparse encoding, cluster encoding, and indirect encoding). When SAP HANA’s main memory limit is reached, any database objects (tables, views, and so on) that aren’t in use are unloaded from the main memory and stored on the disk.

These object names are determined by application semantics and are reloaded from the disk into the main memory when needed. In most cases, the SAP HANA database handles data emptying and loading automatically. However, the user can manually load and unload data from individual tables in SAP HANA Studio by right-clicking on the table in the relevant Schema and selecting the option “Unload/Load”.

HANA Server consists of

  1. Index Server
  2. Preprocessor Server
  3. Name Server
  4. Statistics Server
  5. XS Engine

1. Index Server

THE SAP HANA Database Main server is the index server. The detail of each server is given below-

  • It contains actual data stores and an engine for processing the data.
  • It’s the main SAP HANA database component.
  • Index Server processes incoming SQL or MDX statements.

Below is the architecture of the Index Server.

HANA Index server
  • Session and Transaction Manager: Session Component manage sessions and connections HANA database. Transaction Manager coordinates and controls transactions.
  • SQL and MDX Processor: The SQL Processor component performs data queries and sends them to the query processing engine, which is either SQL /SQL Script / R / Calc Engine. MDX Processor is a multidimensional data query and manipulation tool (e.g., Analytic View in SAP HANA)
  • Repository: The repository maintains the versioning of HANA metadata objects e.g., (Attribute view, Analytic View, and Stored procedure).
  • Persistence layer: This layer makes use of the HANA database’s “Disaster Recovery” capability. It stores backups as save points in the data volume.

2. Preprocessor Server

This server is used in Text Analysis and extracts data from a text when the search function is used.

3. Name Server

This server keeps track of the entire system landscape. The name server on a distributed server stores information about each operating component as well as the location of data on the server. This server is used to store information about the server where data is stored.

4. Statistic Server

The Statistic Server is in charge of gathering information about the SAP HANA system’s status, resource allocation/ consumption, and performance.

5. XS Server

The XS Engine is a part of the XS Server. The XS Engine client allows external applications and developers to access the SAP HANA database. The external client application can use HTTP to send data to the HTTP server using the XS engine.

SAP HANA Landscape

The term “HANA” typically means High-Performance Analytic Appliance which is a combination of hardware and software platforms.

  • Since the changes in computer architecture, more powerful computers in terms of CPU, RAM, and Hard Disk are now available.
  • SAP HANA is a performance bottleneck solution in which all data is kept in Main Memory and there is no need to move data from disc I/O to Main Memory on a regular basis.

Below is SAP HANA Innovation in the field of Hardware/Software.

There are two types of Relational data stores:

Row Store

It’s the same as a Traditional database, for example (Oracle, SQL Server). The sole difference is that, unlike a standard database, HANA stores all data in a row storage area in memory, rather than on a hard drive.

Column Store

The Column Store is a component of the HANA database that handles data in HANA memory in a columnar fashion. Column tables are kept in the Column store. The Column store optimizes read operations while providing good performance for writing operations.

Read and write operation performance optimized with the below two data structures.

Main Storage

The majority of data is stored in Main Storage. To preserve memory and speed up searches, appropriate data compression methods (Dictionary Encoding, Cluster Encoding, Sparse Encoding, Run Length Encoding, etc.,) are used in Main Storage.

  • Since write operations on compressed data in main storage are expensive, write operations on compressed data in main storage do not directly affect compressed data. Instead, all changes are written to a separate “Delta Storage” region in column storage.
  • Delta storage is designed to be used for writing and employs standard compression. On main storage, write operations are not permitted, but they are permitted on delta storage. On both storages, reading activities are permitted.

Delta Storage

Delta Storage is used for a write operation and it employs basic compression. All changes to Column table data that haven’t been committed are saved in delta storage.

Use SAP HANA studio’s “delta merge operation” to move these modifications into Main Storage, as seen below.

  • The goal of a delta merge operation is to transfer changes from delta storage to main storage.
  • The content of the main storage is stored in the disc and compression is recalculated after conducting a Delta Merge operation on a sap column table.

Sizing

Sizing refers to the process of determining the hardware requirements for a HANA system, such as RAM, hard disc space, and CPU.

Memory is the most significant sizing component, and the CPU is the second most critical size component. The disc is the third major component, but its size is entirely determined by the memory and CPU.

One of the most important responsibilities in HANA deployment is determining the appropriate server size based on business requirements.

In terms of sizing, SAP HANA DB differs from traditional DBMS in the following ways:

  • It’s Main Memory Requirement ( Memory sizing is determined by Metadata and Transaction data in SAP HANA)
  • SAP HANA CPU Requirement (Forecast CPU is Estimated not accurate).
  • SAP HANA Disk Space Requirement ( Is calculated for data persistence and for logging data)
  • The CPU and RAM of the application server remain unaffected.