This is obtained from the engineer of the BEA, and I will share it for everyone.
WebLogic Server 8.1
Performance Tuning Guide
1 Understand the goal of performance
Q users, number of requests, allowable response time
Q CPU, memory, network, etc.
2 tuning operating system
Q Solaris tuning
o NDD -SET / DEV / TCP TCP_TIME_WAIT_INTERVAL 60000, the shutdown of the Socket is shortened by 60 seconds (default is 240 seconds)
O Solaris 2.7, TCP_TIME_WAIT_INTERVAL naming is TCP_Close_Wait_Interval
o Other parameters adjustable with NDD -SET
Parameter Recommended value / dev / tcp tcp_time_wait_interval60000 / dev / tcp tcp_conn_req_max_q16384 / dev / tcp tcp_conn_req_max_q016384 / dev / tcp tcp_ip_abort_interval60000 / dev / tcp tcp_keepalive_interval7200000 / dev / tcp tcp_rexmit_interval_initial4000 / dev / tcp tcp_rexmit_interval_max10000 / dev / tcp tcp_rexmit_interval_min3000 / dev / tcp tcp_smallest_anon_port32768 / dev / TCP TCP_XMIT_HIWAT131072 / DEV / TCP TCP_RECV_HIWAT131072 / DEV / TCP TCP_NAGLIM_DEF1 / DEV / CE Instance0 / DEV / CE RX_INTR_TIME32
o You can edit the parameter setting of / etc / system
Parameter Recommended value set rlim_fd_cur8192set rlim_fd_max8192set tcp: tcp_conn_hash_size32768set shmsys: shminfo_shmmaxNote: This should only be set for machines that have at least 4 GB RAM or higher.4294967295set autoup900set tune_t_fsflushr1
o Solaris 8 Reference DOCS.SUN.COM/DB/doc/816-0607
o Solaris 9 Reference DOCS.SUN.COM/db/doc/806-7009
q HP-UX tuning
o See DOCS.HP.com/hpux/onlinedocs/tkp-90203/tkp-90203.html
o Java performance adjustment See h21007.www2.hp.com/dspp/tech/tech_techdocumentdetailpage_idx/1,1701,1602,00.html
Q AIX tuning
o See publib16.boulder.ibm.com/pseries/en_us/aixbman/prftungd/prftungd02.htm
Q Linux tuning
o can be adjusted MTU, / SBIN / IFCONFIG LO MTU 1500
O can also see Ipsysctl-tutorial.frozentux.net/ipsysctl-tutorial.html
Q Windows tuning (usually, the default setting is available)
See www.microsoft.com/windows2000/techinfo/howitworks/communications/networkbasics/tcpip_implement.aspo o or www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/windows2000serv/maintain/optimize/perftune .asp
3 optimize database
Q overall
o Database design, including across disk load balancing, organization and size, index, log, etc.
o Disk I / O optimization, including limit I / O, increase buffer, etc.
o Control the CheckPoint frequency. Some databases can, such as Oracle, some can't, such as SQL Server 7
Q Oracle Tuning (version 8.1.7)
o The number of service processes, the method of checking is Select Name, Value from V $ Parameter Where Name = 'Processes';
o Share the pool size, check the pool The current usable value method is SELECT * from V $ SGASTAT WHERE Name = 'Free Memory' and pool = 'shared pool';
o Maximum opening of the cursor, the method of checking is SELECT NAME, VALUE from V $ sysstat where name like 'Opened Cursor%';
o Data block size, check method is SELECT NAME, VALUE from V $ Parameter where name = 'db_block_size';
Q SQL Server Tuning
o Position Tempdb on a fast I / O device
o If performance monitoring shows I / O frequency speed, you can increase recovery interval
o uses a data block size of 2KB or more
Q Sybase Tuning
o Appropriately increase recovery interval
o uses a data block size of 2KB or more
4 Determine the setting of the Java virtual machine
Q Sun JDK
O-Server, -client, -xms, -xmx, -xx: newsize, -xx: maxnewsize, -xx: survivorratio, -xx: useism, -xx: aggressiveHeap
Other parameters of Q Sun JVM See java.sun.com/docs/HOTSPOT/VMOPTIONS.HTML
q Jrockit JDK
O -XMS, -XMX, -XNS, -XGC: Parallel, -xxenablefatspin
Q Pile values are 80% of the system remaining memory
Q -XX: Newsize, -xx: maxnewsize is 1/4 of the heap size, and the amount increase in the multi-CPU environment.
Q -XX: Survivorratio can be set to 8
Q Do not generate GC in the Benchmark, observe the method of GC
o Windows, Solaris: ... -verbosegc ... >> log.txt 2> & 1
o HP-UX, -xverbosegc: file = / tmp / gc $$. OUT
o BEA JROCKIT: -XGCREPORT
o Calculate the frequency of GC through the log timestamp
o Observe the GC time consuming, don't exceed 5 seconds O GC, the available memory should not grow too much.
5 Adjust the parameters of WebLogic Server
q Adjust the number of threads, threads, and single response time
q Activate Native Pack
q Adjusting Backlog Buffer
o TCP layer can maintain the maximum number of connections, default 50
o If the client can't connect to WebLogic Server, you can adjust the value.
q Customize the queue, assign servlets, jsps, ejbs to the execution queue
o Assume the key to use high performance operation
o Limits resources for non-critical applications
o Prevent death locks
o JSP, servlet example (web.xml)
o EJB example (WebLogic-ejb-jar.xml)
WebLogic-Enterprise-Bean>
o RMI object example
Java WebLogic.rmic-DispatchPolicy CriticappQueue ...
Q When using the connection pool, INITIALCAPACITY and MaxCapacity should be consistent, and the value of MaxCapacity should be larger than the thread.
Q Set the SQL statement cache
q Assign Application-Level Caching, Example (WebLogic-Application.xml)
max-cache-size>
Entity-Cache>
ejb>
WebLogic-Application>
q Adjust the Java compiler
O via admin console, configuarion à general à java compiler and configuration à general à advanced options à append to classpath
o JSP-Descriptor parameters through WebLogic.xml, CompileCommand and Precompile
6 Monitor disk and CPU usage, including application servers and database servers Q Solaris and Linux
o Disk, iostat -d
o CPU, iostat
Q Windows
o Perfmon
Q If the database CPU utilization is too high, consider the design of the index; if the disk utilization is 100%, a faster disk or RAID can be considered.
q WebLogic Server I / O bottleneck
o JMS File Store Write, Transaction Log, HTTP Log, Server Log
o Try to prohibit synchronous JMS write operation, increase HTTP log buffer and other methods
7 monitoring data transmission on the network
q Determine the amount of transport data between the client and the server, the server and the database
q Use the command netstat -s -p tcp to see if there is Retransmission's occurrence
8 check frequent standard output or log
q Reduce log operations, turn off system.out.println statement
9 bottleneck for positioning applications
Q If the disk and the network are not bottleneck, the CPU utilization rate of the server is low, there may be a lock conflict
q Use JPROBE or OPTIMIZEIT detection system bottleneck
After the Q server CPU utilization reaches 100%, you can continue to use Jprobe or Optimizeit tuning
10 adjustment application
Q EJB
o WebLogic-ejb-jar.xml description
Initial-beans-in-free-pool default 0max-beans-in-cache facing Stateful Session Bean and Entity Beans, affecting active and passivation Max-Beans-in-Free-Pool For Session Beans, MDB, can reduce instantiation Overhead; for Entity Beans, for the Finder and Home methods. Generally do not need to be modified, default value 1000
o Monitor EJB, Pool Miss Ratio, Destroyed Bean Ratio, Transaction Rollback Ratio, Transaction Timeout Ratio, etc.
Q JSP and servlet
o Turn off the JSP page check and servlet reload
o Use memory-based session persistent strategies
O pre-compilation JSP
Q JMS
o Don't use JMS Message SELECTORS
o Use asynchronous ways to receive messages
o See dev2dev.bea.com/products/wlserver/whitepapers/wl_jms_Perform_Gd.jsp
q session management
o session affect performance
o client cookie is worth considering
o Maintain an object using local variables
o Aggregate object, then put it in session