first, operating system tuning
Linux Tuning Parameters
For the Linux operating system, the following settings are recommended for optimal performance.
table 4-4 recommended Linux values |
parameter , |
recommended values |
/sbin/ifconfig Lo MTU |
1500 |
Kernel.msgmni |
1024 |
Kernel.sem |
1000 32000 |
Fs.file-max |
65535 |
Kernel.shmmax |
2147483648 |
Net.ipv4.tcp_max_syn_backlog |
8192 |
For more information about Linux tuning, refer to the documentation provided by the Linux vendor.
For the operating system tuning is one aspect that needs to be considered, needs the relevant person to adjust the setup and the test, I did not do the related preliminary research here.
First, WebLogic tuning
1. Adjust Java Virtual machine
(1) Select the appropriate JVM
(2) Configure the JVM garbage collection heap
The following sections provide general guidelines for adjusting the size of the VM heap:
² The heap size should be set to an appropriate value so that the maximum amount of memory used by the VM does not exceed the available physical RAM. If this value is exceeded, the OS starts paging and performance decreases significantly. The VM always uses more memory than the heap size. In addition to the heap size setting, you also allocate the internal VM functionality, the local libraries outside the VM, and the memory that is required for the Sun VM: the memory needed to store the classes and methods.
² When using a generational garbage collection scheme, the seedbed size should not exceed half the total size of the Java heap. Typically, 25% to 40% of the heap size is sufficient.
² in a production environment, setting the minimum heap size and maximum heap size to the same value avoids wasting the VM resources needed to adjust the heap size at times. This also applies to the next generation heap size (Sun) or hotbed size (BEA Jrockit).
Table 5-3 Java Heap Size options
|
Task
|
Options
|
Comments
|
Set the next generation heap size |
-xx:newsize |
Setting the size of the-xx:newsize to One-fourth of the heap size is a general rule. If there is a large number of short-term objects, increase the value of this option. While adding the processor, be sure to increase the next generation heap size. Memory allocations can be done in parallel, but garbage collection cannot be done in parallel. |
Set maximum Next generation heap size |
-xx:maxnewsize |
Sets the upper limit of the next generation heap size. |
Set new heap size ratios |
-xx:survivorratio |
The next generation region is divided into three subregions: Eden and two equal living spaces. Configure the ratio of eden/living space size. Attempt to set this value to 8, and then monitor garbage collection. |
Set minimum heap Size |
-xms |
It is a general rule to set the minimum heap size (-XMS) to the same value as the maximum heap size (-XMX) to minimize garbage collection consumption. |
Set maximum heap Size |
-xmx |
Sets the upper limit of heap size. |