Deploying the Avantra Database and Server

Deploying the Avantra Database

Consider the security recommendations outlined in Avantra Database and install the PostgreSQL database cluster as described in Using a standard PostgreSQL Installation with Avantra.

Database Performance Tuning

If you intend to manage more than 300 SAP systems, please apply the following performance parameters to the postgresql.conf file of your PostgreSQL installation. Use the procedure described in the same document.

For 301 to 1000 managed SAP systems:

max_connections = 100
shared_buffers = 2GB
effective_cache_size = 6GB
maintenance_work_mem = 512MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 20MB
min_wal_size = 2GB
max_wal_size = 8GB
max_worker_processes = 2
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
max_parallel_maintenance_workers = 1

For 1001 to 3000 managed SAP systems:

max_connections = 200
shared_buffers = 4GB
effective_cache_size = 12GB
maintenance_work_mem = 1GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 24MB
min_wal_size = 2GB
max_wal_size = 8GB
max_worker_processes = 4
max_parallel_workers_per_gather = 2
max_parallel_workers = 4
max_parallel_maintenance_workers = 2

For 3001 to 10000 managed SAP systems:

max_connections = 300
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 32MB
min_wal_size = 2GB
max_wal_size = 8GB
max_worker_processes = 8
max_parallel_workers_per_gather = 4
max_parallel_workers = 8
max_parallel_maintenance_workers = 4

Deploying the Avantra Server

Consider the security recommendations outlined in Avantra Server and follow the steps described in Installing the Avantra Server

Adjusting Java Memory Settings

Use the jvm.options files to adjust the maximum Java heap size according to the table in the Sizing section. The maximum heap size is defined by the -Xmx setting.

For the Avantra UI, please adjust /opt/avantra/xangui/cfg/jvm.options

XANGUI_JAVA_ARGS="-Djava.awt.headless=true -Xms256m -Xmx[heap-size]"

For the Avantra Master, please adjust /opt/avantra/master/cfg/jvm.options

MASTER_JAVA_ARGS="-Djava.awt.headless=true -Xmx[heap-size] -Djna.tmpdir=/opt/avantra/master/tmp/jna"

In both examples, replace [heap-size] with the appropriate values.

For step-by-step instructions on how to customize memory usage to suit your needs, see this guide.

Integration with Systemd

You can use the following service files to integrate the Avantra Master and the Avantra UI with the Linux systemd.

For the Avantra Master:

[Unit]
Description=Avantra Master
After=network.target

[Service]
ExecStart=/opt/avantra/master/rc.master start
ExecStop=/opt/avantra/master/rc.master stop
User=avantra
Type=forking
PIDFile=/opt/avantra/master/log/master.pid

[Install]
WantedBy=multi-user.target
  1. Copy the file avantra-master.service to /etc/systemd/system/.

  2. Adapt the entries in the [Service] section if you use a different installation location or a different OS user.

  3. Enable the service: sudo systemctl enable "/etc/systemd/system/avantra-master.service"

  4. Start the service: sudo systemctl start avantra-master

For the Avantra UI:

[Unit]
Description=Avantra UI
After=network.target

[Service]
ExecStart=/opt/avantra/xangui/rc.xangui start
ExecStop=/opt/avantra/xangui/rc.xangui stop
User=avantra
Type=forking
PIDFile=/opt/avantra/xangui/xangui.pid

[Install]
WantedBy=multi-user.target
  1. Copy the file avantra-ui.service to /etc/systemd/system/.

  2. Adapt the entries in the [Service] section if you use a different installation location or a different OS user.

  3. Enable the service: sudo systemctl enable "/etc/systemd/system/avantra-ui.service"

  4. Start the service: sudo systemctl start avantra-ui

If you got the Avantra Server up and running and you have made yourself familiar with it’s operation, you might want to consider adding

Restart=on-failure
RestartSec=10s

to the [Service] section in order to have the service restarted