Le contenu de l'apprentissage est conçu pour tous ceux qui souhaitent acquérir des connaissances sur SAP d'une manière simple, compacte et pratique. Notre plateforme d'apprentissage propose des contenus pour les débutants, les apprenants avancés et les experts. Cela vous permet d'élargir vos connaissances étape par étape et de développer continuellement vos compétences pour devenir un expert SAP.
SAP HANA Deep Dive: Operational Optimization and Stability
Taux forfaitaire
19 $US par mois
Licence unique Plus de 1000 livres électroniques et tutoriels vidéo Accès instantané 12 mois($228par an) renouvellement automatique
Plus de détails
SAP HANA is an exceptionally powerful database, but mastering its full potential is an art. For database administrators, extracting maximum performance from optimally sized hardware while maintaining top-notch stability is no easy matter. In this expert guide, HANA migration and optimization experts share years of hands-on experience, offering a comprehensive toolkit to help HANA administrators maximize their databases. Explore essential SQL scripts for analysis, learn how to interpret them correctly, and gain critical insights into system sizing, database maintenance, and parameter tuning. Dive deep into workload management and discover how HANA handles CPU resources—and how you can fi ne-tune them for peak performance. Master table partitioning, explore the HANA optimizer, hints, and indexes, and benefi t from dedicated chapters on troubleshooting and advanced analysis tools. Packed with practical knowledge and expert tips, this book is your guide to unlocking the full potential of SAP HANA. Enjoy this entertaining and insightful deep dive into one of the most powerful database platforms available today!
- Achieving optimal interaction between system resources and applications
- Fine-tuning HANA for stress-free day-to-day administration
- SQL script collection and other analysis tools—usage and interpretation
- Real-world examples—including typical challenges
Exemple de lecture
2.1.1 Main memory usage in SAP HANA
As trainers in the SAP HANA environment, we often hear statements in our training courses and workshops that are not entirely true. One example is: “SAP HANA always stores all data in the main memory.” The truth is that SAP HANA keeps the most important data in the main memory. It can swap out data at any time according to load and unload criteria (including handling special cache areas, such as large object cache (LOB cache). This is especially true since the introduction of data tiering techniques such as SAP HANA Native Storage Extension (NSE). With this feature, data is selectively swapped out and loaded into a buffer (the NSE buffer cache), which occupies a limited memory area in the RAM, as required (data access). Data that is on request is read from disk into the NSE buffer cache on any kind of read access and will be evicted by reaching a threshold (parameter unload_threshold) or on memory pressure via LRU algorithm. The aim is to over-allocate the buffer so that more data is paged out. The delta between the paged-out data and the buffer is the amount of main memory saved.
Further reading on NSE
There is still no in-depth literature about NSE. However, you can refer to the following blog posts and SAP notes for more information about it:
- “2799997—FAQ: SAP HANA Native Storage Extension (NSE)”: https://me.sap.com/notes/2799997
- “[HANA] NSE part I—tech. details Q& A”: https://es-tu.de/RqsTgB
- “HANA NSE—technical details Q& A”: https://es-tu.de/tPvq
- “2220627—FAQ: SAP HANA LOBs”: https://me.sap.com/notes/2220627
It is often said that operating system (OS) monitoring tools show consistently high main memory consumption, with SAP HANA using too much memory. The truth is that the SAP HANA database manages the memory it requests from the OS and only returns it in certain situations. This is because memory that has already been allocated and predefined can be quickly reused. This saves time, and there are usually no other significant programs running on the system alongside SAP HANA. We therefore recommend not focusing on OS monitoring and instead monitoring the right KPIs in SAP HANA.
In SAP HANA parlance, we distinguish between two RAM areas:
- Working memory or dynamic RAM
- Payload (user data) or static RAM
The payload consists of the tables (column store and row store) of the database. Because tables are constantly loaded and unloaded, the term “static” is only partially accurate. In comparison, the term “dynamic” is more appropriate for the working memory—the remaining main memory after allocation to the OS, the SAP HANA code and stack, and user data. All SQL queries are processed in this area, which is dynamic by definition. Operations such as sorting and grouping or generating temporary result sets also use this fluctuating part of the RAM. Everything in SAP HANA that is not assigned to the “shared memory” is referred to as the heap. Figure 2.1 illustrates this concept in a comprehensive diagram.

Figure 2.1: SAP HANA main memory allocation
SAP recommends a 1:1 distribution between the areas of working space (50%) and payload (50%). In most cases, this is very generous and usually allows for several years of growth. In the era of virtualization and cloud computing, we recommend tighter resource allocation to minimize costs and environmental impact. If the workload is known and growth can be accurately predicted, additional payload allocation is recommended. However, this is not a general recommendation as it depends on the particular workload of the system. In most scenarios, a distribution of 70% user data to 30% working space is the maximum in the online transaction processing (OLTP) area without jeopardizing stability.
The fundamental question is: when should a system receive new resources? On the one hand, you cannot jeopardize stability or create a memory bottleneck. On the other hand, you need to consider the hardware costs. Because technology develops rapidly, it is not wise to invest in unused resources just to be prepared for the next five years. It is much better to monitor the right key figures and plan for resizing at an early stage.
2.1.2 SAP HANA resizing
Figure 2.2 shows the resizing process.

Figure 2.2: SAP HANA resizing
You can see the division of a 2-terabyte (TB) allocation into 1 TB user data and 1 TB working space. Once the payload reached the threshold value of 65%, it initiated a resizing to 3 TB. The growth from 300 GB to 1.3 TB RAM means that the tables now take up 43% of a 3 TB instance. However, most hosting companies and hyperscalers are like fashion retailers: they only offer certain sizes. You are likely to end up with memory you don’t need. Therefore, if possible, try to expand in small steps. You should also keep in mind that the sum of all tables does not always reflect the database’s usage behavior. If you are about to archive a large part of the database or if you use features such as NSE, this method of peak sizing will not work as desired. In SAP’s approach, peak sizing refers to the worst-case assumption that all data is loaded into the main memory and processed at once. This scenario almost never occurs but serves to prevent an undersized system.
2.1.3 Key figures
As peak sizing may be imprecise, we recommend a more accurate approach: determining key figures for main memory usage with the statement HANA_Memory_Components (see Listing 2.1). This statement breaks down the heap into the most important components and displays the actual allocation at a specific point in time. To obtain representative values, you should always look at several points in time.
H_COL_GB: Heap memory consumed by component 'Column Store Tables' (GB) H_ROW_GB: Heap memory consumed by component 'Row Store Tables' (GB) H_SYS_GB: Heap memory consumed by component 'System' (GB), excluding NSE page cache (Pool/CS/BufferPage) H_NSE_GB: Heap memory consumed by NSE page cache (Pool/CS/BufferPage) H_STMT_GB: Heap memory consumed by component 'Statement Execution & Intermediate Results' (GB) H_CACHE_GB: Heap memory consumed by component 'Cache' (GB) H_MON_GB: Heap memory consumed by component 'Monitoring & Statistical Data' (GB)
Listing 2.1: HANA_Memory_Components output parameter
Let's take a look at the output parameters in detail:
H_COL_GBdescribes all column store tables. These should take up the largest part of your system by far and can be fully loaded depending on their use.H_ROW_GBrepresents the row store tables. These are always 100% loaded due to their design, and the area cannot be swapped out.- The
H_SYS_GBcomponent is limited to all allocators in theSYSTEMarea. H_NSE_GBrepresents the cache for the buffer, as mentioned in Section 2.1.1.H_CACHE_GBrefers to all other caches.- The sum of allocated memory for all SQL queries running in the selected time period is reflected in the
H_STMT_GBcomponent. - Last but not least, the KPI in
H_MON_GBdisplays the statistical and monitoring data that is currently in the memory.
With these key figures, you can partition your SAP HANA system into smaller components, reduce large areas through housekeeping, or drill down to object level using data from other statements.
Other variants can also be used as indicators. These include:
- ABAP sizing report
- SAP HANA Cockpit
- EWA Dashboard
However, the resulting key figures must always be reviewed thoroughly and not accepted without verification.
Wasting resources
Incorrect interpretation and use of key figures often result in excessive hardware costs in an SAP HANA environment. We recommend an extensive review of your key figures, as SAP HANA may also misbehave if the allocation is too high. This potentially unique situation is then assumed to represent the peak and target value.
Determining and monitoring key figures
We recommend continuously monitoring the KPIs from Listing 2.1. This offers a long-term view, making it easier to identify abnormal deviations.
FréquemmentQuestions posées
Questions et réponses générales sur notre contenu d'apprentissage.
Nos produits, qu'il s'agisse de livres, de vidéos ou de formations en ligne, transmettent les connaissances SAP de manière concise et pratique, afin que vous puissiez les appliquer directement dans votre travail quotidien, même si vous disposez de peu de temps. Vous bénéficiez d'une large couverture des sujets SAP pertinents, d'un contenu de haute qualité en quatre langues et de formats d'apprentissage conçus pour répondre à vos besoins individuels. Cela vous permet de rester à jour et de développer continuellement votre expertise.
Nos livres se caractérisent par une orientation pratique claire et une présentation compacte et facile à comprendre. Nous expliquons les sujets SAP complexes de manière concise - sans termes marketing inutiles - afin que les lecteurs puissent rapidement saisir l'essentiel et appliquer directement les nouvelles connaissances.
Nos livres imprimés peuvent être retournés dans les 14 jours, dans leur état d'origine. Les frais de retour sont à votre charge.
Nous n'expédions actuellement les livres qu'en Allemagne. Si vous commandez depuis l'étranger, nous vous recommandons de passer par Amazon. Vous trouverez le lien en sélectionnant "Buy eBook" sur n'importe quel produit de notre boutique en ligne. Amazon vous indiquera alors les versions eBook et imprimées disponibles à l'achat.
Vous pouvez également accéder à l'ensemble de notre contenu par le biais d'un abonnement numérique, à partir de 19 dollars par mois.
Notre équipe est toujours heureuse de vous aider et répondra à vos questions le plus rapidement possible (généralement dans les 1 à 2 jours). Vous pouvez également nous contacter si vous avez des questions à poser à l'un des auteurs. Courriel : contact@espresso-tutorials.com

