You must have seen -vmargs -Xmx in Eclipse ...

xiaoxiao2021-03-06  47

Eating memory, this is my impression of Eclipse, because my 512M machine has always inadequate memory, please use -VMargs -XMX adjustment prompt. Then I can only turn off the Eclipse, or it is negatively negative. Usually, my brain takes the habitual filtering for this kind of prompt, but I haven't bear it today, I have to see how to do it, the day of writing code can be better. This is the resource I found online: Java Virtual Machine Adjustment By default, the agent uses a JVM heap of 192MB. Usually, this should be too small for larger message loads and should increase.

When the agent is running out of the JVM heap space used by the Java object, it will use various techniques (such as stream control and message exchange) to release memory. In extreme cases, proxy even closing client connections to release memory and reduce message intrafire. So it is best to set the maximum JVM heap space enough to avoid this.

However, compared with the physical memory of the system, if the maximum Java heap space is set too large, the agent will continue to increase the Java heap space until the entire system depletes memory. This can result in a decrease in performance, unpredictable agent crashes and / or affect other applications and services running in the system. Typically, there is a need for sufficient physical memory to operate on your computer and other applications.

In general, a good way is to estimate the normal and peak system memory capacity and configure the Java heap size to provide good performance, but should not be too large, so as not to cause system memory issues.

To change the minimum and maximum heap size of the agent, use the -vmargs command line option when starting the agent. E.g:

/ usr / bin / imqbrokerd -vmargs "-XMS256M -XMX1024M"

This command sets the start Java heap size to 256MB, set the maximum Java heap size to 1GB.

On Solaris, if the agent is started via / etc / rc (ie /etc/init.d/imq), specify the command line parameters of the agent in the /etc/imq/imqbrokerd.conf file. For more information, see the comments in this file. On Windows, if the agent is started as a Window service, specify the JVM parameter using the -vmargs option of the IMQSvCadmin Install command. In any case, verify the settings by checking the proxy 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 that is run as a Windows service. This section describes the basic syntax of the imqsvcadmin command, providing a list of submandes, outlines the IMQSVCADMIN command option, and explains how to perform a specific task using these commands.

Imqsvcadmin command syntax

The general grammar of the IMQsvcadmin command is as follows:

Imqsvcadmin Subcommand [Options]

IMQSVCADMIN -H

Note that if the -v, -h or -h option is specified, the other subcommands specified in the command line will not be performed. For example, enter the following command will display the help information, not the Query subcommand.

IMQSVCADMIN Query -h

IMQSVCADMIN subcommand

Table D-1 lists the subcommands included in the Message Queue Service Manager utility (IMQSVCADMIN):

Table D-1 Imqsvcadmin subcommand

The subcommand illustrates the Install installation service and a specific startup option. Query Displays the startup option for the imqsvcadmin command. The boot option includes the service's startup mode (manual or automatic), the location of the service, the location of the Java runtime, and the parameter value passed to the agent when starting. Remove Delete Service. IMQSVCADMIN Option Overview

Table D-2 lists the options for the IMQsvcadmin command. For discussion on how to use these options, see the following sections based on the task.

Table D-2 Imqsvcadmin option

Option Description - H Displays the help. Do not execute additional commands in the command line. -JavaHome Path Specifies the path to replace Java 2 compatibility to use (default using the runtime of the system or the runtime that is included with the MersSage Queue). Example: IMQSVCADMINSTALL -JAVAHOME D: /JDK1.4 -JREHOME PATH Specifies the path to replace Java 2 compatible JRE. Example: IMQSVCADMINSTALL -JREHOME D: /JRE/1.4 -VMargs arg [[arg]] Specifies other parameters that passed to Java VM that is running the agent service. (You can also specify these parameters in the startup parameter field of the Windows service control panel.) Example: -vmargs -xms16m -xmx128m -args arg [[arg]] Specifies other command line parameters delivered to the proxy service. For instructions on the ImqBrokerD option, see "Start Agent". (You can also specify these parameters in the startup parameter field of the Windows service control panel.), For example, IMQSVCADMIN -INSTALL -ARGS -PASSFILE D: / IMQPassFile

Use the information specified using the -javahome, -vmargs, and -Args options under the Window Registry Key JavaHome, JVMargs, and Servicegergs, the path is located

HKEY_LOCAL_MACHINE / SYSTEM / CURRENTCONTROLSET / SERVICES / IMQ_BROKER / Parameters

Delete agency service

Before deleting a proxy service, you should use the IMQCMD SHUTDOWN BKR command to turn off the agent. Then use the Imqsvcadmin Remove command to delete the service and restart your computer.

Reconfigure the proxy service

To reconfigure the service, first delete the service, then reinstall and use the -Args parameter to specify different startup options.

Using alternative Java runtime

You can specify the location of the Java runtime using the -javahome or the -jrehome option. (You can also specify these options in the startup parameter field of the Windows service control panel.) Note that the startup parameter field processes the backslash (/) as an escape, so if you want to use it as a path separator, you must type Two times, such as -javahome d: //jdk1.3.

Query agent service

To determine the startup option of the proxy service, use the -q option for 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, I know how to get it, I am willing to change my death tips. This is my change:

F: /eclipse/eclipse.exe -vmargs -xmx256m

reference:

http://docs.sun.com/source/817-7211/index.html

转载请注明原文地址:https://www.9cbs.com/read-80532.html

New Post(0)