AMOS 22.6 AMOS Database Standards

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

AMOS and Database Standards

Version: 22.6
Date: 01.06.2022
© 2022 Swiss Aviation Software Ltd.
1. AMOS & Database Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 AMOS & Database Standards Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 General Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Application Server Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 SAP ASE Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 SAP ASE Installation Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Oracle Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.7 Oracle Installation Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.8 PostgreSQL Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.9 PostgreSQL Installation Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.10 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.11 Document Information AMOS & DB Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3/33

AMOS & Database Standards

SWISS-AS.COM
4/33

AMOS & Database Standards Overview

What's new in the AMOS 22.6 & Database Standards


Changes Chapter

New ASE recommended patch level SAP ASE Hardware Requirements

PostgreSQL configuration update PostgreSQL Installation Defaults

Oracle updated release update Oracle Hardware Requirements

Oracle Installation Defaults

SWISS-AS.COM
5/33

General Remarks
The database server configuration needs to be adjusted to meet the requirements of the AMOS application server.
This documents specifies the hardware resources and parameter settings recommended by Swiss AS for the six
common scenarios mentioned below. The specification in this document is valid for a single AMOS application
server running in a production environment. For multiple AMOS servers some parameters and hardware
specifications have to be adjusted.

The actual hardware sizing and parameter setting in a customer environment might vary dependent on the way this
customer uses AMOS, but should take these standards into consideration.

Sizing Classes
As many settings depend on the size of the customer in terms of concurrent users and managed aircrafts, the
following classes have been used throughout this document:

Size XS S M L XL XXL

Number of Aircraft <10 10-20 20-70 70-300 300-500 >500

Number of online users <50 50-100 100-200 200-300 300-600 600-1500

Note that the number of aircrafts play a more significant role in sizing the hardware.

SWISS-AS.COM
6/33

Application Server Hardware Requirements


The specification is valid for a single AMOS application server in a production environment. Please take the
following notes into account:

for multiple AMOS servers running on the same host, the corresponding parameters have to be cumulated
systems used for release change tests should have similar setup as the production in order to provide
comparable performance
we recommend to keep the free space on applic drive always greater than twice the java memory allocated
to AMOS. This is to avoid the drive to be full in case of a Java heap dump creation.
AMOS uses /tmp as default temporary folder on Linux, it is recommended to allocate enough space on that
folder accordingly depending on the AMOS usage. Having a separate mount point should be considered.

Type XS S M L XL XXL

Number of Aircrafts <10 10-20 20-70 70-300 300-500 >500

Number of online users <50 50-100 100-200 200-300 300-600 600-1500

Hardware Requirements

CPUs (physical or virtual cores) 2 6 8 12 16 16

Memory 6 GB 8 GB 10 GB 10 GB 18 GB 24 GB

Hard Disk Space:

/applic (Linux) or D:\applic (Windows) 50 GB 50 GB 50 GB 50 GB 100 GB 100 GB

/webdrive (Linux) or E:\webdrive (Windows) 100 GB 100 GB 300 GB 300 GB 500 GB 500 GB

SWISS-AS.COM
7/33

SAP ASE Hardware Requirements


The specification is valid for a single SAP ASE instance and a single production database. For multiple databases
within the same SAP ASE instance some DB parameters and hardware specifications have to be adjusted.

Type Description XS S M L XL XXL

Number of Aircrafts <10 10-20 20-70 70-300 300-500 >500

Number of online users <50 50-100 100-200 200-300 300-600 600-


1500

SAP ASE Version ASE 16 SP3 PL11 HF1

Hardware Requirements

CPUs (physical or virtual cores) DBMS 5 5 7 10 14 14

OS 1 1 1 2 2 2

Total 6 6 8 12 16 16

Memory Total 8 GB 8 GB 12 GB 24 GB 48 GB 64 GB

Disk Space

/applic (Linux) or D:\applic 20 GB 20 GB 20 GB 20 GB 20 GB 20 GB


(Windows)

/log (Linux) or E:\log\ (Windows) 10 GB 10 GB 10 GB 20 GB 20 GB 20 GB

/data (Linux) or F:\data\ (Windo 20 GB 40 GB 100 GB 200 GB 300 GB 500 GB


ws)

/backup (Linux) or H:\backup 20 GB 40 GB 100 GB 200 GB 300 GB 500 GB


(Windows)

Total 70 GB 110 GB 230 GB 440 GB 640 GB 1200 GB

SWISS-AS.COM
8/33

SAP ASE Installation Defaults


The following database parameters depend on the size of the AMOS environment in terms of number of maintained
aircraft and amount concurrent users:

Description XS S M L XL XXL

Number of Aircraft <10 10-20 20-70 70-300 300-500 >500

Number of online users <50 50-100 100-200 200-300 300-600 600-1500

max memory 6 GB 6 GB 10 GB 22 GB 44 GB 64 GB

max online engines 5 5 7 10 14 14

syb_default_pool thread count 5 5 7 10 14 14

procedure cache size 2.5 GB 2.5 GB 3.5 GB 5 GB 7 GB 7 GB

default data cache 1 GB 1 GB 3 GB 8 GB 20 GB 30 GB

tempdb cache 500MB 500MB 1000 MB

number of user connections 50 50 100 100 200 200

kernel resource memory 7000 - adapt to shown value if an error message is raised

tempdb data size 1000 MB data 2000 MB data 4000 MB data

tempdb log size 1000 MB

Database parameters that are independent on the size of the AMOS environment:

Installation Defaults

Description Value Remarks

Sybase Directory /applic/sap_ase


(Linux) or D:
\applic\sap_ase
(Windows)

Sybase Port: 5000

Default sa User: sa

Server Page Size 4k


if previous page size
differs, use orginal page
size or migrate the
database

SWISS-AS.COM
9/33

master Device Size 200 MB

master DB Size 100 MB

tempdb Size see size-


dependent
parameters above

tempdb Device Options dsync = false

directio = false

Parameters

Use SQL command


sp_configure "<parameter name>",<value>

to change the following parameters.

max memory see size-


dependent
parameters above

number of user see size-


connections dependent
parameters above

procedure cache size see size-


dependent
parameters above

statement cache 20000

enable literal 1

number of open objects 25000 per AMOS database

number of open indexes 15000 per AMOS database

number of open partitions 15000 per AMOS database

number of locks 100000 per engine dependent on the size of syb_default_pool thread pool
(sp_helpthread) and amount of available CPU cores

lock hashtable size 32768 static parameter

Sybase recomm: number of locks divided by 5 will be


rounded to next higher power of 2

histogram steps 20 Will be multiplied with parameter "histogram tuning factor"


(default: 20)

SWISS-AS.COM
10/33

max online engines see size- static parameter,


dependent
parameters above dependent on the amount of available CPU cores

disk i/o structures max async i/o's per It is slightly more efficient for Adaptive Server to delay the I
engine * max /O because it cannot get a disk I/O structure than because
online engines the I/O request exceeds max i/os per server.

Linux kernel parameter fs.aio-max-nr must be sufficient


to accommodate this value.

max async i/o's per engine 4096 static parameter

max async i/o's per server max async i/o's per static parameter
engine * max
online engines same value as disk i/o structures

allow sql server async i/o 1

number of aux scan 1024


descriptors

disable disk mirroring 0 static parameter

start xp server during boot 0 keep default or reset to default if XP was removed (see
AMOS Installation Guide)

license information 0

number of devices 20

heap memory per user 100000

cpu grace time 3000

SQL Perfmon Integration 0 static parameter, Windows operating system only

event logging 0 Windows operating system only

Monitoring

Requires the following SQL command


grant role 'mon_role' to sa

to enable monitoring

enable monitoring 1

enable spinlock monitoring 1

sql text pipe active 1

SWISS-AS.COM
11/33

sql text pipe max 10000


messages

plan text pipe active 0

statement pipe active 1

statement pipe max 10000


messages

errorlog pipe active 1

errorlog pipe max 10000


messages

deadlock pipe active 1

deadlock pipe max 10000


messages

wait event timing 1

process wait events 1

object lockwait timing 1

SQL batch capture 1

statement statistics active 1

per object statistics active 1

max SQL text monitored 16384 increased so new AMOS HK can display even very long
queries

enable stmt cache 1


monitoring

Advanced Parameters

Use SQL command


sp_configure "<parameter name>",0, "<value>"

to change the following parameters

optimizer level ase_current

optimization goal allrows_oltp

Database Caches

SWISS-AS.COM
12/33

Use SQL command


sp_cacheconfig "<cache name>","<cache size>"

to add a cache or change a cache's size.

Use SQL command


sp_poolconfig "<cache name>","<pool size>","<pool block size>"

to add a cache pool or change a cache pool's size.

default data cache see size-


dependent
parameters above

default data cache pools:

LIO pool (8*pagesize) 20% of cache size

2-page pool (2*pagesize) 100 MB

tempdbcache 1000 MB

tempdbcache pools:

LIO pool (8*pagesize) 20% of cache size

Thread Pools

Use SQL command


alter thread pool syb_default_pool with thread count=<value>

to change the thread pool.

Sybase 15.7: see size- cannot be changed unless static parameter 'max online
syb_default_pool dependent engines' has been increased
thread_count parameters above

Databases Devices

production

device sizes 20000 MB data

2000 MB log

device options directio = true

training

SWISS-AS.COM
13/33

device sizes 4000 MB data

1000 MB log

device options dsync = false

directio = false

delayed commit =
true

Backup Files

production at least 4 stripes dependent on parameter "max online engines"

compression level
3-5 or 101

AMOS Parameters
Parameter Value Remarks

1443 (String) Y / AMOS (default) improve usage of prepared statement

SWISS-AS.COM
14/33

Oracle Hardware Requirements

General requirements
AMOS only supports setup in CDB/PDB architecture. The legacy architecture (valid until Oracle 11gR2) is no
longer supported. Please consider this also during your Database upgrade.

General sizing
This is a general sizing recommendation. Swiss-AS will always issue project-specific hardware requirements
prior to installation.

Type Description XS S M L XL XXL Remarks

Number of <10 10- 20- 70-300 300- >500


Aircrafts 20 70 500

Number of <50 50- 100- 200- 300- 600-


online users 100 200 300 600 1500

Oracle 19c 19.15.0.0.0 or later (SE2 or


Database EE)
Version

Oracle Grid 19c 19.15.0.0.0 or later (SE2 or


Version EE)

Hardware Requirements

CPUs DBMS 1 2 2 4 6 8

OS (0,0) (0,0) (0,0) (0,0) (0,0) (0,0)

Total 1 2 2 4 6 8

(cpu_count - 2 4 4 8 12 16 DB parameter cpu_count =


for info only) Total * 2
represent number
of vcpu in vSphere

Memory Monitoring Agent 0,5 0,5 0,5 0,5G 0,5G 0,5G e.g. AMOSmonitoring
G G G DBagent

OS 3 3 3 3 GB 3 GB 3 GB
GB GB GB

ASM 108 108 108 1088M 1088M 1088M


Memory 8M 8M 8M
(minimal
requirement)

SWISS-AS.COM
15/33

DB Memory SGA_max_size 4G 8G 8G 16G 24G 32G


(minimal
requirement) PGA_aggregate_tar 2G 4G 4G 8G 12G 16G
get

PGA_aggregate_li 4G 8G 8G 16G 24G 32G


mit

Total 14,5 24,5 24,5 45 GB 64,5 84,5 sga_target &


GB GB GB GB GB pga_aggregate_limit includi
ng OS memory

Disk Space

/applic 100 100 100 100 100 GB 100 GB Oracle binaries (DB +
(Linux) or GB GB GB GB GRID) only
(add 100 G more if you plan
D:\applic to upgrade / run in parallel
(Windows) for some time)

ASM AU_SIZE = 4 MB
Diskgroups

+DATA DATA 20 20 40 80 200 200 Data data files


GB GB GB GB GB GB
(40 (40 (40 (40%) (40%) (40%)
%) %) %)

INDEX 15 15 30 60 150 150 Index data files


GB GB GB GB GB GB
(30 (30 (30 (30%) (30%) (30%)
%) %) %)

LOB 15 15 30 60 150 150 LOB data files


GB GB GB GB GB GB
(30 (30 (30 (30%) (30%) (30%)
%) %) %)

UNDO 15 15 30 30 GB 30 GB 30 GB Rollback segment data files


GB GB GB

TEMP 15 15 30 30 GB 30 GB 30 GB Temporary tablespace


GB GB GB

MGMT 20 20 40 50 GB 50 GB 50 GB Management database


GB GB GB (optional)

Total Diskgroup 100 100 200 310 610 610


size

+REDO 5 redo groups with each having one 5 redo groups with each Redo logs
member of 512 MB: 5 GB having one member of
1024 MB: 10 GB

SWISS-AS.COM
16/33

+RECO 300 300 600 1000 2000 2000 Fast recovery area (archive
GB GB GB GB GB GB log, flashback log, rman
backups)

Special Oracle RAC Requirements

General system architecture


No stretched cluster
No host based remote mirroring
Rac 1 Node (active/standby)
No RAC active/active support

Private cluster interconnect


Minimum 1 GBit, 10 GBit/s or Infiniband recommended
MTU 9000
Not shared (dedicated per Cluster)
Igmp snooping active
No gc block lost > 0 at any time

Tablespaces
For TEMP TBS it is advised to have at least as many temp datafiles as there are instances, to avoid I/O congestion.
For later Oracle releases (19c++), a separate UNDO per PDB is needed.

SWISS-AS.COM
17/33

Oracle Installation Defaults

General Notes
The following settings apply to Linux. If you run Oracle Database on a different Operating System settings may be
different. Please contact Swiss AS for details.

Huge Pages:

Always use huge pages if SGA > 4 GB. To calculate the number of huge pages, please use the Oracle provided
hugepages_settings.sh script.

For a detailed how-to please check https://support.oracle.com :

1. HugePages on Oracle Linux 64-bit (Doc ID 361468.1)


2. Oracle Linux: Shell Script to Calculate Values Recommended Linux HugePages / HugeTLB Configuration
(Doc ID 401749.1)

Character Set and Language Setting


The database server's character needs to be AL32UTF8. Language settings will be set on session level by the
application server.

Timezone Setting
Swiss AS recommends to set the database and host timezone to UTC.

Patching

Quartely
Oracle releases patchset bundles every quarter (01 / 04 / 07 / 10: January, April, July and October). Since Oracle
12.2 they are called RUs ("release updates"). It is mandatory to install these patch bundles at least once every 3
quarters. So the maximum gap is no larger than 9 months behind on patches. Customers are advised to patch
every other quarter (= every 6 months) to stay no more than 6 months behind on security, performance and
functionality issues. As always patching has to be applied and tested in a dedicated test environment first and
needs at least 4 weeks to test the implications.

It is recommended to install the April and October patches (04 and 10). Swiss AS does not test and
therefore not support the January or July patches, unless there is a special note requesting the customer
to do so as an exception.

SWISS-AS.COM
18/33

One-off patches
The following one off patches are required for proper AMOS operation. They are mandatory to be installed.

Oracle 12.2.211019 (October 2021 RU GI + DB) (last supported RU) (Oracle 12.2 only supported until AMOS 19.12)

27579159
32356628
32327201

Oracle 19.15 (April 2022 RU GI + DB 33803476):

33956157 (DataPump)
32327201 (Timezone)

JDBC Driver patch no longer required (included in AMOS now)

Oracle Homes
For maintenance, test and predictability reasons, every AMOS installation for each individual environment needs to
be installed into a separate ORACLE home ("DB home"). The GRID home can be shared on a cluster, as long as
the database configuration ensures sufficient resource separation in concurrency situations. The Grid home version
always has to be the same level or newer than the DB home version. It is recommended to have the latest Grid
software in place, even if your database version is not updated to the same level yet, as this will allow a smoother
migration afterwards.

Typical usage example of multiple Oracle home for different environments

Description Value Exampe Remarks

Oracle Base /applic/oracle (Linux) or D:


\applic\oracle (Windows)

Oracle Grid $ORACLE_BASE/<Version> $ORACLE_BASE use Grid >= 19.15.0.0 with 19.15.0.0
Home HAS /grid /19.0.0.0/grid DB software for new-install

Oracle Grid /applic/<Version>/grid, /applic/19.0.0.0/grid


Home RAC

Oracle $ORACLE_BASE/<Version>/db $ORACLE_BASE e.g. Test Environment Oracle 19c


RDBMS _1 /19.15.0.0/db_1 binaries home
Home 1

Oracle $ORACLE_BASE/<Version>/db $ORACLE_BASE e.g. Migration Environment Oracle 19c


RDBMS _2 /19.15.0.0/db_2 binaries home
Home 2

SWISS-AS.COM
19/33

AMOS Parameters
Parameter Value Remarks

1443 (String) NATIVE improve usage of prepared statement

Database Parameters
DB Instance

Parameter Value Remarks

enable_pluggable_da TRUE Create PDB enabled (during CDB creation / DBCA),


tabase 12.1.0.2.0 and newer only

compatible 19.0.0 Set it to the used RDBMS software version supported by


the corresponding AMOS version

processes 1024

log_buffer 134217728

db_block_checksum TYPICAL default

db_lost_write_protect TYPICAL On both primary and standby (only if DataGuard is used).

control_files <+REDO> Use a single controlfile in a high redundancy diskgroup (or


/<db_unique_name> use external redundancy)
/control01.
ctl

audit_trail DB default

audit_sys_operations TRUE

diagnostic_dest $ORACLE_BASE default

db_create_file_dest <+DATA>

db_recovery_file_dest <+RECO>

db_recovery_file_des <+RECO> diskgroup size


t_size (-10 %)

db_block_size 8192 default

fast_start_mttr_target >=300 (Enterprise Edition only)

parallel_adaptive_mu False
lti_user

SWISS-AS.COM
20/33

parallel_execution_m 16384 default


essage_size

Parallel_threads_per 1
_cpu

db_create_online_log <+RECO> diskgroup Check for high redundancy diskgroup (or use external
_dest_1 redundancy)

log_archive_dest_sta ENABLE
te_1

db_unique_name Unique across the


enterprise

_smm_auto_max_io_ 1024 deprecated


size

_parallel_adaptive_m 2 deprecated
ax_users

cursor_sharing FORCE

disk_asynch_io TRUE

memory_target not set

memory_max_target not set

sga_max_size 10240M (minimum / adjust for your individual environment size)

sga_target 10240M (will not show on PDB, only on CDB)

pga_aggregate_target 4096M

pga_aggregate_limit 8192M monitor and increase for higher numer of concurrent users
accordingly
(minimum / adjust for your individual environment size)

log_checkpoints_to_a TRUE
lert

open_cursors 1000

archive_lag_target 3600

RESOURCE_MANA default_plan
GER_PLAN

recyclebin OFF

session_cached_curs 200
ors

SWISS-AS.COM
21/33

use_large_pages ONLY

filesystemio_options SETALL for filesystem installations only (not for ASM)

db_securefiles ALWAYS

commit_wait NOWAIT deprecated. do NOT use.

commit_logging BATCH deprecated. do NOT use.

ASM Instance

Parameter Value Remarks

asm_power_limit 4

audit_sys_operations TRUE

audit_syslog_level local0.info

memory_target (default) no huge pages for ASM

pga_aggregate_target (default)

processes (default)

ASM Diskgroup Attributes

Parameter Value Remarks

compatible.asm 19.0.0.0.0 Set it to the installed GRID Software version

compatible.rdbms 19.0.0.0.0 Set it to the lowest used RDBMS Software version

au_size 4 can only be entered during diskgroup creation time:

asmca -createDiskGroup -diskGroupName ... -au_size 4

Storage configuration

General rule

Use RAID 1-0 (Strip and mirror). Don't use RAID5 or RAID6 for performance reasons.

Setup for flash disks

SWISS-AS.COM
22/33

Tablespace Diskgroup* Usage Block Remarks


size

AMOSDAT_<en +<DATA_<env Data 8192 Actual diskgroup name can differ, this is an
v> >> example only

AMOSIDX_<en Indexes 8192


v>

AMOSLOB_<en LOBs 8192


v>

UNDOTBS1 UNDO, 8192


TEMP,

MGMT Management 8192

+<REDO> Redolog

+<RECO> Restore 8192

RMAN parameters

Parameter Value Example

Controlfile autobackup ON CONFIGURE CONTROLFILE AUTOBACKUP ON;

Retention policy 31 days configure retention policy to recovery window of 31 days;


(if shorter retention policy applies, please modify accordingly)

Data Guard

Parameter Value Remarks

log_archive_dest_1 LOCATION=USE_DB_RECOVERY_FILE_ keep default (not set) if no DG is used


DEST
valid_for=(ALL_LOGFILES,ALL_ROLES)
MAX_FAILURE=1 REOPEN=5
DB_UNIQUE_NAME=<db_unique_name>
ALTERNATE=LOG_ARCHIVE_DEST_2

log_archive_dest_2 location=<data dg> keep default (not set) if no DG is used

valid_for=(ALL_LOGFILES,ALL_ROLES)

DB_UNIQUE_NAME=<db_unique_name>

ALTERNATE=LOG_ARCHIVE_DEST_1

log_archive_dest_state ALTERNATE keep default (ENABLED) if no DG is


_2 used

SWISS-AS.COM
23/33

db_block_checking MEDIUM Set in on standby database, NOT on


primary

SWISS-AS.COM
24/33

PostgreSQL Hardware Requirements


The specification is valid for a single PostgreSQL instance and a single production database. For multiple
databases within the same PostgreSQL instance some DB parameters and hardware specifications have to be
adjusted.

Type Description XS S M L XL XXL

Number of Aircrafts <10 10-20 20-70 70-300 300-500 >500

Number of online users <50 50-100 100-200 200-300 300-600 600-1500

PostgreSQL Database Version 13

Hardware Requirements

CPUs (physical or virtual DBMS 1 5 7 10 14 14


cores)
OS 1 1 1 2 2 2

Total 2 6 8 12 16 16

Memory Total 4 GB 6 GB 12 GB 24 GB 48 GB 64 GB

Disk Space

/applic (Linux) 20 GB 20 GB 20 GB 20 GB 20 GB 20 GB

D:\applic (Windows)

/data/postgres (Linux) 10 GB 10 GB 10 GB 20 GB 20 GB 40 GB

E:\data\ (Windows)

/data/prod (Linux) 20 GB 40 GB 100 GB 200 GB 300 GB 500 GB

F:\data\ (Windows)

/backup (Linux) 20 GB 40 GB 100 GB 200 GB 300 GB 500 GB

H:\backup (Windows)

Total 70 GB 110 GB 230 GB 440 GB 640 GB 1060 GB

SWISS-AS.COM
25/33

PostgreSQL Installation Defaults


Installation Defaults

Description Standard Value Remarks

PostgreSQL /usr/pgsql-13 (Linux)


Installation
Directory D:\applic\postgresql\13 (Windows)

PostgreSQL /data/postgres/13/pg_data (Linux)


Data
Directory E:\data\postgres\13 (Windows)

DB Port 5432

Default postgres
admin user

DB name prod

Schema amos hardcoded

Data amos_prod_data
Tablespace

Index amos_prod_index
Tablespace

Privileged amosserver_prod owner of tablespace: postgres


Login Role
owner of DB and schema:
privileged login

Unprivileged amosuser_prod
Login Role

Parameters

Parameter Value Remarks

Linux: test ! -f /backup/pg_basebackup/current/wal_archive/% if wal_level=replica


f && cp %p /backup/pg_basebackup/current/wal_archive/%f
archive_com
mand
Windows: copy "%p" Windows: replace <TODO> with
"<TODO>\\\\pg_basebackup\\\\current\\\\wal_archive\\\\%f" the backup parition + root folder
(e.g. H:\\\\backup)

Please note that any


subdirectory level has to be
written using 4 backslashes

archive_mode on static, if wal_level=replica

SWISS-AS.COM
26/33

archive_timeo 15 min if wal_level = replica


ut

autovacuum on

autovacuum_
max_workers XS S M L XL XXL

3 3 4 5 5 6

autovacuum_ When autovacuum runs, up to


work_mem XS S M L XL XXL autovacuum_max_workers times
autovacuum_work_mem may be
64 MB 128 MB 128 MB 256 MB 512 MB 512 MB allocated. Avoid OutOfMemory.

(~ 5% of total RAM allocated to


auto vacuum)

autovacuum_ 50
vacuum_thre
shold

autovacuum_ 0.1
vacuum_scal
e_factor

checkpoint_c 0.9
ompletion_tar
get

checkpoint_ti
meout XS S M L XL XXL

300 s 300 s 300 s 600 s 900 s 900 s

default_statist 100
ics_target

effective_cac It should be between 50%


he_size XS S M L XL XXL (normal/conservative) and 75%
(agressive) of RAM memory.
2 GB 3 GB 6 GB 12 GB 24 GB 32 GB

fsync on Can be set to off only on non-


productive environments!

huge_pages try to be configured when system is


running and had some load
already

SWISS-AS.COM
27/33

logging_colle on
ctor

log_autovacu 60 s If you see "index scans: 2" or


um_min_dura any larger value, you are running
tion out of maintenance_work_mem
and should consider increasing
the value.

log_filename postgresql-%Y-%m-%d.log

log_line_prefix '%t [%p]: user=%u,db=%d,app=%a,client=%h' One single log file, no daily


rotation
log_lock_waits on

log_min_mes warning
sages

log_rotation_ 0
age

log_rotation_ 1GB
size

maintenance
_work_mem XS S M L XL XXL

320 MB 320 MB 420 MB 520 MB 620 MB 620 MB

max_connecti static
ons XS S M L XL XXL

25 40 90 90 150 150

max_locks_p 512 static, only for "drop schema


er_transaction amos cascade" prior to
pg_restore

max_wal_sen 10 static, if wal_level=replica.


ders
Can be set to 0 on non-
productive-environments

max_wal_size 4 GB

min_wal_size 2 GB

password_en scram-sha-256
cryption

SWISS-AS.COM
28/33

shared_buffers static, a reasonable starting


XS S M L XL XXL value for shared_buffers is 25%
of the memory in your system
1 GB 1536 MB 3 GB 6 GB 12 GB 16 GB

ssl on

superuser_re 3 static
served_conn
ections

synchronous_ on / local
commit

track_activity 8192
_query_size

track_counts on

wal_buffers -1

wal_compres off
sion

wal_keep_size 1600 MB if wal_level = replica

wal_level replica static.

Can be set to minimal on non-


productive environments, if no
PITR is needed

work_mem 64 MB Max amount of memory per


connection

Backup

Description Value Remarks

WAL archive 100 GB directory /backup


/pg_basebackup

or /backup/pgbackrest

DB dump 100 GB directory /backup/pg_dumps

AMOS Parameters
Parameter Value Remarks

1443 (String) native improve usage of prepared statement

SWISS-AS.COM
29/33

Patching stragtegy
PostgreSQL releases patches 4 times a year (usually February, May, August and November). It is mandatory to
install these patches at least once every 4 quarters. So the maximum gap is no larger than 12 months behind on
patches. Customers are advised to patch every other quarter (= every 6 months) to stay no more than 6 months
behind on security, performance and functionality issues. As always patching has to be applied and tested in a
dedicated test environment first and needs at least 4 weeks to test the implications.

It is recommended to install the May and November patches. Swiss AS does not test and therefore not support the
February or August patches, unless there is a special note requesting the customer to do so as an exception.

SWISS-AS.COM
30/33

Appendix

SAP ASE Configuration


SQL statements:

Increase tempdb size


-- increase tempdb
exec sp_deviceattr tempdb_data1,"directio",false
exec sp_deviceattr tempdb_data1,"dsync",false
exec sp_deviceattr tempdbdev,"directio",false
exec sp_deviceattr tempdbdev,"dsync",false
disk init name="tempdb_log1",physname="/log/tempdb_log1.dat",size="1000M",dsync=false,directio=false
alter database tempdb log on tempdb_log1=1000
exec sp_logdevice tempdb,tempdb_log1
use tempdb
exec sp_dropsegment "default", tempdb, master
exec sp_dropsegment "system", tempdb, master

Cache configuration
-- cache configuration
use master
exec sp_configure "max memory",3072000 -- general parameters
exec sp_cacheconfig "default data cache","4000M" -- caches
exec sp_poolconfig "default data cache","800M","32K"
exec sp_poolconfig "default data cache","100M","8K"
exec sp_cacheconfig "tempdbcache","1000M"
exec sp_poolconfig "tempdbcache","200M","32K"
exec sp_bindcache tempdbcache,tempdb

SWISS-AS.COM
31/33

General parameters
-- general parameters
use master
exec sp_configure "number of user connections",200
exec sp_configure "procedure cache size",512000
exec sp_configure "statement cache",10000
exec sp_configure "enable literal",1
exec sp_configure "number of open objects",25000
exec sp_configure "number of open indexes",15000
exec sp_configure "number of open partitions",15000
exec sp_configure "number of locks",300000 -- 100000 per thread
exec sp_configure "lock hashtable size", 16384
exec sp_configure "histogram steps",20
exec sp_configure "max online engines",3
exec sp_configure "number of engines at startup",3 -- 15.5 and below
alter thread pool syb_default_pool with thread count=3 -- 15.7 and above
exec sp_configure "disk i/o structures",4096
exec sp_configure "max async i/os per engine",4096
exec sp_configure "max async i/os per server",65536
exec sp_configure "i/o polling process count",30 -- only if running in process mode
exec sp_configure "allow sql server async i/o",1
exec sp_configure "number of aux scan descriptors",1024
exec sp_configure "disable disk mirroring",0
exec sp_configure "xp_cmdshell context",0
exec sp_configure "start xp server during boot",1
exec sp_configure "license information",0
exec sp_configure "number of devices",20
exec sp_configure "optimizer level",0,"ase_current"
exec sp_configure "optimization goal",0,"allrows_oltp"
exec sp_configure "heap memory per user",100000
exec sp_configure "cpu grace time", 3000

Monitoring parameters
-- monitoring parameters
grant role "mon_role" to sa
exec sp_configure "enable monitoring",1
exec sp_configure "enable spinlock monitoring",1
exec sp_configure "sql text pipe active",1
exec sp_configure "sql text pipe max messages",10000
exec sp_configure "plan text pipe active",0
exec sp_configure "statement pipe active",1
exec sp_configure "statement pipe max messages",10000
exec sp_configure "errorlog pipe active",1
exec sp_configure "errorlog pipe max messages",10000
exec sp_configure "deadlock pipe active",1
exec sp_configure "deadlock pipe max messages",10000
exec sp_configure "wait event timing",1
exec sp_configure "process wait events",1
exec sp_configure "object lockwait timing",1
exec sp_configure "SQL batch capture",1
exec sp_configure "statement statistics active",1
exec sp_configure "per object statistics active",1
exec sp_configure "max SQL text monitored",16384 -- static!
exec sp_configure "enable stmt cache monitoring",1

Windows operating system only parameters


-- Windows operating system only parameters
exec sp_configure "SQL Perfmon Integration",0
exec sp_configure "event logging",0

SWISS-AS.COM
32/33

SWISS-AS.COM
33/33

Document Information AMOS & DB Standards


Swiss AviationSoftware Ltd.
BSLSAS/CS
P.O.Box, CH-4002 Basel, Switzerland
Tel.: +41 61 582 72 94
Fax: +41 61 582 70 17

©2022 Swiss Aviation Software Ltd.

SWISS-AS.COM

You might also like