Weblogic Cluster Construction

Source: Internet
Author: User
Tags xms

Weblogic Cluster Construction

Oracle's WebLogic developer and production versions are available in 32-bit and 64-bit. The general production version of WebLogic is 64-bit, and the installation file is a jar package with a size of more than 1G. Download version 64 of WebLogic on Oracle website. The version used here is weblogic11g, the version number is 10.3.6 and the file name is "Wls1036_generic.jar". Verify that the JDK is installed before installing WebLogic (64-bit version of the JDK if you have 64-bit weblogic installed). Currently, WebLogic is free to use and requires Oracle's WebLogic service to pay for Oracle's paid services, which are free service charges for products.

install WebLogic (same as Windows and Linux steps)
1. On the command line, go to the folder where the installation files Wls1036_generic.jar
Then enter the command: Java-jar Wls1036_generic.jar
Click Enter after the program will launch the WebLogic installation file of the graphical installation interface.

Pressing down installs the same as installing normal files in Windows.
2, click "Next", to the interface, and then enter the WebLogic installation directory. (It is best not to have spaces in the path)

3. Click "Next". To the interface, because we did not buy Oracle services, so remove the tick. (currently WebLogic is free to use and requires Oracle technical support for a fee)

4, click "Next", to the interface, will be because we do not fill in the support information and pop up two warning boxes, direct "YES" through. Enter, tick the box below (no validation required)

5, then click "Continue". To the interface, choose "Typical" and "custom" can be set according to your preferences

6, select Click "Next", enter the interface, if not display JDK information, then manually click "Browse" to select the JDK installed on their own machine, the general default display is already installed on their own port (seemingly based on the environment variable java_home)

7, click "Next" to enter the interface, without modification, directly click "Next" Can

8, then will display the component information we are ready to install, directly click "Next"

9, and then began to install the

10, the installation is complete, here is checked "Run Quickstart" indicates that the domain creation and configuration interface is opened after the installation is complete. Click "Finish" button to complete the installation of WebLogic main program

Domain creation and configuration (only the cluster management side is created here, and nodes are created later on the console page)
If you check "Run QuickStart" when you complete the installation in step one, the domain creation and configuration interface will be opened directly. If "Run QuickStart" is not checked, we will find the corresponding location in the folder (depending on your installation path)
D:\Program_Files\Oracle\Middleware\wlserver_10.3\common\bin
Next, double-click the Config.cmd file to start the domain creation and configuration interface (Linux system is double-click Run config.sh file)

1, as shown, select "Create a new WebLogic domain" and then click "Next"

2, as shown, by default, click "Next"

3, as shown, fill in the name of the domain to be created, where the name is Portal_domain; Select the location where you want the domain file to be saved (the location is generally default), then click Next

4. Set the user name and password for the domain you want to create (note: To remember the user name and password, you will need to start the domain and log in to the console), as shown in. Then click "Next"

5, as shown. Production environment to select production mode, select the JDK (the box under available JDK will typically show your own installed JDK and use this by default.) It seems that the value from the system environment variable java_home, but has not been tested is not sure. Production environments using WebLogic JRockit's JDK will get better performance, according to the forum, WebLogic JRockit JDK will be 20% faster than Sun's JDK. JRockit JDK configuration is not quite understood, so here we still use Sun's JDK). Then click "Next"

6, create the management side. As shown in. Tick "Manage Server" and then click "Next" (Tick "Management Server" to indicate that the domain created is the Management Server, check "managed server, cluster and computer" to indicate that the domain is a managed server.) If the previous two are checked, the created domain contains the Management server and the managed server. So here we only tick "Management Server", indicating that the domain we are creating is only used as the management side. When creating a cluster, the management side is best to be independent, because if a domain contains both the management and the managed side, when we need to restart the service, we will also restart the management side, so that we can not directly in the Page Node Manager to start the node containing the management side, and the management side alone can avoid the occurrence of this situation, Restart the node directly on the console when maintenance is available)

7, as shown. Fill in the name for the management side of the domain (we use the default adminserver here), "Listen address" is the default to listen to all the IP on this computer (here by default, generally represents localhost,127.0.0.1 or IPv6 0:0:0:0:0 : 0:0:1), "Listen port" means listening to the port of this machine, generally you like to set the management port to 9001. We do not need SSL encryption here, so we do not check this option. Then click "Next" (such as settings, our local access to the domain's console URL is http://localhost:9001/console, the other machine access Http://IP address: 9001/console), and then go to the final installation confirmation page

8, such as. Click "Create" to start creating a domain

9, as shown, click "Finish" to complete the creation of the domain management side.

Start the WebLogic cluster management side, create the cluster, and create and add nodes for the cluster.

If the "Start Management Server" is checked in the last step of step two, the service side of the cluster will be started directly after clicking Finish. If "Start Management Server" is not checked, we need to go to the path
D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\bin
Double-click Startweblogic.cmd to start the service (the Linux system is double-click to run startweblogic.sh) and you need to enter the username and password for the domain that we set up earlier (in step 24).
Note: Portal_domain in the above path is the "domain name" that we set in step 23 above, enter the corresponding path according to the domain name you set.
1, as shown, the user will be prompted to enter the domain username and password at startup

2. After startup, open the browser, enter Http://localhost:9001/console (where 9001 is the port number configured in step 27 of the cluster management side), as shown, enter the user name and password that you entered when you just started, click "Login"

3. Go to the console page. For example, click "Environment"-"cluster" on the left navigation tree, then click the "Lock Server" button in the upper left corner (production mode needs to click this button to update the function under it)

4, as shown, click on the "New" button to create a cluster. As shown, give the cluster a name, and the others remain the default. Click "OK" to complete the cluster creation. (Create the node below and add it to the cluster)

5. For example, click the "Activate Changes" button to save the cluster you just created to WebLogic.

6, as shown. Click "Environment"-"server" in the tree on the left. and click the Lock and Edit button in the upper-left corner. Click on the "New" button to create a new node

7. Enter the node creation interface as shown in. As shown, take a name for the node, configure the node with a port of 7001, select "Should belong to make this server a member of an existing cluster" to add the node to the cluster we created just now. Then click "Next" to enter the completion confirmation page.
Note: Port 7001 indicates that the node serves us through 7001来 access, and the corresponding URL is similar to the HTTP://LOCALHOST:7001/service path ..... The port is generally incremented, such as the first node is configured with a port of 7001, then the second node port is typically configured as 7002, and the third node port is configured as 7003 ...

8, as shown. Click the "Finish" button to complete the creation of the node.

9, as shown. When the node is created, the name of the node, the cluster to which it belongs, and the port number that the node listens to are displayed. Do not forget to click the "Activate Changes" button in the production mode to make the configuration take effect

10, follow the above method we create two nodes, and join the cluster. As shown, we created a management side, and a cluster of three nodes

Start the cluster
Here the cluster's main configuration has been completed, the cluster has been able to start and work properly.
(However, this can be cumbersome to maintain, such as restarting the node each time to log on to the server to start manually on the command line.) After you configure the Node manager, you can stop and start the node directly on the page console and view the Configuration Node Manager section in detail.
1, start the cluster must first start the domain management side
(Since we have started the management side above, so this is no longer started, only the method listed)

Go to the command line and enter the following path (depending on your installation directory to enter the corresponding location),
CD D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\bin
Enter the following command to start the WebLogic management side
Startweblogic.cmd (using./startweblogic.sh to boot in Linux)

2, start each node. Note: The start of a node must not start until the management side starts.
Go to the command line and enter the following path (depending on your installation directory to enter the corresponding location),
CD D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\bin
Enter the following
Startmanagerweblogic server_7001 t3://localhost:9001
(used in Linux./startmanagerweblogic server_7001 t3://localhost:9001)

Description: In the above command, Startmanagerweblogic.cmd is the script that initiates the node
(startmanagerweblogic.sh in Linux); server_7001 is the name of the node we created above;
T3://localhost:9001 This indicates that the node server_7001 points to the management side of native (localhost), where the T3 is the WebLogic protocol similar to HTTP. If the management side is not on this machine, then the localhost is replaced with the target machine IP, the port will be replaced by the target machine management port.

Note When you start the node, you are prompted for a user name and password

3. Start each node in turn. When we start to finish again click on the page console to the left of the tree "Environment"-"server" can see the status of three nodes has changed to running,

4. Click "Deploy" on the left navigation tree to enter the project deployment page. Here you can deploy our war package or project source.

Configure password-free at startup
When we start each node for the first time, WebLogic will
D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\servers
Folder (the name of the folder is the same as the node names), as in the directory where the nodes are created. AdminServer is the management side of the folder, server_7001,server_7002,server_7003 corresponding to the three nodes we created.

1, set the management side to start (when startweblogic.cmd boot) free input password
Go to the management side of the folder
Cd D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\servers\AdminServer
Create a new folder named security under this directory, enter the folder, and create a new file named Boot.properties.
That is, the file Boot.properties file is in the path
D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\servers\AdminServer\security
Below. Write two lines in file boot.properties
Username= User Name set when creating a domain
password= password to set when creating a domain
Save. Complete.
Note: The user name and password in the Boot.properties file are encrypted when you start the admin side again. So there's no need to worry about password leaks.
2, set the node start (startmanageweblogic.cmd server_7001 t3://localhost:9001), free password, here first set the name of the server_7001 node
Go to the management side of the folder
Cd D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\servers\server_7001
Create a new folder named security under this directory, enter the folder, and create a new file named Boot.properties.
That is, the file Boot.properties file is in the path
D:\Program_Files\Oracle\Middleware\user_projects\domains\portal_domain\servers\server_7001\security
Below. Write two lines in file boot.properties
Username= User Name set when creating a domain
password= password to set when creating a domain
Save. Complete.
Note: The user name and password in the Boot.properties file are encrypted when you start the admin side again. So don't worry about password leaks.
3, according to the above step 2 method to the node server_7002, and Node server_7003 are set.
It is no longer necessary to enter the user name and password when starting the server or each node again.

Configuration Node Manager
The node manager can shut down and restart each node in the console, so it is necessary for each node to be free to enter the password, so the step configuration needs to be determined that each node is free to enter the password. Specific method Reference "Five, configure the start-free password"
First close each node. Click on the left navigation tree "Environment"-"Server"-Main Page "control", then tick three nodes server_7001, server_7002, server_7003, click "Close"-click "Force restart Now" to close the node

1. Create a computer (there is a node manager in the computer).
Click on "Computer" in the left navigation tree and click on the "Lock and edit" button in the upper left corner and click on the "Create" button on the middle main page to create a computer

2, as shown. Give the computer a name (whichever you like, which is very machine_56). The computer operating system chooses the default "other". (Because our operating system is generally Linux or Windows, if UNIX is the operating system select Unix) then click "Next" to continue

3, as shown in the type select "Normal", (because we did not open the default SSL so choose the normal here) click "Done"

4, as shown. Do not click "Activate Changes" first. In the middle of the main page, click the name of the computer you just created "Machine_localhost"

5, as shown, click on the "Server" menu, and then click on the "Add" button below to add a node for the computer (also known as the server)

6, as shown. Radio Box Select the first "select an existing server and associate it with this computer", select a server row, select the management side "AdminServer", then click "Next" or "Finish" button to complete the management side of the add

7, as shown. Click the Add button again, add the server_7001 node, and then repeat the operation to add the remaining nodes to the computer.

8, as shown. Click "Activate Changes" to complete the creation and configuration of your computer.

9, as shown. Click the "Lock and edit" button in the upper left corner to enter edit mode. Then click on the left navigation tree "Environment"-"server"-Middle Main Page and click "server_7001"

10, as shown. Click on the "Server Startup" menu item. The parameters are configured (according to their own machine to set the corresponding path)
Java Home directory: d:/program_files/java/jdk1.6.0_45
Java Vendor: Sun
BEA Home directory: D:/program_files/oracle/middleware
Root directory: D:/program_files/oracle/middleware/user_projects/domains/portal_domain
Classpath: D:/program_files/oracle/middleware/wlserver_10.3/server/lib/weblogic.jar
Parameter: (Note: Parameter column is set to empty)
Security policy File: D:/program_files/oracle/middleware/wlserver_10.3/server/lib/weblogic.policy
The following user name, password, confirm password, enter the user name and password of the setting when the domain was created. Then click "Save"

11, as shown. Click on the "Activate Changes" button to activate the settings you just made

12, repeat the above operation, complete the other node settings.
13. Modify WebLogic Node Manager parameters
Start the Node Manager first and enter the directory on the command line
D:\Program_Files\Oracle\Middleware\wlserver_10.3\server\bin
Execute script startnodemanager.cmd (Linux server using script startnodemanager.sh), command for
Startnodemanager.cmd (for./startnodemanager.sh in Linux server)
After the boot is complete. Close it. (The purpose of startup is to have the Node manager generate its own profile, which is generated the first time it starts)
Go to Folder D:\Program_Files\Oracle\Middleware\wlserver_10.3\common\nodemanager
Open the Node Manager configuration file nodemanager.properties.
Change this line of Startscriptenabled=false to Startscriptenabled=true, (personal understanding, meaning WebLogic allows the node to be started through a script).
Then start the node Manager again
14. We can close and start each node on the console page. As shown in, click on "Environment"-"server" in the left navigation tree, then click "Control" in the middle Main page, then tick the node that needs to start, then click "Start"

15, as shown. Click "Yes" to start the node.

16, after we can click on the left navigation tree "Environment"-"server" to refresh the page, to see the status of each node, to see whether the node completes the boot. As shown, each node completes its startup.

17, close the node.
Click on the control, tick the node that needs to be closed, then click "Close"-"force close now" to close the node. Note: Do not close the control side (AdminServer), if the AdminServer is also closed, then we need to log on to the server, manually start the management side.

It is also important to note that we use the Node Manager to start the WebLogic in the correct order, start the management side (startweblogic.sh) First, then start the Node Manager (startnodemanager.sh), and then log in to the console to start each node.

Optimization of WebLogic

According to the WebLogic forum to find the information, organized as follows.
1. Memory optimization
First determine the memory size supported by the JDK. The maximum memory supported for each JDK version in different operating systems is not the same, but it can be tested in the following ways.
JAVA-XMXXXXM (g)-version
where xxx is the maximum memory value, M (g) is the unit of measure of memory, if the command can correctly display the JDK version and other information, indicating the current JDK support test maximum memory amount, otherwise the test memory exceeds the maximum value supported by the JDK.
such as Java-xmx1024m-version or java-xmx2g-version.
The test found on a 32-bit machine, the Windows operating system that the maximum value is between 1.5G-2G, the Linux operating system is 2g-3g between the maximum, 64-bit machine should be no limit, tested write 64G can also produce version information normally

Modification Method:
Modify the Setdomainenv.cmd file under D:/program_files/oracle/middleware/user_projects/domains/base_domain/bin ( Modify setdomainenv.sh on Linux):
Before modification: (as shown below, the default size is 512m)
If "%java_vendor%" = = "Sun" (
Set wls_mem_args_64bit=-xms256m-xmx512m
Set wls_mem_args_32bit=-xms256m-xmx512m
) Else (
Set wls_mem_args_64bit=-xms512m-xmx512m
Set wls_mem_args_32bit=-xms512m-xmx512m
)
setmem_perm_size_32bit=-xx:permsize=48m
setmem_max_perm_size_32bit=-xx:maxpermsize=128m

Modified: (This gives it a maximum of 4G RAM)

If "%java_vendor%" = = "Sun" (
Set wls_mem_args_64bit=-xms3072m–xmx4096m
Set wls_mem_args_32bit=-xms1024m–xmx1536m
) Else (
Set wls_mem_args_64bit=-xms3072m–xmx4096m
Set wls_mem_args_32bit=-xms1024m–xmx1536m
)
setmem_perm_size_32bit=-xx:permsize=288m
Setmem_max_perm_size_32bit=-xx:maxpermsize=768m
Description: Specific modification values are determined based on actual physical memory
· -xmx3550m: Set JVM maximum heap memory to 3550M.
· -xms3550m: Set the JVM initial heap memory to 3550M. This value can be set to be the same as-xmx to avoid wasting time each time the JVM allocates memory dynamically.
· -xx:permsize=256m: Sets the heap memory persistence initial value to 256M. (It looks like the initialization parameters of the IDE such as Eclipse)
· -XX:MAXPERMSIZE=512M: Set the maximum persistence value to 512M.
32-bit Operation JDK memory system: Maximum setting of 1.5G, if set too large, will cause the service to fail to start
64-bit Operation JDK Memory system: 60~80% maximum set to physical memory

For some detailed knowledge of JVM memory, see "Appendix I"

2. Set the number of threads

Modify the Setdomainenv.cmd in the Weblogic\user_projects\domains\base_domain\bin
Add the following in Java_options:
Set java_options=%java_options%-dweblogic.threadpool.minpoolsize=2000
Set java_options=%java_options%-dweblogic.threadpool.maxpoolsize=4000
Description
After JDK5.0, each thread stack size is 1M, but the operating system has a limit on the number of threads in a process and cannot be generated indefinitely. The 32-bit operating system is based on the JVM's maximum heap memory setting, and the 64-bit operating system experience value is around 3000~5000.

3. weblogic File connection number
D:\Program_Files\Oracle\Middleware\wlserver_10.3\common\bin (enter the corresponding path according to its own machine) commenv.cmd under the path (Linux server is commenv.sh), the method in the file resetfd limit WebLogic Open the number of file connections is not more than 1024, we put this method commented out to remove this restriction. The last line of the file is modified by RESETFD to #resetfd (#号表示注释)

4. Modify the file handle limit of the Linux operating system (This is not tested and is for reference only
Because the Linux system is represented as files, it is necessary to modify the file handle limit when doing a high-concurrency web system.
To view the number of file handles used by a process
# sudo Ps-ef | grep java
Root 1663 1 0 02:37? 00:00:43/opt/bitnami/java/bin/java
The PID of the process can be learned from the results, and then the number of file handles currently used by the process is viewed according to the PID
#sudo LS/PROC/1663/FD | Wc-l
1022
The number of handles has been found to remain at 1022, while the top view finds that the load continues to increase. The limit for the number of handles for the current process is reviewed first.
#sudo Cat/proc/1663/limits | grep "Files"
Max open files, 1024x768 files
Found the limit card here, so modify the/etc/sysctl.conf file, add a line as follows:
fs.file-max=30720
Save. and perform
#sudo sysctl-p
And then look at it and find it has been changed.
Google found that there are two types of file handle limitations in Linux systems, one at the system level and one at the user level.
Modify the system-level: www.2cto.com
#echo "30720" >/proc/sys/fs/file-max
To modify a user-level:
#sudo vi/etc/security/limits.conf
Add the following line:
* Soft Nofile 2048
* Hard Nofile 32768
The asterisk represents any user, and Soft/hard represents a soft limit and a hard limit. Modify the/etc/pam.d/login file to specify the use of Pam
Session required/lib/security/pam_limits.so
However, it is important to note whether the system is 32-bit or 64-bit, and if the 64-bit is/lib64/security/pam_limits.so
After the above modification, reboot, check again
#ulimit-N
30720
The modification was successful.

Appendix I: Some Knowledge about JVM memory

Article Source: http://www.cnblogs.com/mingforyou/archive/2012/03/03/2378143.html

Xms Xmx permsize maxpermsize Difference

Sometimes we encounter eclipse crashes, and the error is as follows:
MyEclipse has detected, less than 5% of the 64MB of Perm
Gen (non-heap memory) space remains. It is strongly recommended
That, you exit, and restart MyEclipse with the new virtual machine memory
Paramters to increase this memory. Failure to does so can result in
Data loss. The recommended Eclipse memory parameters is:
eclipse.exe-vmargs-xms128m-xmx512m-xx:permsize=64m-xx:maxpermsize=128m

1. Meaning of the parameter
-vmargs-xms128m-xmx512m-xx:permsize=64m-xx:maxpermsize=128m
The-vmargs description is followed by the parameters of the VM, so the following are actually the parameters of the JVM
-xms128m JVM Initial allocation of heap memory
-XMX512M JVM Maximum allowable allocated heap memory, on demand
-xx:permsize=64m JVM Initial allocation of non-heap memory
-xx:maxpermsize=128m JVM Maximum allowable allocated non-heap memory, on demand

Let's first look at the mechanism of JVM memory management and then explain what each parameter represents.

1) heap and non-heap (non-heap) memory

According to the official statement, "Java virtual machines have a heap, the heap is a runtime data region, and all class instances and arrays of memory are allocated from here." The heap is created when the Java virtual machine is started. "" The memory outside the heap in the JVM is called non-heap (non-heap memory) ".
You can see that the JVM primarily manages two types of memory: heap and non-heap. Simply put, the heap is the Java code of memory, is left to developers to use, non-heap is the JVM left to use,
Therefore, the code for the method area, internal processing or optimization of the JVM, such as the JIT-compiled code cache, and each class structure (such as running the constant pool, field, and method data), and the methods and construction methods are in non-heap memory.

Heap memory allocation

The initial allocated heap memory of the JVM is specified by-XMS, and the default is the maximum allocated heap memory for 1/64;JVM of physical memory specified by-XMX, which defaults to 1/4 of the physical memory. When the default free heap memory is less than 40%, the JVM will increase the heap until the maximum limit of-xmx;
When free heap memory is greater than 70%, the JVM will reduce the heap until the minimum limit of-XMS. So the server generally sets-xms,-xmx equal to avoid resizing the heap after each GC.
Note: If-XMX is not specified or is small, the application may cause a java.lang.OutOfMemory error, which is from the JVM, not throwable, and cannot be captured with Try...catch.

Non-heap memory allocation

The JVM uses-xx:permsize to set the non-heap memory initial value, which defaults to 1/64 of the physical memory, and the maximum non-heap memory by Xx:maxpermsize, which by default is 1/4 of physical memory. (There is also a saying: MaxPermSize default value is related to the-server-client option,
Under the-server option, the default maxpermsize for 64m,-client option under the default MaxPermSize is 32m. I don't have an experiment with this. )
The full name of the PermGen space in the above error message is permanent Generation space, which is the permanent storage area of the memory. It is not clear whether PermGen space is a non-heap memory, or is not a heap of memory, but at least it belongs to.
Xx:maxpermsize set too small will cause java.lang.OutOfMemoryError:PermGen space is memory benefits.
Tell me why memory benefits:
(1) This portion of memory is used to store class and meta information, and class is placed in the PermGen space area when it is loaded, unlike the heap area where the instance is stored.
(2) GC (garbage Collection) does not clean up permgen space during the main program run time, so if your app will load many classes, PermGen space error is likely to occur.
This error is common when the Web server pre-compile the JSP.

2) JVM memory limit (max)

First, the JVM memory is limited to the actual maximum physical memory, assuming that the physical memory is infinitely large, the maximum value of the JVM memory is very much related to the operating system. In short, the 32-bit processor, although the controllable memory space has 4GB, but the specific operating system will give a limit,
This limit is generally 2GB-3GB (typically under Windows systems for the 1.5g-2g,linux system 2g-3g), and processors over 64bit are not limited.

  1. Why are there machines I set-XMX and-xx:maxpermsize to 512M after eclipse can be started and some machines won't start?
    through the above introduction to JVM memory management we have learned that JVM memory consists of two kinds: heap memory and non-heap memory, and the JVM's maximum memory depends first on actual physical memory and operating system. So there are several reasons why setting a VM parameter causes the program not to start: The value of-XMS in the
    1) parameter is greater than-XMX, or the value of-xx:permsize is greater than-xx:maxpermsize;
    2)-xmx value and-xx: The sum of the maxpermsize exceeds the maximum JVM memory limit, such as the current operating system maximum memory limit, or actual physical memory, and so on. When it comes to physical memory, it's important to note that
    if your memory is 1024MB, the actual system is not likely to be 1024MB, because part of the hardware is occupied.

  2. Why is the above parameter written to the Eclipse.ini file eclipse does not perform the corresponding setting?
    Why is the same argument valid on a shortcut or command line and is not valid in the Eclipse.ini file? This is because we have not complied with the setup rules for Eclipse.ini files:
    Parameter shape such as "Item Value" In this form, there are spaces in the middle of the need to write a newline, if there are spaces in the value need to be enclosed in double quotation marks. For example, we use the-VM c:/java/jre1.6.0/bin/javaw.exe parameter to set the virtual machine,
    In the Eclipse.ini file, write this:
    -vm
    C:/java/jre1.6.0/bin/javaw.exe
    -vmargs
    -xms128m
    -xmx512m
    -xx:permsize=64m
    -xx:maxpermsize=128m
    The results of the actual operation can be viewed through the "Configuration Details" button in the "Help" – "About Eclipse SDK" window in Eclipse.
    It is also necessary to note that the contents of the Eclipse.ini file included in the Eclipse compression package are as follows:
    -showsplash
    Org.eclipse.platform
    –launcher. Xxmaxpermsize
    256m
    -vmargs
    -xms40m
    -xmx256m
    Which –launcher. Xxmaxpermsize (Note that the front is two connections) the meaning of the-xx:maxpermsize parameter is basically the same, I think the only difference is that the former is the Eclipse.exe set parameters when starting,
    The latter is the parameter in the JVM used by Eclipse. In fact, the two set a can, so here can put –launcher. Xxmaxpermsize and Next line use # comment out.

  3. The other startup parameters. If you have a dual-core CPU, you might be able to try this parameter:
    -xx:+useparallelgc
    Allows the GC to execute faster. (only new parameters added to the GC in JDK 5)

Add:
If you have a large number of third-party jars under your web app that are larger than the default size of the server JVM, there will be a memory benefit problem.
Workaround: Set the MaxPermSize size
You can add server-initiated JVM parameter settings by selecting the appropriate server, such as TOMCAT5, in Myelipse to expand the JDK subkey page on the inside:
-xms128m
-xmx256m
-xx:permsize=128m
-xx:maxnewsize=256m
-xx:maxpermsize=256m
or manually set the MaxPermSize size, such as Tomcat,
To modify the Tomcat_home/bin/catalina.bat, add the following line above the echo "Using catalina_base: $CATALINA _base":
Java_opts= "-server-xx:permsize=64m-xx:maxpermsize=128m

Weblogic Cluster Construction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.