sap hana sps09 - sap hana workload management

of 13 /13
1 © 2014 SAP AG or an SAP affiliate company. All rights reserved. SAP HANA SPS 09 - What’s New? SAP HANA Workload Management SAP HANA Product Management November, 2014 (Delta from SPS 08 to SPS 09)

Upload: sap-technology

Post on 02-Jul-2015

705 views

Category:

Technology


9 download

DESCRIPTION

See what's new SAP HANA SPS09 - SAP HANA Workload Management

TRANSCRIPT

Page 1: SAP HANA SPS09 - SAP HANA Workload Management

1 © 2014 SAP AG or an SAP affiliate company. All rights reserved.

SAP HANA SPS 09 - What’s New? SAP HANA Workload Management

SAP HANA Product Management November, 2014

(Delta from SPS 08 to SPS 09)

Page 2: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 2 Public

Disclaimer

This presentation outlines our general product direction and should not be relied on in making

a purchase decision. This presentation is not subject to your license agreement or any other

agreement with SAP.

SAP has no obligation to pursue any course of business outlined in this presentation or to

develop or release any functionality mentioned in this presentation. This presentation and

SAP’s strategy and possible future developments are subject to change and may be changed

by SAP at any time for any reason without notice.

This document is provided without a warranty of any kind, either express or implied, including

but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or

non-infringement. SAP assumes no responsibility for errors or omissions in this document,

except if such damages were caused by SAP intentionally or grossly negligent.

Page 3: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 3 Public

HANA Workload Management – What’s New in SPS09?

Initial Scope (single-server)

• Avoid over-commitments of CPUs

• Avoid uncontrolled memory consumption

• Avoid db-restart, when HANA is not responsive at all

Extended Scope (single-server)

• Resource budgeting (CPU, Memory)

• Execution priority for SQL Statements

Page 4: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 4 Public

Understanding HANA resource pooling (CPU)

HANA Indexserver

Session-Layer Job Executor

“delegate” Job

Worker

Threads

Minor other threads

DSO Activation

simple

statement

Complex statement

(OLAP)

Simple statement

(OLTP)

SQL

Executor

Thread

Pool

Thread

Pool

complex

statement

see also: Session “DMM112 – HANA scalability”

Major Thread-Pools

SqlExecutor

Handle incoming client requests

Execute simple (OLTP-like) statements

JobExecutor

Executes complex statements as

parallelized jobs

Assigns Jobs to available threads

Other threads

In progress: Integration into JobExecutor

Page 5: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 5 Public

Controlling HANA parallelism

indexserver.ini

• SqlExecutor: sql_executors = <min #threads that can be used> (default: # of available threads)

• SqlExecutor: max_sql_executors = <max #threads that can be used> (default: 0 <unlimited>)

• JobExecutor: max_concurrency = <max #threads that can be used> (default: # of available threads)

Important remarks

• JobExecutor settings do not solely affect OLAP workload, but also other HANA subsystems (e.g. memory garbage collection, savepoint writes)

• JobExecutor executes also DBMS operations (e.g. table updates, backups), which were delegated by the SqlExecutor

• JobExecutor settings are soft-limits, i.e. the JobExecutor can “loan” threads, if available, and falls back to the max# when done

Page 6: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 6 Public

Controlling HANA memory consumption

global.ini

• global_allocation_limit =

• <max amount of physical memory that can be used by the db (default: 90% of physical memory)

• statement_memory_limit =

• <max amount of memory that can be used by a single statement> (default: 0 <unlimited>)

• statement_memory_limit_threshold =

• <apply the statement_memory_limit, if the current HANA memory consumption exceeds “statement_memory_limit_threshold %” of the global_allocation_limit>

(default: 0%, i.e. statement_memory_limit is always applied)

Assign statement_memory_limit to a db-user

• ALTER USER <username> SET PARAMETER STATEMENT MEMORY LIMIT = <gb>

Page 7: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 7 Public

Avoid db-restart, when HANA is not responsive

Emergency Support Mode

• Used by the administrator when the HANA db cannot be

reached by SQL due to high load or blocking situations

• HANA studio provides a separate connection to the SAP

start service (sapstartsrv)

• Collect information about connections, blocked

transactions, and threads in the system

• Administrator can cancel individual connections and

transactions, or even cancel all transactions

HANA

sapstartsrv

python

Indexserver

hdbcons

Page 8: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 8 Public

Extended Scope: Resource budgeting (CPU, Memory)

Memory budgeting

global.ini

• global_allocation_limit =

• <max amount of physical memory that can be used by the db> (default: 90% of physical memory)

CPU budgeting

daemon.ini

• section [indexserver], [nameserver], [xsengine], [preprocessor], [compileserver]

• affinity = <core-ids of logical cores in the server>

Page 9: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 9 Public

CPU budgeting and CPU binding – Details

Evaluate the topology of sockets and cores in the server

(use sysfs to collect linux kernel information)

set affinity parameter in daemon.ini per HANA process

(e.g. [indexserver] -> affinity = c0-c7)

(re-)start HANA db

Remarks

• Affinity parameter assigns logical cores (threads) to

HANA processes

• It allows to budget CPU resources to HANA

• It allows to bind HANA processes to cores on the same

socket (NUMA)

• The affinity parameter is not set per default, i.e. all HANA

processes use all logical cores

• Recommendation:

Minimal number of logical cores per process = number of

logical cores of one CPU

• Resource binding and NUMA-aware job execution are

continuous development efforts

Page 10: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 10 Public

Extended Scope: Execution priority for SQL statements

HANA-internal priority for mixed OLAP/OLTP workload

• HANA tries to detect “short-running” OLTP statements to give them a higher internal priority than long-running OLAP statements

• It allows HANA to execute OLTP statements “between” OLAP statements and thereby remain responsive in a mixed workload environment

User-level priority

• user-level priority for all statements in the current connection

• priority is between 0…9, default is 5

• Syntax:

• ALTER USER SYSTEM SET PARAMETER PRIORITY = '9'; -> set to highest priority

• SELECT PRIORITY FROM M_CONNECTIONS WHERE CONNECTION_ID = CURRENT_CONNECTION; -> get priority for current connection

Page 11: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 11 Public

How to find SAP HANA documentation on this topic?

• In addition to this learning material, you can find SAP HANA

platform documentation on SAP Help Portal knowledge center at

http://help.sap.com/hana_platform.

• The knowledge centers are structured according to the product

lifecycle: installation, security, administration, development:

SAP HANA Options

SAP HANA Advanced Data Processing

SAP HANA Dynamic Tiering

SAP HANA Enterprise Information Management

SAP HANA Predictive

SAP HANA Real-Time Replication

SAP HANA Smart Data Streaming

SAP HANA Spatial

• Documentation sets for SAP HANA options can be found at

http://help.sap.com/hana_options:

SAP HANA Platform SPS

What’s New – Release Notes

Installation

Administration

Development

References

Page 12: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Thank you Contact information

Ruediger Karl

SAP HANA Product Management

Ron Silberstein

SAP HANA Product Management

[email protected]

Page 13: SAP HANA SPS09 - SAP HANA Workload Management

© 2014 SAP SE or an SAP affiliate company. All rights reserved. 13 Public

© 2014 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate

company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its

affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and services

are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an

additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or

release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future

developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for

any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-

looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place

undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.