Professional Documents
Culture Documents
Sap Hana For Opentext Content Server 16.2.X: Best Practices
Sap Hana For Opentext Content Server 16.2.X: Best Practices
Version: 16.2.x
Task/Topic Deployment, Administration, Performance
Audience: Administrators
Platform: SAP Hana 2.0
Document ID: 500380
Updated: June 20, 2019
Best Practices
SAP Hana for OpenText Content Server
16.2.x
Michelle Schwan, Database Architect
Contents
Audience ...................................................................................................................... 4
Introduction ................................................................................................................. 5
General Overview of Content Server Database Connections ................................ 6
SAP Hana Setup Best Practices ................................................................................ 7
SAP Hana Database Sizing.................................................................................... 7
CPU Sizing ....................................................................................................... 7
Disk Sizing ....................................................................................................... 7
RAM Size ......................................................................................................... 8
Memory Allocations ................................................................................................ 8
Hardware Configurations ........................................................................................ 9
Disks ................................................................................................................ 9
File system ....................................................................................................... 9
Linux Packages ................................................................................................ 9
Linux Kernel Parameters ................................................................................. 9
Storage Best Practices ........................................................................................... 9
SAP Hana Database Installation Configurations .................................................... 9
Dynamic Tiering ............................................................................................... 9
Scale-Out ....................................................................................................... 10
Installation Options ........................................................................................ 10
Data Volume Management ................................................................................... 10
SAP Hana Configuration Settings ........................................................................... 11
Parameter Settings ........................................................................................ 11
Changing Parameter Settings ........................................................................ 11
File Configurations ................................................................................................ 12
Global.ini ............................................................................................................... 12
Communication .............................................................................................. 12
TCP Backlog ............................................................................................ 12
Execution ....................................................................................................... 12
Job Workers For Database Requests ..................................................... 12
Max Concurrency .................................................................................... 12
Max Concurrency Dynamic Minimum Percentage .................................. 13
Memory Manager ........................................................................................... 13
Allocation Limit ........................................................................................ 13
Global Allocation Limit ............................................................................. 14
Statement Memory Limit ......................................................................... 14
Persistence .................................................................................................... 15
Consistent Change Lock ......................................................................... 15
Enable Auto Log Backup ......................................................................... 15
Log Mode ................................................................................................. 16
Parallel Persistence Garbage Collection ................................................. 16
Indexserver.ini ...................................................................................................... 17
Session .......................................................................................................... 17
Idle Connection Timeout .......................................................................... 17
SQL ................................................................................................................ 17
Plan Cache Enabled ................................................................................ 17
Plan Cache Size ...................................................................................... 18
Statisticsserver.ini ................................................................................................. 18
Memory Manager ........................................................................................... 18
Allocation Limit ........................................................................................ 18
Content Server Installation Options ....................................................................... 19
Performance Tuning Tips ......................................................................................... 21
Statement Memory ............................................................................................... 21
Memory Manager ................................................................................................. 21
Shared Memory .................................................................................................... 21
Monitoring and Benchmarking ................................................................................ 22
Large Memory Usage of Statistics Server ............................................................ 22
Monitoring ............................................................................................................. 22
Consistency Checks ............................................................................................. 22
Identifying Worst-performing Queries .................................................................... 23
Content Server Connect Logs .............................................................................. 23
Performance Analyzer ............................................................................. 23
Blocked Transactions ........................................................................................... 24
Workload Management ........................................................................................ 24
Administration Recommendations ......................................................................... 25
Backup and Recovery .......................................................................................... 25
Appendices ................................................................................................................ 26
Appendix A - References ...................................................................................... 26
Appendix B – SAP Hana Bugs of Interest ............................................................ 27
Appendix C – Troubleshooting Queries ............................................................... 28
Column Table Compression .................................................................... 28
Column Table Memory Usage ................................................................. 28
Heap Memory .......................................................................................... 28
Host Resource Utilization ........................................................................ 29
Long Running Cursors ............................................................................ 29
Row Table Memory Usage ...................................................................... 29
Service Memory....................................................................................... 30
Shared Memory ....................................................................................... 30
SQL Plan Cache ...................................................................................... 31
Statistics Queries..................................................................................... 31
Audience
The document is intended for a technical audience that is planning an
implementation of OpenText™ products. OpenText recommends consulting with
OpenText Professional Services who can assist with the specific details of individual
implementation architectures.
Disclaimer
The tests and results described in this document apply only to the OpenText
configuration described herein. For testing or certification of other configurations,
contact OpenText Corporation for more information.
All tests described in this document were run on equipment located in the OpenText
Performance Laboratory and were performed by the OpenText Performance
Engineering Group. Note that using a configuration similar to that described in this
document, or any other certified configuration, does not guarantee the results
documented herein. There may be parameters or variables that were not
contemplated during these performance tests that could affect results in other test
environments.
For any OpenText production deployment, OpenText recommends a rigorous
performance evaluation of the specific environment and applications to ensure that
there are no configuration or custom development bottlenecks present that hinder
overall performance.
All results in this paper are based on server–side measurements and do not capture
browser rendering of results. Actual timings including client side (e.g. browsers)
timings may vary significantly depending on the client machine specifications, the client
network, browser variations and other conditions of the user’s environment.
4
SAP Hana for OpenText Content Server 16.2.x
Introduction
This document covers best practices for OpenText™ Content Server when SAP Hana
is used as the metadata repository. Recommendations are for SAP Hana 2.0 latest
SPS version.
Most common performance issues can be solved by ensuring that the hardware used
to deploy SAP Hana Server has sufficient CPU, RAM and fast I/O devices, properly
balanced. SAP Hana is an in-memory column storage database and requires large
amounts of RAM and CPU.
Topics here explore non-default options available when simple expansion of resources
is ineffective and discuss some best practices for administration of Content Server’s
database. It concentrates on non-default options, because in general, as a
recommended starting point, Content Server on SAP Hana Server installations uses
default deployment options. Usage profiles vary widely, so any actions taken based
on topics discussed in this paper must be verified in your own environment prior to
production deployment, and a rollback plan must be available should adverse effects
be detected.
All recommendations should be tested and evaluated on a test or staging site and
should be evaluated with respect to your database and site characteristics. Testing
and impact analysis should occur before deployment on a production site and should
be done in adherence to your company’s change management procedures.
These recommendations are not intended to replace the services of an experienced
and trained SAP Hana database administrator (DBA), and do not cover standard
operational procedures for SAP Hana database maintenance, but rather offer advice
specific to Content Server on the SAP Hana platform.
5
SAP Hana for OpenText Content Server 16.2.x
6
SAP Hana for OpenText Content Server 16.2.x
CPU Sizing
A CPU sizing only needs to be performed, in addition to the memory sizing, if an extra-
large number of users are working on a relatively small amount of data.
CPU sizing is user-based. SAP Hana supports 300 SAP Application Performance
Standard (SAPS) for each concurrently active user.
The CPU sizing should be adjusted so that the server load does not exceed 65% on
average.
The minimum recommended for SAP Hana is 8 CPUs.
Calculate SAPS: fully processed order line items per hours * 5%
Maximum number of users per server: SAPS * 65%.
CPU total: CPU Total = SAPS / active users
Disk Sizing
Disk sizing consists of two categories: the Persistence Layer (Data Volume); and the
Disk Log (Log Volume).
By default, SAP Hana writes the data from memory onto the Persistence Layer (Data
Volume) every five minutes.
The Disk Log (Log Volume) saves the log files to ensure that changes are durable.
This is the redo log.
Disk Total = 5 * RAM Total
For scale-out SAP Hana installations, the recommended disk size requirements for
/hana/shared/<SID> (default directory) depends on the number of worker nodes.
Worker nodes, in a scale-out system use a disk space of one RAM per four worked
nodes.
Disk Total = (4 * RAM Total) + (nodes/4 rounded down * RAM Total)
7
SAP Hana for OpenText Content Server 16.2.x
SAP recommends using half of the required disk space for the SAP Hana application.
Note: SAP Hana will most likely take less space than the Data and Log Volumes.
RAM Size
RAM is divided into Static and Dynamic RAM. The static RAM is the amount of main
memory that is used for the column table data. Dynamic RAM is used for new data,
queries and other dynamic objects. The Dynamic and Static RAM should be the same
size.
The minimum amount RAM recommended by SAP Hana is 128GB, however, SAP
recommends that you use the calculation or the SAP Quick Sizer tool to get the correct
amount (see SAP Hana Database Sizing).
The column table data will be compressed automatically. The compression rate is set
at seven. SAP recommends taking half of the size of the disk-based database plus a
20% buffer plus 50GB for other services.
RAM Total = (Disk Size (from above) / 2 * 1.20) + 50 GB
SAP Hana licensing is done by the RAM or is unlimited. Please keep this in mind when
determining the RAM size.
Memory Allocations
Due to the special manner of SAP Hana’s memory management, the usage of
transparent hugepages in Linux may lead to hanging situations and performance
degradations including high CPU usage.
The steps below are for SuSE Linux SLES.
1. Check to see if Transparent Huge Pages are activated. If always is in square
brackets and the output of Kilobytes is greater than 0, then some processes use
THPs.
cat /sys/kernel/mm/transparent_hugepage/enabled
cat /proc/meminfo | grep AnonHugePages
2. Deactivate THP
echo never > /sys/kernel/mm/transparent_hugepage/enabled
3. Prevent THP from activating on reboot with the parameter:
transparent_hugepage=never
a. Add the parameter to the kernel boot line in /etc/default/grub
GRUB_CMDLINE_LINUX="quiet transparent_hugepage=never"
b. Rebuild the /boot/grub2/grub.cfg file
grub2-mkconfig -o /boot/grub2/grub.cfg –BIOS-based
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg –UEFI-
based
c. And/or integrate the parameter within your system boot scripts
8
SAP Hana for OpenText Content Server 16.2.x
Hardware Configurations
Please make sure you follow all the requirements for the hardware for the SAP Hana
server. For more information, see SAP Hana Platform.
Disks
Make use of SSD drives. They have a performance advantage of five to seven times
faster than spinning drives.
File system
SAP recommends using XFS (64-bit journaling file system) for disks holding the data
files and Hana database installation itself.
Linux Packages
SAP recommends updating all the packages installed on the Linux server. Bad
packages or older versions of packages can cause problems with installation and/or
running SAP Hana in both fresh installs and upgrades on major versions.
Dynamic Tiering
SAP Hana can be set up to use Dynamic Tiering. This should be used in the case
where there are billions of rows that are accessed infrequently. These tables of data
do not need to be kept in memory.
9
SAP Hana for OpenText Content Server 16.2.x
Scale-Out
SAP Hana can be installed as a scale-out system. However, SAP recommends that
you avoid scaling-out and scale the machine up. If you require a scale-out system,
SAP recommends that your slave (worker) and/or failover (stand by worker) databases
are configured the same as the master database.
Content Server will function on multi-container and scale-out databases.
Installation Options
When installing SAP Hana, in the system properties, make sure that the Restrict
Maximum Memory Allocation is set to NO (or unchecked in the GUI install). This will
allow SAP Hana to use the maximum memory of your machine and license limit. This
can also be changed after installation, see Memory Manager.
SAP recommends that the SYSTEM user be deactivated after the installation of SAP
Hana. See Content Server Installation Options on how to create a user which can be
used to install Content Server.
For more details on installation, see SAP Hana Server Installation and Update Guide.
10
SAP Hana for OpenText Content Server 16.2.x
Parameter Settings
To determine if there are settings that your tenant and/or container database require,
do the following steps.
1. Get HANA_Configuration_Parameters_~.txt from the
SQLStatements.zip file attached to the SAP Knowledge Base Note 1969700 -
SQL Statement Collection for SAP Hana.
2. Run this script in the container database. Once the suggested results are returned,
review the changes. Some of the suggestions may not be required (i.e. The script
recommends enabling the parameter expensive_statements. This activates a
trace which do you not want as default.).
3. Make the appropriate changes to the container (for more details, see Changing
Parameter Settings).
4. Repeat the steps 2 and 3 for each tenant
11
SAP Hana for OpenText Content Server 16.2.x
File Configurations
These settings are specific to the Content Server database.
Global.ini
Communication
TCP Backlog
Description The tcp_backlog is used for setting the size of connection
backlogs. If many requests are sent in a short timeframe, the backlog
could become full and cause a connection broken error.
Default 128
Recommendation Set this parameter to 2048. If you are still receiving connection
broken errors, increase the size to a maximum of 8192.
Execution
Job Workers For Database Requests
Description The default_statement_concurrency_limit parameter
controls the maximum overall parallelism for a single database
request.
Default 0 – No Limit
Max Concurrency
Description The max_concurrency parameter is the number of CPU threads
overall that can be used by parallelized requests.
12
SAP Hana for OpenText Content Server 16.2.x
Notes Monitor the CPU and if CPU is high for the Tenant database or SAP
Hana, alter this parameter – starting at 50%.
Memory Manager
Allocation Limit
Description The allocation_limit limits the memory consumption of the
related SAP Hana process.
Notes This amount should not exceed the amount declared in the
global_allocation_limit.
Setting the limit to a value above the limit of your license can cause
a database lockdown.
The total of all the tenant limits should equal the container limit, but it
is possible to exceed it.
If the tenant limit is not restricted, it can impact other tenants within
the container.
For more information, see Define Memory Allocation Limits.
Tenant changes must be done at the container level. Example: set
the tenant to 78GB of RAM
ALTER SYSTEM ALTER CONFIGURATION
('global.ini', 'DATABASE', 'CSARC')
SET ('memorymanager','allocationlimit') = '79872'
WITH RECONFIGURE;
13
SAP Hana for OpenText Content Server 16.2.x
14
SAP Hana for OpenText Content Server 16.2.x
Persistence
The Persistence section in the Global.ini file has the information pertaining to the data, log,
backup data, backup log, and table optimization writes.
Default 256 MB
Recommendation A reduction to a smaller value can make sure that the Consistent
Change Lock is released more frequently.
16777216 to 134217728
Default yes
15
SAP Hana for OpenText Content Server 16.2.x
Log Mode
Description The log_mode parameter is how the log segments are treated when
backing up.
Default normal
16
SAP Hana for OpenText Content Server 16.2.x
Indexserver.ini
Session
Idle Connection Timeout
Description The idle connection timeout parameters are set for all of SAP Hana
and specific applications within SAP Hana. These parameters set
the length of idle connections before they are cancelled.
Notes Change the timeout if you are running into timeout errors within
Content Server. Monitor long running cursors after change.
For more details, see How to handle Hana Alert 42.
SQL
Plan Cache Enabled
Description The plan_cache_enabled parameter allows the execution plans
of SQL queries to be parsed and stored.
Default true
17
SAP Hana for OpenText Content Server 16.2.x
Default 2 to 5 GB
The actual size may vary.
Statisticsserver.ini
Memory Manager
Allocation Limit
Description The allocation_limit is the percentage amount of memory
which is the maximum that the Statistics Server will use.
Default 5%
Notes This should be set per tenant as required. For more details, see
Statistics Server runs out of memory.
18
SAP Hana for OpenText Content Server 16.2.x
• For SAP Hana, SAP recommends that you deactivate the SYSTEM account.
The SAP Hana DBA can create the following OTADMIN user for Content
Server to have the ability to create its own user without having all the
permissions of SYSTEM. The user will need to be created in the Tenant
Database which will be used for Content Server.
The OTADMIN user can be added through SAP Hana Cockpit or SAP Hana
Studio.
Create the OTADMIN user SQL:
create user OTADMIN password Welcome1
no force_first_password_change;
Granting permissions to the user is best done through the menus as not all the
permissions can be added through scripts.
Permissions for OTADMIN:
o Package Privileges – Root Package
All the Repo objects grantable to others
o Objects Privileges – Repository_Rest (Sys) - Execute grantable to
others
o Granted Roles – Content_Admin
19
SAP Hana for OpenText Content Server 16.2.x
After the above account has been created the Content Server
administrator can login using the OTADMIN account to create the Content
Server user.
• After installation, the SAP Hana DBA can remove the superuser rights to the
OTADMIN account. The superuser will not be required in any upgrades to
the system.
20
SAP Hana for OpenText Content Server 16.2.x
Statement Memory
Protect SAP Hana from excessive memory usage due to uncontrolled queries by
limiting the amount of memory used by single statement executions per host.
Statement executions that require more memory will be aborted when they reach the
limit.
To trace these statements, turn on resource tracking by changing the parameters listed
in Workload Management in the Content Server tenant database. The trace should
only be turned on when troubleshooting issues.
Memory Manager
The Memory Manager section of the global.ini files contains parameters that allow you
to control the memory consumption of SAP Hana.
The global allocation limit limits the amount of memory that can be used by the
container (in megabytes). The default value is 0 – which uses default settings. The
global allocation limit is calculated by default as: 90% of the first 64GB of available
physical memory on the host + 97% of each further GB.
The allocation limit limits the amount of memory that can be used by an individual
process (in megabytes). The default allocation limit is calculated as above. When the
limit is reached, a dump file is created with compositelimit_oom in the name. The
statement is aborted.
The statement memory limit is applied if the current SAP Hana memory consumption
exceeds the statement memory limit threshold as a percentage of the global allocation
limit.
See setting suggestions in, Memory Manager.
Shared Memory
Shared memory is where system information and row store tables are stored. High
usage in shared memory can cause memory shortage with SAP Hana.
Verify that all tables are column store tables.
It may be necessary to increase system memory.
Note that memory usage can spill between tenants. It may be necessary to have
Content Server on a separate instance from other SAP Hana databases.
21
SAP Hana for OpenText Content Server 16.2.x
Monitoring
The System Monitor provides an overview of all the SAP Hana databases at a glance.
Each database can be drilled down into an individual system in the Administration
editor.
To see the System Monitor views, you must have the MONITORING role.
The Administration editor allows you to identify problems and avoid disruptions.
For more information, see Monitoring in SAP Hana Cockpit or Managing and
Monitoring Performance in SAP Hana Cockpit.
Consistency Checks
SAP Hana recommends that you perform consistency checks on a regular basis to find
any corruptions.
Running these checks can affect performance, so it is recommended to run these
checks on a maintenance window.
For more details, see Table and Catalog Consistency Checks and Technical
Consistency Checks.
22
SAP Hana for OpenText Content Server 16.2.x
Performance Analyzer
OpenText Performance Analyzer is a tool that works with Content Server Logs. This
tool allows you to open connect logs, see the percentage mixture, and see the relative
importance of your site’s usage profile.
The Raw Data tab allows you to sort the transactions by overall execution time and
SQL time. This will show you which Content Server transactions are taking the most
SQL time (not just the individual statements that they issue).
To see the individual SQL statements (from the Raw Data tab), right-click on the line
and select Show SQL. Performance Analyzer will display each SQL statement that the
transaction issues, how long each one took to execute, and how many rows were
affected.
23
SAP Hana for OpenText Content Server 16.2.x
Blocked Transactions
Currently Blocked Transaction Monitoring can only be done through SAP Hana Studio.
They are indicated in the Administration editor on the Performance – Threads tab.
Use the Load Monitor tool to isolate the exact time frame where the issue happened.
From there, investigate what happened at the specific time frame by checking:
_SYS_STATISTICS.HOST_BLOCKED_TRANSACTIONS – analyze the columns
WAITING_SCHEMA_NAME, WAITING_TABLE_NAME, and WAITING_RECORD_ID
SYS.M_DELTA_MERGE_STATISTICS (or _SYS_STATISTICS.HOST_DELTA_
MERGE_STATEMENTS) – columns START_TIME and EXECUTION_TIME provide
information if there was a Delta Table Merge running
SYS.SAVEPOINTS (or _SYS_STATISTICS.HOST_SAVEPOINTS) – check if a
savepoint was written during the time period
Only check entries that have a TOTAL_LOCK_WAIT_COUNT > 0 and compare the
MAX_CURSOR_DURATION against AVG_CURSOR_DURATION. If there is a significant
difference, then the transactions took longer than average.
For more information, see Blocked Transaction Monitoring.
Workload Management
In SAP Hana, it is possible to turn on tracing to monitor memory and CPU issues with
SAP Hana. The trace should only be turned on when troubleshooting issues.
To turn on tracing, change the following parameters:
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM')
SET ('expensive_statement', 'enable') = 'true'
WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM')
SET ('resource_tracking', 'enable_tracking') = 'on'
WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM')
SET ('resource_tracking', 'memory_tracking') = 'on'
WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM')
SET ('resource_tracking',
'service_thread_sampling_monitor_enabled')='true'
WITH RECONFIGURE;
ALTER SYSTEM ALTER CONFIGURATION ('global.ini', 'SYSTEM')
SET ('memorymanager', 'statement_memory_limit') = '12'
WITH RECONFIGURE;
For more details, see SAP Hana Memory and SAP Hana CPU.
24
SAP Hana for OpenText Content Server 16.2.x
Administration Recommendations
This chapter provides recommendations for administering a SAP Hana instance that
hosts a Content Server repository.
25
SAP Hana for OpenText Content Server 16.2.x
Appendices
Appendix A - References
• The page cache of a database is larger than expected (for more details, see
https://launchpad.support.sap.com/#/notes/2403124).
Workaround: Turn off the optimization of keeping column table main persistent
pages in memory (hidden parameter, default True).
ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM')
SET ('persistence','internal_caching_for_main') = 'false'
with reconfigure;
Heap Memory
Description List the used allocators that are responsible for the highest heap
memory consumption (top 15)
Notes Watch to see if the Inclusive Size to close/same as the Exclusive size
Service Memory
Description List the heap (column) and shared (row) memory usage
Shared Memory
Description List the shared memory distribution
Statistics Queries
Description Review information in statistics
Sample – SELECT *
Statistic Alerts FROM _SYS_STATISTICS.STATISTICS_ALERT_THRESHOLDS
WHERE ALERT_ID = 58;
(Plan Cache Size)
About OpenText
OpenText enables the digital world, creating a better way for organizations to work with information, on premises or in the
cloud. For more information about OpenText (NASDAQ: OTEX, TSX: OTC) visit opentext.com.
Connect with us:
32
www.opentext.com/contact
Copyright © 2019 Open Text SA or Open Text ULC (in Canada).
All rights reserved. Trademarks owned by Open Text SA or Open Text ULC (in Canada).