This is my impression of Eclipse, because I have a memory shortage of M hosts. Please use the-vmargs-xmx adjustment prompt. Then, I can only close eclipse, otherwise it will be left empty. At ordinary times, my brain uses habitual Filtering for such prompts, but today I can't help it. I want to see how it works and how it can be better to write code.
This is the resource I found online:
Java Virtual Machine Adjustment
By default, a 192 mb jvm heap is used by the proxy. Generally, this is too small for a large message load and should increase.
When the contemporary manager is about to exhaust the JVM heap space used by Java objects, it will use various technologies (such as stream control and message exchange) to release the memory. In extreme cases, the proxy even closes the client connection to release the memory and reduce the message flow. So it is best to set the maximum JVM heap space to be large enough to avoid this situation.
However, if the maximum Java heap space is too large compared with the system's physical memory, the proxy will continue to increase the Java heap space until the entire system runs out of memory. This can lead to performance degradation, unpredictable proxy crashes, and/or behavior that affects other applications and services running in the system. Generally, sufficient physical memory is required for the operating system and other applications to run on the computer.
In general, the good way is to estimate the normal and peak system memory capacity, and configure the Java heap size so that it can provide good performance, but it should not be too large at the same time to avoid system memory problems.
To change the minimum and maximum heap sizes of the agent, use the-vmargs command line option when starting the agent. For example:
/Usr/bin/imqbrokerd-vmargs "-xms256m-xmx1024m"
This command sets the startup Java heap size to 256 MB and the maximum Java heap size to 1 GB.
On Solaris, If/etc/rc (that is,/etc/init. d/imq) Start the agent. Please go to/etc/imq/imqbrokerd. specify the command line parameters of the proxy in the conf file. For more information, see annotations in this file.
In Windows, if the proxy is started as the window service, use the-vmargs option of the imqsvcadmin install command to specify the JVM parameter. In any case, verify the settings by checking the agent log file or by using the imqcmd metrics BKR-M cxn command.
Service Manager Utility (imqsvcadmin)
You can use the Service Manager Utility (imqsvcadmin) to install, query, and delete a proxy for running Windows Services. This section describes the basic syntax of the imqsvcadmin command, provides a subcommand list, outlines the imqsvcadmin command options, and describes how to use these commands to execute specific tasks.
Imqsvcadmin command syntax
The syntax of the imqsvcadmin command is as follows:
ImqsvcadminSubcommand[Options]
Imqsvcadmin-H
Note that if the-V,-H, or-H option is specified, other sub-commands specified in the command line will not be executed. For example, if you enter the following command, the help information is displayed instead of the query subcommand.
Imqsvcadmin query-H
Imqsvcadmin sub-command
The table D-1 lists the subcommands contained in the Message Queue Service Manager Utility (imqsvcadmin:
Table D-1 imqsvcadmin sub-commands
Sub-commands |
Description |
Install |
Install the service and specify the startup options. |
Query |
Displays the startup options of the imqsvcadmin command. The startup options include the Service Startup method (manual or automatic), service location, Java runtime location, and parameter values passed to the agent at startup. |
Remove |
Delete a service. |
Imqsvcadmin option Overview
Table D-2 lists the options for the imqsvcadmin command. For details about how to use these options, see the following sections of task-based.
Table D-2 imqsvcadmin options
Option |
Description |
-H |
Show Help. Other commands are not executed on the command line. |
-JavahomePath |
Specify the path to replace the Java 2 compatible Runtime (by default, the runtime on the system or the runtime included with the Message Queue. Example: imqsvcadmin-install-javahome D:/jdk1.4 |
-JrehomePath |
Specifies the path to replace Java 2 with JRE compatibility. Example: imqsvcadmin-install-jrehome D:/JRE/1.4 |
-VmargsARG[[ARG] |
Specify other parameters passed to the Java VM that is running the proxy service. (You can also specify these parameters in the startup parameters field of the Windows Service Control Panel .) Example:-vmargs-xms16m-xmx128m |
-ARGsARG[[ARG] |
Specify other command line parameters passed to the proxy service. For more information about the imqbrokerd option, see "Start proxy ". (You can also specify these parameters in the startup parameters field of the Windows Service Control Panel .) For example, Imqsvcadmin-install-ARGs-passfile D:/imqpassfile |
The information specified by the-javahome,-vmargs, and-ARGs options is stored in the Window registry items javahome, jvmargs, and serviceargs.
HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/imq_broker/parameters
Delete proxy service
Before deleting the proxy service, use the imqcmd shutdown BKR command to disable the proxy. Then run the imqsvcadmin remove command to delete the service and restart the computer.
Reconfigure proxy service
To reconfigure the service, delete the service, reinstall it, and use the-ARGs parameter to specify different startup options.
Replace Java Runtime
You can use the-javahome or-jrehome option to specify the location to replace the Java runtime. (You can also specify these options in the startup parameters field of the Windows Service Control Panel .) Note that the startup parameter field uses the backslash (/) as the Escape Character for processing. to use it as the path separator, you must enter it twice, for example,-javahome D: // jdk1.3.
Query proxy service
To determine the startup options of the proxy service, use the-Q option of the imqsvcadmin command.
|
Imqsvcadmin-Query |
|
Service imq_broker is installed. |
Display name: imq_broker |
Start type: Manual |
Binary location: C:/program files/Sun Microsystems/Message Queue 3.5/bin/imqbrokersvc |
Javahome: C:/j2sdk1.4.0 |
Broker ARGs:-passfile D:/imqpassfile |
|
|
Well, after reading it, I know how to deal with it. I hope I can say goodbye to the damn prompt later.
Here is my change:
F:/Eclipse/eclipse.exe-vmargs-xmx256m
Reference: http://docs.sun.com/source/817-7211/index.html