SAP HANA Architecture
SAP HANA Architecture
Complete Tutorial
SAP HANA Database is Main-Memory centric data management platform. SAP
HANA Database runs on SUSE Linux Enterprises Server and builds on C++
Language.
SAP HANA is useful as it’s very fast due to all data loaded in-Memory and no
need to load data from disk.
SAP HANA can be used for the purpose of OLAP (On-line analytic) and OLTP
(On-Line Transaction) on a single database.
Text data and Graph data resides in Text Engine and Graph Engine respectively.
There are some more engines in SAP HANA Database. The data is allowed to store
in these engines as long as enough space is available.
When main memory limit is reached in SAP HANA, the whole database objects
(table, view,etc.) that are not used will be unloaded from the main memory and
saved into the disk.
These objects names are defined by application semantic and reloaded into main
memory from the disk when required again. Under normal circumstances SAP
HANA database manages unloading and loading of data automatically.
However, the user can load and unload data from individual table manually by
selecting a table in SAP HANA studio in respective Schema- by right-clicking and
selecting the option “Unload/Load”.
1. Index Server
2. Preprocessor Server
3. Name Server
4. Statistics Server
5. XS Engine
1. SAP HANA Index Server
SAP HANA Database Main server are index server. Detail of each server is as
below-
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 contains all information about the system landscape. In distributed
server, the name server contains information about each running component and
location of data on the server. This server contains information about the server on
which data exists.
4. Statistic Server
Statistic server is responsible for collecting the data related to status, resource
allocation / consumption and performance of SAP HANA system.
5. XS Server
There are two types of Relational data stores in SAP HANA: Row Store and Column
Store.
Row Store
It is same as Traditional database e.g. (Oracle, SQL Server). The only
difference is that all data is stored in row storage area in memory of SAP
HANA, unlike a traditional database, where data is stored in Hard Drive.
Column Store
Column store is the part of the SAP HANA database and manages data in
columnar way in SAP HANA memory. Column tables are stored in Column
store area. The Column store provides good performance for write
operations and at the same time optimizes the read operation.
Read and write operation performance optimized with below two data structure.
Main Storage
Main Storage contains the main part of data. In Main Storage, suitable data
compression Method (Dictionary Encoding, Cluster Encoding, Sparse Encoding,
Run Length encoding, etc.) is applied to compress data with the purpose to save
memory and speed up searches.
Delta Storage
Delta storage is used for a write operation and uses basic compression. All
uncommitted modification in Column table data stored in delta storage.
When we want to move these changes into Main Storage, then use “delta merge
operation” from SAP HANA studio as below –
Process of moving Data from Delta to Main Storage during delta merge
There is a buffer store (L1-Delta) which is row storage. So in SAP HANA, column
table acts like row store due to L1-delta.
1. The user runs update / insert query on the table (Physical Operator is SQL
statements.).
2. Data first go to L1. When L1 moves data further (L1- Uncommitted data)
3. Then data goes to L2-delta buffer, which is column oriented. (L2- Committed
data)
4. When L2-delta process is complete, data goes to Main storage.
In SAP HANA memory, this table is stored in Row Store on disk as format –
Memory address
Memory address
Data is stored column-wise in the linear format on the disk. Data can be
compressed by compress technique.
The main important sizing component is the Memory, and the second important
sizing component is CPU. The third main component is a disk, but sizing is
completely dependent on Memory and CPU.
In SAP HANA implementation, one of the critical tasks is to determine the right size
of a server according to business requirement.
The Application server CPU and application server memory remain unchanged.
For sizing calculation SAP has provided various guidelines and method to calculate
correct size.