6 Improving Contacts Server Performance

This chapter describes how to tune your Oracle Communications Contacts Server deployment.

Tuning Contacts Server Logging

The Contacts Server logging function is I/O intensive. For optimal performance, decrease the log level to WARNING. Another option is to store the log directory on a fast storage device, such as a solid-state (SSD) system.

To change the log level on the errors and commands log files to WARNING:

  1. Log in as root.

  2. Change to the ContactsServer_home/sbin directory.

  3. Run the following davadmin commands:

    davadmin config modify -o log.dav.errors.loglevel -v WARNING
    davadmin config modify -o log.dav.commands.loglevel -v WARNING
    

Tuning Oracle GlassFish Server

Because Contacts Server runs in an Oracle GlassFish Server container, it is important to correctly tune GlassFish Server. The GlassFish Server items that you tune include the Java Virtual Machine (JVM), JDBC pool, and HTTP settings.

This section provides GlassFish Server tuning recommendations for a medium-sized Contacts Server deployment. Use the following topics to adjust the values for the various configuration settings to suit your deployment:

Tuning Java Virtual Machine Options

The Java Virtual Machine (JVM) runs the byte codes in a compiled Java program. The JVM translates the Java byte codes into the native instructions of the host machine. GlassFish Server is Java process that requires a JVM to run and support the Java applications running on it. JVM settings are part of a GlassFish Server configuration.

You set the JVM options either by using the asadmin command or the GlassFish Server Administration Console.

Use the following JVM option values as a starting point for your Contacts Server deployment:

-XX:+UseParallelOldGC
-XX:ParallelGCThreads=6
-Xms3200m
-XX:MaxPermSize=192m
-server
-Dsun.rmi.dgc.server.gcInterval=1800000
-Dsun.rmi.dgc.client.gcInterval=1800000
-Xmx3200m
-XX:NewRatio=2

Tuning JDBC Pool

A JDBC connection pool is a group of reusable connections for a particular database. Because creating each new physical connection is time consuming, GlassFish Server maintains a pool of available connections.

A JDBC resource is created by specifying the connection pool with which the resource is associated. Multiple JDBC resources can specify a single connection pool. Some common connection pool properties are the database name (URL), the user name, and the password.

You administer the JDBC Pool settings by using the GlassFish Server asadmin command.

Use the following JDBC option values as a starting point for your Contacts Server deployment:

max-pool-size=200
cachePrepStmts=true
prepStmtCacheSize=512

Tuning HTTP Service and Listener

Tuning the monitoring settings for the HTTP server instances that handle client requests is important for ensuring peak GlassFish Server performance. You can enable or disable monitoring statistics collection for the HTTP service by using either the Administration Console or asadmin subcommands.

See the topic on administering the monitoring service in Oracle GlassFish Server Administration Guide for more information.

Table 6-1 shows the GlassFish Server HTTP service tuning settings to use as a starting point.

Table 6-1 HTTP Service Tuning

HTTP Setting Attribute Value

keep-alive

max-connections

250

NA

timeout-in-seconds

30

request-processing

header-buffer-length-in-bytes

16384

NA

request-timeout-in-seconds

20

NA

thread-increment

10

connection-pool

max-pending-count

4096

NA

queue-size-in-bytes

4096

NA

receive-buffer-size-in-bytes

4096

NA

send-buffer-size-in-bytes

8192


Table 6-2 shows the HTTP listener tuning settings to use as a starting point.

Table 6-2 HTTP Listener Tuning

HTTP Listener Setting Value

acceptor-threads

1

accessLoggingEnabled

false

xpowered-by

false


Tuning Oracle WebLogic Server

The WebLogic Server configuration described in this section is for a medium-sized deployment. Adjust the values according to your deployment. You should perform modifications in the managed domain in which Contacts Server is deployed.

Tuning JVM Options for WebLogic Server

For details about setting the JVM options in Oracle WebLogic Server see the discussion about setting Java parameters for starting WebLogic Server and specifying Java options for a WebLogic Server instance in the following documents:

JVM options:

-XX:+UseG1GC
-XX:ParallelGCThreads=6
-Xms3200m
-XX:MaxPermSize=192m
-server
-Dsun.rmi.dgc.server.gcInterval=1800000
-Dsun.rmi.dgc.client.gcInterval=1800000
-Xmx3200m
-XX:NewRatio=2

Tuning JDBC Pool for WebLogic Server

WebLogic Server instance uses a self-tuned thread-pool. The best way to determine the appropriate pool size is to monitor the current size of the pool, shrink counts, grow counts, and wait counts.

Configure the parameters related to JDBC Pool using WebLogic Administration Console:

  1. Log in to WebLogic Server Administration Console.

  2. Click Lock & Edit.

  3. From the Domain Structure section, click the domain name. For example, domain1.

  4. Navigate to Services and then Data Sources.

    JDBC Datasources - defaultbackend is displayed in the Configuration tab.

  5. Select the JDBC Data Source name from the list, navigate to the Connection Pool tab, and then perform the following modifications:

    • Change the value of Initial Capacity to 200. The default value is 1.

    • Change the value of Maximum Capacity to 200. The default value is 15.

    • Change the value of Statement Cache Size to 512. The default value is 10.

      Note:

      Setting the size of the statement cache to 0 turns Off the statement caching. Therefore, setting this parameter to a non-zero value is equivalent to setting cachePrepStmts=true in GlassFish Server.
  6. Click Save.

  7. Click Activate Changes.

  8. Restart WebLogic Server Administration Server and Managed server.

    Note:

    For more information, see the discussions about self-tuning thread pool, tune the number of database connections, tune pool sizes, and tuning data sources in the Oracle WebLogic Server documentation.

Tuning HTTP Service and Listener for WebLogic Server

WebLogic Server is enabled with self-tuning for most of the HTTP parameters. Ensure that the following parameters are set by default. If the parameters are not set, you can set them using the WebLogic Server Administration Console.

  1. Log in to WebLogic Server Administration Console.

  2. From the Domain Structure section, click the domain name.

  3. Click Environment, Servers, Managed Server Name, and Tuning tab.

    Note:

    The Enable Native IO option is selected by default.

    You should set the Accept Backlog value to 300.

  4. Select Environment, Servers, Managed Server Name, Tuning Tab, and Advanced section.

  5. Set the Self-Tuning Thread Minimum Pool Size value to 1 and Self-Tuning Thread Maximum Pool Size value to 400.

  6. Select Environment, Servers, Protocols tab, and then HTTP tab.

    Note:

    The Keep-Alive option is enabled by default.
  7. Select Services, Messaging, and JMS Servers.

  8. Click JMS Server that Contacts Server has created. For example, JMSServer-DAV.

  9. Navigate to the Configuration tab, General tab, Advanced section, and verify the following:

    • Message Buffer Size: -1, which indicates that the server automatically determines a size based on the maximum heap size of JVM. This default value is set to either one-third of the maximum heap size or 512 megabytes, whichever is smaller.

    For more information, refer to Fusion Middleware Tuning Performance of Oracle WebLogic Server.

Tuning MySQL Server

For MySQL Server, configure the parameters that affect cache size and maximum connection size. For example, use the following values as a starting point:

back_log = 50
max_connections = 200
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
thread_concurrency = 8
query_cache_size = 64M
query_cache_limit = 2M
ft_min_word_len = 4
memlock
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 64M
log-bin=mysql-bin
expire_logs_days=1
binlog_format=mixed
slow-query-log = 1
long_query_time = 2
log_long_format
tmpdir = /tmp
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 2G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_flush_method=O_DIRECT #UFS only

See MySQL Server Administration for more information on how to change these settings.

Caution:

You can view contents of the back-end store by using standard MySQL tools. Do not use MySQL tools to modify your data.

Tuning Oracle Solaris CMT Server

This section provides tuning recommendations for Chip Multi-threading (CMT) architectures such as Sun servers with CoolThreads technology.

Set the following parameters and values in the /etc/system file.

set rlim_fd_max=260000 
set hires_tick=1 
set sq_max_size=0 
set ip:ip_squeue_bind=0 
set ip:ip_squeue_fanout=1 
set ip:ip_soft_rings_cnt=16  

Set the following parameters for TCP tuning:

ndd -set /dev/tcp tcp_time_wait_interval 60000 
ndd -set /dev/tcp tcp_conn_req_max_q 3000 
ndd -set /dev/tcp tcp_conn_req_max_q0 3000 
ndd -set /dev/tcp tcp_max_buf 4194304 
ndd -set /dev/tcp tcp_cwnd_max 2097152 
ndd -set /dev/tcp tcp_xmit_hiwat 400000 
ndd -set /dev/tcp tcp_recv_hiwat 400000    

For Sun Fire T1000 and T2000 systems with 1.0GHz CPU, interrupt fencing by setting the following parameter:

psradm -i 1-3 5-7 9-11 13-15 17-19 21-23

For ZFS, set the recordsize variable to 16 K (same as innoDB block size) by running the following commands:

zfs create rpool/data
zfs set recordsize=16K rpool/data

Tuning Reference

Use the following documentation to find more information on tuning GlassFish Server, MySQL Server, and network performance for Contacts Server: