Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This section describes some recommended performance tuning configurations to optimize the API Manager. It assumes that you have set up the API Manager on Unix/Linux, which is recommended for a production deployment. We also recommend a distributed API Manager setup for most production systems. Out of all components of an API Manager distributed setup, the API Gateway is the most critical, because it handles all inbound calls to APIs. Therefore, we recommend you to have at least a 2-node cluster of API Gateways in a distributed setup.

The values we discuss below are only general recommendations for the API Gateway. They work best when there are 350 to 30000 calls per second to the API Gateway. They might not be the optimal for the specific hardware configurations in your environment. We recommend you to carry out load tests on your environment to tune the API Manager accordingly.

Improvement AreaPerformance Recommendations
API Gateway nodes

Increase memory allocated by modifying /bin/wso2server.sh with the following setting:

  • -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
NHTTP and PT HTTP transports of API Gateway

Set the following in /repository/conf/nhttp.properties file:

  • http.socket.timeout=60000
  • snd_t_core=200 
  • snd_t_max=250 
  • snd_io_threads=16 
  • lst_t_core=200 
  • lst_t_max=250 
  • lst_io_threads=16 

Note that the number of threads should be equal to the number of processor cores .

Key management nodes

Apply the following to get the maximum outcome for login requests.

In <APIM_HOME>/repository/conf/axis2/axis2_client.xml file:

<parameter name="defaultMaxConnPerHost">1000</parameter> 
<parameter name="maxTotalConnections">30000</parameter> 

Mysql maximum connections:

mysql> show variables like "max_connections"; 
 max_connections was 151 
 set to global max_connections = 250; 

Open Files Limit: set to 200000 by editing /etc/sysctl.conf

 

 

CatlinaServer.sh

maxThreads="750" 
minSpareThreads="150" 
disableUploadTimeout="false" 
enableLookups="false" 
connectionUploadTimeout="120000" 
maxKeepAliveRequests="600" 
acceptCount="600" 

 

In <APIM_HOME>/repository/conf/datasources/master-datasources.xml file:

<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>


  • No labels