+

Search Tips   |   Advanced Search

Tuning

Optimize the MobileFirst Server configuration by tuning the allocation of Java virtual machine (JVM) memory, HTTP connections, back-end connections, and internal settings.

The MobileFirst Server works with three application servers:

For best results, install MobileFirst Server on a 64-bit operating system, and use only 64-bit software.


JDK

The MobileFirst Server can run on IBM JDK or Oracle JDK. Note, however, that when using a Liberty Profile Application Server, performance with Oracle JDK is 15% higher than with IBM JDK.


JVM memory allocation

The Java instance of the application server allocates memory. Consider the following general guidelines for JVM memory allocations:

For information about how to calculate memory size, see the Scalability and Hardware Sizing document and the hardware calculator spreadsheet.


Tune HTTP connections

This configuration defines threading and execution settings for the application server.

Each incoming request requires a thread for the duration of that request. If more simultaneous requests are received than can be handled by the currently available request processing threads, then additional threads will be created up to the configured maximum.

Specific application server configuration:

Bear in mind the following points when we configure HTTP threads:


Tune database connections

In tuning database connections, the most important parameter is the number of connection threads from the server to the database. This configuration is made in the data source. There are two IBM MobileFirst Platform Foundation features that rely heavily on the database: SSO (single sign-on) and reports. When using these features, we must ensure we have enough database connection threads. The only limitation is that each node in the MobileFirst Server cluster can have no more than MAX_DB_INCOMING_CONNECTIONS/NUM_OF_CLUSTER_NODES connection threads, where MAX_DB_INCOMING_CONNECTIONS is the maximum incoming connections defined in the database server and NUM_OF_CLUSTER_NODES is the number of MobileFirst Server nodes in the cluster. A rough rule of thumb is to set the number of database connections to be the number of HTTP threads in the application server, as long as you maintain the limitation above.

Each incoming request uses a thread. If more simultaneous requests are received than can be handled by the currently available request-processing threads, more threads are created up to the configured maximum.

For data source configuration, check the following:


Tune back-end connections

maxConcurrentConnectionsPerNode

The maxConcurrentConnectionsPerNode parameter defines the maximum number of concurrent calls to the back-end service from the MobileFirst Server node. This maxConcurrentConnectionsPerNode parameter is set in the <connectionPolicy> element of the adapter XML file.

Start from IBM MobileFirst Platform Foundation v6.3, all requests to the back-end remain on the HTTP thread. The MobileFirst Server does NOT allocate a new thread for the backend request. The only use of maxConcurrentConnectionsPerNode is for blocking the number of connections to the HTTP back-end. The implication is we can specify a large value for maxConcurrentConnectionsPerNode (for example, 5000), so as not to limit the back-end calls.

Handling slow backend servers

If the backend server is slow, increase the values for your server settings, in particular the following:

  • Number of HTTP threads in the application server: For a backend that responds in 750 ms, for example, 3000 HTTP threads is recommended.

  • maxConcurrentConnectionsPerNode in the adapter XML file: For a backend that responds in 750 ms, for example, 3000 is recommended.

  • OS settings: Increase the number of open files. 4096 is the recommended number.

  • Clients threads: A good rule of thumb is 2900 JMETER clients threads.

  • Backend server: 3000 threads is recommended.


Push Notifications

For push notification information see the Push Notification section in the Scalability and Hardware Sizing document and the hardware calculator spreadsheet.


Analytics

For Analytics Server configuration see the Analytics section in the Scalability and Hardware Sizing document and the hardware calculator spreadsheet.


MobileFirst Server internal configuration

Consider the following factors:


Intervals for background tasks

The following worklight.properties parameters control the intervals at which background tasks. Background tasks perform several actions on the database and/or file system:

sso.cleanup.taskFrequencyInSeconds

The SSO (single sign-on) mechanism stores session data in a database table. This parameter is the interval for the SSO cleanup task to check if there are inactive accounts in the SSO table. If any are found, it deletes them. Default is 5 seconds, meaning that every 5 seconds, the database is checked for inactive accounts. An inactive account is one that has remained idle for longer than the value of the serverSessionTimeout property.

push.cleanup.taskFrequencyInSeconds

Deletes inactive push notification subscriptions. The default is 60 minutes. This parameter is currently implemented only for Apple APNS.


Parent topic: Configure MobileFirst Server