Java ServersBEA WeblogicBEA Weblogic Configuration NotesThe tuning of Weblogic varies slightly with the version being used We recommend using the latest release BEA 9.0 which enables Sun's latest JVM 1.5.0_06. If migration to BEA 9.0 is not possible then use BEA 8.1 SP with JVM 1.4.2_08. Use libumem for BEA: LD_PRELOAD_32=/usr/lib/libumem.so.1 startWebLogic.sh Given below are settings used for applications that services JSP and has about 10 EJBs each with a cache size of about 10000 entries and servicing NN simultaneous requests JVM 1.5.0_06 Options: -server -XX:+AggressiveHeap -XX:ParallelGCThreads=4 -Xmx3g -Xms3g -Xmn800M -XX:LargePageSizeInBytes=4m -XX:-BindGCTaskThreadsToCPUs -XX:MaxTenuringThreshold=3 -XX:SurvivorRatio=20 -Xloggc:/tmp/gc.log -Dweblogic.SocketReaders=10 JVM 1.4.2_08 Options: -server -XX:+UseParallelGC -XX:+AggressiveHeap -XX:ParallelGCThreads=4 -Xms3g -Xmx3g -Xmn800m -Xss128k -XX:LargePageSizeInBytes=4m -XX:-BindGCTaskThreadsToCPUs -XX:PermSize=128m -XX:MaxTenuringThreshold=3 -XX:SurvivorRatio=20 -Xloggc:/tmp/gc.log -Dweblogic.SocketReaders=10 Watch the Garbage Collection (GC) activity via log file (/tmp/gc.log if using the above JVM options) to see if GC is an issue. Tune heap size if necessary (-Xmx, -Xms) to reduce Full GC and or to reduce time spent in Full GC. You can use these additional parameters to get details about GC activity. -XX:+PrintGCDetails -XX:+PrintGCTimeStamps-XX:-TraceClassUnloading Run multiple BEA instances if necessary. Tune worker thread pools to better balance execute queues in the applications. To manually tune the worker threads in BEA 9.1, set the following in config.xml <use81-style-execute-queues>true</use81-style-execute-queues> Enable native io in config.xml Tune JDBC parameters depending on application jdbc connection pool size statement-cache-size Other tunables keep-alive timeout accept-backlog socket-reader-timeout number of socket readers BEA 8.1 Tuning Guide http://e-docs.bea.com/wls/docs81/perform/index.html Other URL http://dev2dev.bea.com/pub/a/2002/10/subramaniam.html IBM WebsphereIBM Websphere Configuration NotesTCP related tunings: ndd -set /dev/tcp tcp_conn_req_max_q 16384 WebSphere Application Server 6.0.2 initialHeapSize= eg. 2048 WebSphere Application Server 6.1 Minimum heap size=2880 MB Maximum heap size=2880 MB Tuning Websphere Application Server 6.1 for UltraSPARC T2 SystemsJBoss On Solaris Best PracticesMemory options Memory requirements are very closely tied to your application, but below are some reasonable default options that should give you a good starting place. This will set up the JVM with 1 GB of memory: -Xms1024m -Xmx1024m -XX:+UseParallelGC -XX:ThreadStackSize=128k Turn off extraneous logging and tomcat dev mode JBoss, by default, is designed to be simple for a developer to use. When you are ready to deploy your application, you should turn off some of the features that are most useful in development.
Use JDK 1.5 If at all possible, you should use JDK 1.5. The garbage collector has been significantly improved and you will often see immediate performance gains. If you can only use JDK 1.4 in your environment, you should change the RMI GC interval. In our experience, the default of 1 minute is much to short for most applications. This will cause a full GC every minute! The following options are the default in recent JBoss releases: -Dsun.rmi.dgc.client.gcInterval=3600000 These options set the GC interval to 1 hour, which is much more reasonable in most cases. The option -XX:+DisableExplicitGC will also prevent the RMI GC's from occurring every minute. Remove unused services If you aren't using some services that JBoss provides you should remove them to free up resources. This is a more advanced topic, but this page has a detailed description of how to do this. Sun Java System Application ServerSun Java System Application Server Configuration NotesUse Sun Java System Application Server 8.2 version. If you are using Sun Java System Application Server 8.1 then we need patch 119167-02 along with Java SE 1.5.0_06. Use libumem for the appserver: LD_PRELOAD=/usr/lib/libumem.so asadmin start-domainUse JVM 1.5.0_06 Java options -server -XX:+AggressiveHeap -Xmx2560m -Xms2560m -XX:LargePageSizeInBytes=256m -XX:ParallelGCThreads=8 -Xss128k May have to tune the GC with -XX:ParallelGCThreads. May need multiple instances depending on application. If you log HTTP access or your application is using XA transactions or MDBs, then separate the access logs, transaction logs and imq files onto as many disks as possible. Mount the disks with these options: nologging,directio,noatime. If you run multiple instances of the application server, move the logs for each instance onto separate disks as much as possible. If the disk becomes a bottleneck then use application server 8.2 feature to write txlogs to a database. If you are using more than one network interface, then you will need to make sure that all the network interrupts are not going to the same core. Put the appserver processes into the FX scheduling class. Tune the thread pool to match the needs of the application. Size the HTTP Thread pool and ORB Thread pool as small as possible for better throughput. Start with 20-30 threads and add more if you see CPU starvation. Size the HTTP acceptors (acceptor-threads) to match the machine. A general rule of thumb to follow is have one acceptor thread per core. Turn off JSP recompilation. Disable access logs, dynamic reloading and autodeploy features. Change the application server log level to WARNING. References |
Companion ProductsHardware ProductsSoftware & SupportUseful Links | |||