SAP HANA Core Architecture: Services, Daemons & Process Hierarchy
An exhaustive architectural breakdown of SAP HANA internal processes: hdbdaemon, hdbnameserver, hdbindexserver, hdbcompileserver, hdbpreprocessor, hdbwebdispatcher, and their interaction with sapstartsrv and SAP Host Agent.
Core Learning Objectives
- 1.Master the role, binary names, and memory footprints of every HANA operating service.
- 2.Understand the parent-child relationship anchored by sapstartsrv and hdbdaemon.
- 3.Explain the Compile Server evolution from HANA 1.0 to HANA 2.0 (integrated vs separate).
- 4.Diagnose service crash patterns and automatic service restart loops.
Definition & Architectural Rationale
Technical Definition:
SAP HANA is a multi-process architecture orchestrated by the SAP Start Service (sapstartsrv) and the HANA Watchdog Daemon (hdbdaemon), which supervise individual dedicated engine processes executing specific data storage, compilation, and coordination tasks.
Why this component exists:
Modularizing database functions into distinct Unix daemon processes ensures fault isolation, specialized memory allocation pools, and independent scaling. For example, query compilation spikes in compileserver do not corrupt the transactional memory heaps of the indexserver.
Internal Working & Mechanics
Architecture Flow Diagram
Production SQL Diagnostics
Provides live health, CPU percentage, active process IDs, and memory consumed by each service in the instance.
Key Diagnostic Columns
SERVICE_NAME:Process name (nameserver, indexserver, etc.)PROCESS_ID:Operating system Linux PIDSQL_PORT:Port for client SQL connections (0 if service accepts no SQL)RESIDENT_MEM_GB:Physical RAM held by this processALLOC_LIMIT_GB:Hard limit the service can consumeExpected Diagnostic Output
HOST | PORT | SERVICE_NAME | PROCESS_ID | SQL_PORT | COORDINATOR_TYPE | CPU_PCT | RESIDENT_MEM_GB | ALLOC_LIMIT_GB ------------------------------------------------------------------------------------------------------------------------- hana01 | 30001 | nameserver | 4812 | 30013 | MASTER | 1.2 | 4.10 | 58.00 hana01 | 30003 | indexserver | 4890 | 30015 | MASTER | 14.5 | 184.20 | 220.00 hana01 | 30002 | preprocessor | 4830 | 0 | NONE | 0.0 | 1.15 | 20.00 hana01 | 30010 | compileserver | 4855 | 0 | NONE | 0.1 | 2.30 | 30.00
Linux Terminal Diagnostics & Operations
Terminal Standard Output (stdout):
USER PID PPID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND hdbadm 4510 1 0.0 0.0 120500 4210 ? S 06:00 0:01 sapstartsrv pf=/usr/sap/HDB/SYS/profile/HDB_HDB00_hana01 hdbadm 4800 4510 0.0 0.1 245000 8910 ? S 06:01 0:02 hdbdaemon hdbadm 4812 4800 0.5 1.2 8920100 410200 ? Sl 06:01 1:45 _ hdbnameserver hdbadm 4830 4800 0.0 0.3 3410200 115000 ? Sl 06:01 0:12 _ hdbpreprocessor hdbadm 4855 4800 0.1 0.5 4120300 230100 ? Sl 06:01 0:30 _ hdbcompileserver hdbadm 4890 4800 4.2 46.1 298010000 184200000 ? Sl 06:01 42:10 _ hdbindexserver -port 30003
Terminal Standard Output (stdout):
23.10.2026 08:15:20 GetProcessList OK name, description, dispstatus, textstatus, starttime, elapsedtime, pid hdbdaemon, HDB Daemon, GREEN, Running, 2026 10 23 06:01:10, 2:14:10, 4800 hdbcompileserver, HDB Compileserver, GREEN, Running, 2026 10 23 06:01:12, 2:14:08, 4855 hdbnameserver, HDB Nameserver, GREEN, Running, 2026 10 23 06:01:10, 2:14:10, 4812 hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2026 10 23 06:01:11, 2:14:09, 4830 hdbindexserver, HDB Indexserver - HDB, GREEN, Running, 2026 10 23 06:01:15, 2:14:05, 4890
Troubleshooting & Root Cause Analysis
Production Best Practices & Operational Risks
Mandatory Best Practices
- Use HDB stop or sapcontrol -nr <NR> -function StopSystem HDB to execute orderly shutdowns that flush redo logs and complete active savepoints.
- Configure [memorymanager] statement_memory_limit in tenant indexserver.ini to prevent rogue queries from taking down the entire indexserver process.
Risks & Common Gotchas
- Killing hdbdaemon (kill -9) will kill all child services immediately without graceful savepoint creation!
- Never kill indexserver with kill -9 in production unless system is completely unrecoverable, as it forces crash recovery during next startup.