Lesson 5 of 5
Monitoring: memory, CPU, disk and alerts
10 min
Listen to this lesson
A platform team does not wait for users to say "SAP is slow". It watches a small set of indicators every day and knows which ones predict trouble. For SAP HANA the main tool is the SAP HANA cockpit, a web-based tool whose database overview shows cards for memory, CPU, disk and alerts. From the ABAP side, transaction DBACOCKPIT gives a database view inside the SAP system. In a RISE environment SAP monitors the infrastructure, but Contoso's Basis team still watches the indicators that relate to its own workload and tests.
Memory: the indicator that matters most
SAP HANA manages its own memory pool, capped by the global allocation limit (parameter global_allocation_limit; by default calculated from physical memory). Inside the pool, used memory is what SAP HANA actually uses for code, table data and temporary calculations, and table data is the largest share. Peak used memory shows the high-water mark since statistics were last reset. Operating-system figures such as resident memory can look alarming because SAP HANA keeps freed memory in its pool; judge SAP HANA by used memory against the allocation limit.
- Used memory approaches the limitA large report and a data load run at the same time
- Caches releasedSAP HANA frees caches and buffers first
- Tables unloadedColumn tables used least recently are unloaded from memory (visible in M_CS_UNLOADS)
- Out-of-memory eventIf that is not enough, a statement fails with an out-of-memory error and a trace is written
- Users noticeA Fiori app or background job fails, or response times jump as unloaded tables reload
CPU, disk and I/O
CPU spikes usually point to expensive statements, heavy merges or parallel loads; the cockpit lets you drill into the statements consuming the most time. Disk usage covers the data volume, log volume, traces and backup destinations. Data volumes grow automatically but do not shrink on their own, so "used" can be lower than "allocated". The Disk Volume Monitor shows each volume's size and I/O. A full log volume or backup destination is an outage waiting to happen.
| Indicator | Where to see it | Warning sign | First action |
|---|---|---|---|
| Used memory vs allocation limit | Memory Usage card, Memory Analysis | Steady climb toward the limit; table unloads | Find top consumers; check recent loads and large statements |
| Out-of-memory events | Memory Usage card (last 24 hours), memory history | Any OOM in production | Read the OOM trace: which statement, how much memory |
| CPU | CPU card, expensive statements | Sustained high CPU outside known batch windows | Identify the statements or merges driving it |
| Disk and log volume | Disk Usage card, Disk Volume Monitor | Log volume growing, backup destination filling | Check that log backups are succeeding |
| Alerts | Alerts app in SAP HANA cockpit | High-priority alerts open | Work high priority first; tune noisy thresholds |
Alerts
SAP HANA has built-in alert checkers, run by its statistics service, that compare indicators with thresholds and raise alerts with low, medium or high priority. Categories include memory, disk, backup, availability and configuration. Thresholds are configurable, and good teams tune them: an alert that fires every day and is always ignored teaches people to ignore alerts. Memory history in the cockpit depends on the statistics service being active, so check that it is on before you rely on trends.
What would you do?
On Monday morning testers in CMQ report that the first run of a stock report took four minutes; the second run took ten seconds. The cockpit shows no out-of-memory events, but many table unloads over the weekend when a large data load ran. What is the most likely explanation?
- Use SAP HANA cockpit (and DBACOCKPIT from ABAP) for memory, CPU, disk and alerts.
- Judge memory by used memory against the global allocation limit, not by operating-system figures.
- Table unloads are an early warning; out-of-memory events need investigation.
- Watch log volume and backup destinations; failed log backups can stop the database.
- Tune alert thresholds so high-priority alerts are rare and always acted on.
Check your understanding · not graded
Lesson check
1. Which value caps SAP HANA's memory pool?
2. What does SAP HANA do before raising an out-of-memory error?
3. Which disk problem can stop the database from accepting changes?
4. Why tune alert thresholds?