Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 Set the following in <APIM_HOME>/repository/conf/axis2/axis2_client.xml file:

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

Mysql Set the MySQL maximum connections:

Code Block
languagehtml/xml
mysql> show variables like "max_connections"; 
 max_connections was 151 
 set to global max_connections = 250; 

Open Files Limit: set Set the open files limit to 200000 by editing the /etc/sysctl.conf file:

Code Block
sudo sysctl -p

Set the following in CatlinaServer.sh batch file:

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

In Set the following connection pool elements in <APIM_HOME>/repository/conf/datasources/master-datasources.xml file:

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

Note that you set the <testOnBorrow> element to true and provide a validation query (e.g., in Oracle, SELECT 1 FROM DUAL), which is run to refresh any stale connections in the connection pool. For better performance, set a suitable value for the <validationInterval>. It determines the time period after which the validation query will be run, and ensures that the validation query won't be run every time a connection is retrieved.