Middleware Tuning

Middleware can be roughly divided into six categories: terminal emulation, screen conversion middleware, data access middleware, remote procedure call middleware, transaction middleware, and object middleware. This analysis takes WebSphere as an example. The performance is as follows:

1. Connection pool:

      A technique for creating and managing connections and buffer pools for use by threads that need them.

      Reduced connection creation time, simplified programming model, controlled resource usage

      The connection pool setting should be appropriate, not the bigger the better, it needs to be adjusted according to the actual situation

2. Thread pool

      The web container thread pool is not as big as possible, and needs to be adjusted according to the actual situation

      The thread pool setting is too large. Although the thread pool setting is too large, it can solve the problem of thread blockage or deadlock, but the subsequent problem is that the thread pool setting is too large, resulting in excessive maintenance overhead. It needs to be traversed from beginning to end, and when the thread is blocked, things will start another thread to work. When the number of blocked threads increases to a certain number, the system resources occupied by these threads are very considerable.

3、JVM

     The optimal heap size settings are not necessarily the same for different applications:

     If the heap setting is too large, it will occupy too much memory resources and exhaust memory resources, so that IO operations will be performed frequently to use virtual memory.

     If the heap setting is too small, the space allocated by the object will become smaller, so that the garbage collection mechanism will be frequently used to release the memory space, and each garbage collection will consume a certain amount of system resources.

      By monitoring the data, the set heap size can make the program run optimally.

4. Cache

      Storing data frequently needed by the system in the cache can speed up data loading

      Cache can be divided into servlet cache and object cache, servlet cache includes: class, jsp, servlet, portal

      Caching can be implemented through program calls, configuration files.

     You can use WAS's servlet caching mechanism to relieve server pressure

      This can be achieved by writing a Cachespac.xml configuration file and defining policies

                   

     

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326310598&siteId=291194637