SAP HANA SQL语句内存使用限制策略

为了保证系统资源使用的公平性,避免单一进程耗尽系统资源,保证系统稳定、持续可用,对HANA资源的使用做限制。

理论知识

By default , single SAP HANA query can consume 100% of available memory. If you want to safeguard your system from uncontrolled expensive queries then it’s a good idea to limit the memory consumption of single statement per host.

Starting HANA SP08 SAP introduced parameter statement_memory_limit to restrict the query at predefined memory consumption limit.

Queries will be aborted with OOM dump (“compositelimit_oom OR [MEMORY_LIMIT_VIOLATION] “😉 ,  if it reaches the limit specified by this parameter – statement_memory_limit .

Requirement: You want to limit query from consuming limitless HANA memory.

Prerequisite:  You need database user with INIFILE ADMIN system privilege assigned.You also need statement memory tracking feature enabled. You need to change following parameters , these parameters do not need restart.

global.ini > [resource_tracking] > enable_tracking = on

global.ini > [resource_tracking] > memory_tracking = on

This will populate the MEMORY_SIZE column of expensive statement trace( M_EXPENSIVE_STATEMENTS)

Step:

  • Connect to HANA system and open SQL console in HANA studio
  • Execute following SQL
隐藏内容需要支付:¥15
立即购买
SAP HANA SQL语句内存使用限制策略

如若转载,请注明出处:https://www.gavindong.com/5720.html

email