From 1837bec2fac8e81e15ba527a6e95284f21fcd924 Mon Sep 17 00:00:00 2001 From: MingzhenHan Date: Thu, 31 Oct 2024 20:17:04 +0800 Subject: [PATCH 1/4] Add jvm memory monitor config option guide. --- content/cn/docs/config/config-option.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/cn/docs/config/config-option.md b/content/cn/docs/config/config-option.md index 9aaa8bec8..ae0f561b6 100644 --- a/content/cn/docs/config/config-option.md +++ b/content/cn/docs/config/config-option.md @@ -52,6 +52,8 @@ weight: 2 | auth.token_expire | 86400 | The expiration time in seconds after token created | | auth.token_secret | FXQXbJtbCLxODc6tGci732pkH1cyf8Qg | Secret key of HS256 algorithm. | | exception.allow_trace | false | Whether to allow exception trace stack. | +| memory_monitor.threshold | 0.85 | The threshold of JVM(in-heap) memory usage monitoring , 1 means disabling this function. | +| memory_monitor.period | 2000 | The period in ms of JVM(in-heap) memory usage monitoring. | ### 基本配置项 From f0099edabb64646b2882ec6b80f0c9a0816c7ef8 Mon Sep 17 00:00:00 2001 From: MingzhenHan Date: Thu, 31 Oct 2024 20:21:32 +0800 Subject: [PATCH 2/4] Add jvm memory monitor config option guide(EN Version) --- content/en/docs/config/config-option.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/docs/config/config-option.md b/content/en/docs/config/config-option.md index 2b9861085..8bf5a1da2 100644 --- a/content/en/docs/config/config-option.md +++ b/content/en/docs/config/config-option.md @@ -52,6 +52,8 @@ Corresponding configuration file `rest-server.properties` | auth.token_expire | 86400 | The expiration time in seconds after token created | | auth.token_secret | FXQXbJtbCLxODc6tGci732pkH1cyf8Qg | Secret key of HS256 algorithm. | | exception.allow_trace | false | Whether to allow exception trace stack. | +| memory_monitor.threshold | 0.85 | The threshold of JVM(in-heap) memory usage monitoring , 1 means disabling this function. | +| memory_monitor.period | 2000 | The period in ms of JVM(in-heap) memory usage monitoring. | ### Basic Config Options From da385bb98d4be8c2160533f7bf9c2902a7baafec Mon Sep 17 00:00:00 2001 From: MingzhenHan Date: Thu, 31 Oct 2024 20:24:07 +0800 Subject: [PATCH 3/4] Update rest-server.properties in config-guide.md --- content/en/docs/config/config-guide.md | 50 ++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/content/en/docs/config/config-guide.md b/content/en/docs/config/config-guide.md index f17662ab8..b29046eb3 100644 --- a/content/en/docs/config/config-guide.md +++ b/content/en/docs/config/config-guide.md @@ -154,19 +154,63 @@ The default content of the `rest-server.properties` file is as follows: # bind url # could use '0.0.0.0' or specified (real)IP to expose external network access restserver.url=http://127.0.0.1:8080 +#restserver.enable_graphspaces_filter=false # gremlin server url, need to be consistent with host and port in gremlin-server.yaml #gremlinserver.url=http://127.0.0.1:8182 -# graphs list with pair NAME:CONF_PATH -graphs=[hugegraph:conf/hugegraph.properties] +graphs=./conf/graphs + +# The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0 +batch.max_write_ratio=80 +batch.max_write_threads=0 + +# configuration of arthas +arthas.telnet_port=8562 +arthas.http_port=8561 +arthas.ip=127.0.0.1 +arthas.disabled_commands=jad -# authentication +# authentication configs +# choose 'org.apache.hugegraph.auth.StandardAuthenticator' or +# 'org.apache.hugegraph.auth.ConfigAuthenticator' #auth.authenticator= + +# for StandardAuthenticator mode +#auth.graph_store=hugegraph +# auth client config +#auth.remote_url=127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897 + +# for ConfigAuthenticator mode #auth.admin_token= #auth.user_tokens=[] +# TODO: Deprecated & removed later (useless from version 1.5.0) +# rpc server configs for multi graph-servers or raft-servers +#rpc.server_host=127.0.0.1 +#rpc.server_port=8091 +#rpc.server_timeout=30 + +# rpc client configs (like enable to keep cache consistency) +#rpc.remote_url=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 +#rpc.client_connect_timeout=20 +#rpc.client_reconnect_period=10 +#rpc.client_read_timeout=40 +#rpc.client_retries=3 +#rpc.client_load_balancer=consistentHash + +# raft group initial peers +#raft.group_peers=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 + +# lightweight load balancing (beta) server.id=server-1 server.role=master + +# slow query log +log.slow_query_threshold=1000 + +# jvm(in-heap) memory usage monitor, set 1 to disable it +memory_monitor.threshold=0.85 +memory_monitor.period=2000 ``` - `restserver.url`: The URL at which the RestServer provides its services. Modify it according to the actual environment. If you can't connet to server from other IP address, try to modify it as specific IP; or modify it as `http://0.0.0.0` to listen all network interfaces as a convenient solution, but need to take care of the network area that might access. From d4c03611e944f6ee462c1b585843ce677bc1a1fc Mon Sep 17 00:00:00 2001 From: MingzhenHan Date: Thu, 31 Oct 2024 20:24:59 +0800 Subject: [PATCH 4/4] Update config-guide.md (CN version) --- content/cn/docs/config/config-guide.md | 50 ++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/content/cn/docs/config/config-guide.md b/content/cn/docs/config/config-guide.md index bd64bdf77..270a070b4 100644 --- a/content/cn/docs/config/config-guide.md +++ b/content/cn/docs/config/config-guide.md @@ -156,19 +156,63 @@ rest-server.properties 文件的默认内容如下: # bind url # could use '0.0.0.0' or specified (real)IP to expose external network access restserver.url=http://127.0.0.1:8080 +#restserver.enable_graphspaces_filter=false # gremlin server url, need to be consistent with host and port in gremlin-server.yaml #gremlinserver.url=http://127.0.0.1:8182 -# graphs list with pair NAME:CONF_PATH -graphs=[hugegraph:conf/hugegraph.properties] +graphs=./conf/graphs + +# The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0 +batch.max_write_ratio=80 +batch.max_write_threads=0 + +# configuration of arthas +arthas.telnet_port=8562 +arthas.http_port=8561 +arthas.ip=127.0.0.1 +arthas.disabled_commands=jad -# authentication +# authentication configs +# choose 'org.apache.hugegraph.auth.StandardAuthenticator' or +# 'org.apache.hugegraph.auth.ConfigAuthenticator' #auth.authenticator= + +# for StandardAuthenticator mode +#auth.graph_store=hugegraph +# auth client config +#auth.remote_url=127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897 + +# for ConfigAuthenticator mode #auth.admin_token= #auth.user_tokens=[] +# TODO: Deprecated & removed later (useless from version 1.5.0) +# rpc server configs for multi graph-servers or raft-servers +#rpc.server_host=127.0.0.1 +#rpc.server_port=8091 +#rpc.server_timeout=30 + +# rpc client configs (like enable to keep cache consistency) +#rpc.remote_url=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 +#rpc.client_connect_timeout=20 +#rpc.client_reconnect_period=10 +#rpc.client_read_timeout=40 +#rpc.client_retries=3 +#rpc.client_load_balancer=consistentHash + +# raft group initial peers +#raft.group_peers=127.0.0.1:8091,127.0.0.1:8092,127.0.0.1:8093 + +# lightweight load balancing (beta) server.id=server-1 server.role=master + +# slow query log +log.slow_query_threshold=1000 + +# jvm(in-heap) memory usage monitor, set 1 to disable it +memory_monitor.threshold=0.85 +memory_monitor.period=2000 ``` - restserver.url:RestServer 提供服务的 url,根据实际环境修改。如果其他 IP 地址无法访问,可以尝试修改为特定的地址;或修改为 `http://0.0.0.0` 来监听来自任何 IP 地址的请求,这种方案较为便捷,但需要留意服务可被访问的网络范围;