Important SAP HANA caches
Cache |
Allocator |
Name in cache framework |
SAP Note |
Purpose |
Analysis command |
Configuration parameters |
Adapter operations cache |
Pool/AdapterOperationCache |
AdapterOperationsCache |
Cache for SDQ operations |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
||
Calculation engine node cache |
Pool/itab |
CalcEngineNodeCache |
Cache for cache node itabs related to planning engine |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
||
Calculation engine model cache |
Pool/CacheMgr/CE_ScenarioModelCache |
CE_ScenarioModelCache (SAP HANA >= 2.0 SPS 03) |
|
Cache for calculation engine models |
SQL: "HANA_CalculationEngine_CalculationScenarios" |
indexserver.ini -> [calcengine] -> max_cache_size_kb |
Column store statistics cache |
Pool/CacheMgr/CS_StatisticsCache |
CS_StatisticsCache |
Scale-out cache for column store table statistics used by optimizer |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
indexserver.ini -> [cache] -> cs_statisticscache_enabled |
|
Currency conversion cache |
Pool/TREXCache/CacheMgr/Currency/UnitConversion_RateQueriesResultCache |
Currency/UnitConversion_RateQueriesResultCache |
Cache for currency conversion rates |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
indexserver.ini -> [businessdb] -> cache |
|
Data statistics adviser cache |
Pool/CacheMgr/DataStatisticsAdviserCache |
DataStatisticsAdviserCache |
|
Cache for CREATE STATISTICS advisory |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
|
Hierarchy cache |
Pool/hierarchyBlob |
HierarchyCache |
Cache for hierarchical queries |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
indexserver.ini -> [cache] -> hierarchies_transactional_cache_enabled |
|
MDX hierarchy cache |
Pool/hierarchyBlob |
MdxHierachyCache |
Cache for hierarchical MDX queries |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
Cache activation / deactivation: indexserver.ini -> [cache] -> hierarchies_transactional_cache_enabled Time after which an entry is marked as stale (in s, default: 14400): indexserver.ini -> [mdx] -> cache_entry_timeout Action for stale entries (0 -> purge when needed, 1 -> purge immediately): indexserver.ini -> [mdx] -> cache_entry_timeout_action |
|
MDX entity cache |
Pool/entityCache |
MdxEntityCache |
Cache for MDX entities |
SQL: "HANA_Memory_Caches_Overview" SQL: "HANA_Memory_Caches_Entries" |
||
Metadata cache |
Pool/Metadata/MetadataCache/MetadataGlobalCacheSlot |
|
Cache for metadata (SAP HANA >= 1.00.120) |
SQL: "HANA_Metadata_Cache" | ||
Page cache |
Pool/PersistenceManager/PersistentSpace/DefaultLPA/Page |
|
SAP HANA file system cache |
SQL: "HANA_Memory_TopConsumers" |
||
Result cache |
Pool/CacheMgr/CS_QueryResultCache[Realtime] Pool/CacheMgr/CS_QueryResultCache[TimeControlled] |
CS_QueryResultCache[Realtime]CS_QueryResultCache[TimeControlled] |
Cache for query results |
SQL: "HANA_Memory_Caches_Overview" |
indexserver.ini -> [cache] -> resultcache_clear_reconfig |
|
Single value cache |
Pool/SingleValueCacheBuilder |
|
Caches values of columns with only one single value |
|
indexserver.ini -> [cache] -> enable_single_value_caching |
|
SQL cache |
Pool/RowEngine/SQLPlan |
|
Cache for prepared SQL statements |
SQL: "HANA_Memory_SQLCache_TopConsumers" |
indexserver.ini -> [sql] -> plan_cache_size | |
System replication asynchronous buffer |
Pool/PersistenceManager/DisasterRecoveryPrimary |
|
Cache for asynchronous system replication |
SQL: "HANA_Memory_TopConsumers" |
<service>.ini -> [system_replication] -> logshipping_async_buffer_size | |
System replication log replay cache |
Pool/PersistenceManager/DisasterRecoverySecondary/ReplayLogCache |
|
Cache used with system replication mode logreplay[_readaccess] for redo log data to be applied on secondary site |
SQL: "HANA_Memory_TopConsumers" |
<service>.ini -> [system_replication] -> logshipping_replay_logbuffer_cache_size | |
Translation table cache |
Pool/JoinEvaluator/TranslationTable |
|
Translation table cache for join column mapping |
SQL: "HANA_Heap_TranslationTables" |
indexserver.ini -> [joins] -> translator_cache_size | |
Static result cache |
Pool/RowEngine/ViewCache (<= 1.0 SPS 11) Pool/ResultCache(for cached view) (>= 1.0 SPS 12) |
|
Static cache for query results |
SQL: "HANA_Memory_StaticResultCache" |
indexserver.ini -> [result_cache] -> before_analytic_privilege indexserver.ini -> [result_cache] -> enabled indexserver.ini -> [result_cache] -> total_size |
|
Dynamic result cache |
Pool/DynamicCachedView Pool/DynamicCachedView/ViewMatching |
|
Dynamic cache for query results |
SQL: "HANA_Memory_DynamicResultCache" |
indexserver.ini -> [result_cache] -> enabled indexserver.ini -> [result_cache] -> total_size |
|
Dynamic tiering relocation cache |
|
|
Cache for dynamic tiering results |
esserver.ini -> [row_engine] -> enable_relocation_cache |
Cache Control
- Cache framework에 속한 Cache이므로 resource manager에 의해서 전체 size는 관리됨
- 개별 Cache는 Size에서 제한이 없기 때문에 만약 충분한 메모리가 주어진다면 Cache는 눈에 띄게 증가할 수 있음
-> 정상 상태로 문제가 되지 않음 - Framework의 cache를 clear 가능 (SPS03부터)
- ALTER SYSTEM CLEAR CACHE ('<cache_id>')
- <cache_id> = M_CACHES.CACHE_ID
- Framework에 속하지 않은 Cache는 파라미터로 관리 됨
- translator_cache_size - Translation table cache
- plan_cache_size - SQL cache
- Cache Framework
- Cache는 다른 방식으로 구현되며 일부는 개별적으로 조회 가능 (heap allocator sizes를 통해서)
- M_CACHES, M_CACHE_ENTRIES를 통해 조회 가능
'Database' 카테고리의 다른 글
[HANA] Indexserver와 SQL Execution (0) | 2019.04.19 |
---|---|
[HANA] SQL Statement Collector (0) | 2019.04.18 |
[HANA] HANA2.0 SPS04 - 요약비교 (0) | 2019.04.18 |
[HANA] HANA 2.0 SPS04 - Backup & Recovery (0) | 2019.04.17 |
[HANA] HANA 2.0 SPS04 - Take-over with Handshake and monitor (0) | 2019.04.17 |