Configure JVM -D startup parameters

更新时间:
复制 MD 格式

Configure Java Virtual Machine (JVM) -D startup parameters to tune High-speed Service Framework (HSF) behavior on Enterprise Distributed Application Service (EDAS), including ports, thread pools, timeouts, network bindings, and buffer limits.

Most parameters follow the naming pattern -Dhsf.{component}.{property}. Exceptions such as -Dpandora.qos.port and -DHsfBindHost are noted in the tables below.

Port configuration

When you run multiple HSF providers on the same machine, assign a unique port value to each provider.

ParameterDefaultDescription
-Dhsf.server.port12200TCP port for the HSF service.
-Dpandora.qos.port12201Pandora monitoring port.
-Dhsf.http.port12220HTTP port exposed by HSF.
-Dhsf.http.enabletrueEnables or disables the HSF HTTP port.

Thread pool

ParameterDefaultDescription
-Dhsf.server.max.poolsize720Maximum thread pool size for the HSF provider. Increase this value if concurrent requests frequently saturate the pool.
-Dhsf.server.min.poolsize50Minimum thread pool size for the HSF provider.

Network binding

Use these parameters when the server has multiple network interface cards (NICs) and HSF binds to the wrong address.

ParameterDefaultDescription
-Dhsf.server.ipFirst NICIP address that the HSF provider binds to. By default, HSF binds to the first NIC. Set this parameter to override the default binding.
-DHsfBindHostIP of first NICHost that the HSF provider binds to and reports to the address registry. For example, -DHsfBindHost=0.0.0.0 binds the HSF server port to all NICs.

-DHsfBindHost uses PascalCase, unlike other HSF parameters.

Timeout and shutdown

ParameterDefaultUnitDescription
-Dhsf.shuthook.wait10000msWait time for graceful shutdown.
-DdefaultHsfClientTimeout--Global timeout for all HSF consumer-side invocations.
-Dhsf.invocation.timeout.sensitivefalse-When set to true, the HSF call duration includes time spent on connection creation and address selection, in addition to the remote call itself.

Service publishing

ParameterDefaultUnitDescription
-Dhsf.publish.delayedfalse-When set to true, delays all service publishing.
-Dhsf.publish.interval400msInterval between consecutive service publications. HSF exposes services immediately upon publishing. Increase this value if the application cannot handle the incoming workload during startup.

Routing

ParameterDefaultDescription
-Dhsf.client.localcalltrueWhen true, the consumer prefers a provider on the same machine before routing to remote providers.
-Dhsf.run.mode1Controls whether the HSF client can make targeted calls that bypass ConfigServer. 1 = targeted calls disabled, 0 = targeted calls enabled. We recommend that you do not set this parameter to 0.

Write buffer limits

These parameters set the write buffer thresholds (water marks) for each channel. When the buffer exceeds the high water mark, the channel stops accepting writes. Writes resume after the buffer drops below the low water mark.

Set the high and low water marks as a pair. The high water mark must be greater than the low water mark. Consumer and provider water marks are configured independently.

ParameterDefaultUnitDescription
-Dhsf.client.low.water.mark32KBLow water mark for each consumer channel.
-Dhsf.client.high.water.mark64KBHigh water mark for each consumer channel. When the write buffer exceeds this value, new requests are rejected with an error.
-Dhsf.server.low.water.mark32KBLow water mark for each provider channel.
-Dhsf.server.high.water.mark64KBHigh water mark for each provider channel. When the write buffer exceeds this value, new responses are blocked, causing the consumer to time out.

Generic invocation

ParameterDefaultDescription
-Dhsf.generic.remove.classNot setSet to true to exclude the class field from generic call results.