Skip to content

Commit

Permalink
updates-on-memtracker (#2422)
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-cyber authored Jan 9, 2024
1 parent 8271350 commit 32b1061
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ For all parameters and their current values, see [Configurations](1.configuratio

| Name | Predefined value | Description |Whether supports runtime dynamic modifications|
| :------------------- | :------------------------ | :------------------------------------------ |:------------------|
|`memory_tracker_limit_ratio` |`0.8` | The value of this parameter can be set to `(0, 1]`, `2`, and `3`.<br/>**Caution: When setting this parameter, ensure that the value of `system_memory_high_watermark_ratio` is not set to `1`, otherwise the value of this parameter will not take effect.**<br/>`(0, 1]`: The percentage of available memory. Formula: `Percentage of available memory = Available memory / (Total memory - Reserved memory)`.<br/>When the expected memory required for a query exceeds the current available memory, {{nebula.name}} stops accepting queries.<br/> **Note**: For clusters with a mixed-used environment, the value of `memory_tracker_limit_ratio` should be set to a **lower** value. For example, when Graphd is expected to occupy only 50% of memory, the value can be set to less than `0.5`.<br/>`2`: Dynamic Self Adaptive mode. MemoryTracker dynamically adjusts the available memory based on the system's current available memory. <br/>**Note**: This feature is experimental. As memory usage cannot be monitored in real time in dynamic adaptive mode, an OOM error may still occur to handle large memory allocations. <br/>`3`: Disable MemoryTracker. MemoryTracker only logs memory usage and does not interfere with executions even if the limit is exceeded.| Yes|
|`memory_tracker_limit_ratio` |`0.8` | The value of this parameter can be set to `(0, 1]`, `2`, and `3`.<br/>**Caution: When setting this parameter, ensure that the value of `system_memory_high_watermark_ratio` is not set to `1`, otherwise the value of this parameter will not take effect.**<br/>`(0, 1]`: The percentage of available memory. Formula: `Percentage of available memory = Available memory / (Total memory - Reserved memory)`.<br/>When an ongoing query results in memory usage exceeding the configured limit, the query fails and subsequently the memory is released. <br/> **Note**: For the hybrid deployment of a cluster with cloud-based and on-premises nodes, the value of `memory_tracker_limit_ratio` should be set to a **lower** value. For example, when the graphd is expected to occupy only 50% of memory, the value can be set to less than `0.5`.<br/>`2`: Dynamic Self Adaptive mode. MemoryTracker dynamically adjusts the available memory based on the system's current available memory. <br/>**Note**: This feature is experimental. As memory usage cannot be monitored in real time in dynamic adaptive mode, an OOM error may still occur to handle large memory allocations. <br/>`3`: Disable MemoryTracker. MemoryTracker only logs memory usage and does not interfere with executions even if the limit is exceeded.| Yes|
|`memory_tracker_untracked_reserved_memory_mb` |`50`| The reserved memory that is not tracked by the memory tracker. Unit: MB.| Yes|
|`memory_tracker_detail_log` |`false` | Whether to enable the memory tracker log. When the value is `true`, the memory tracker log is generated.| Yes|
|`memory_tracker_detail_log_interval_ms` |`60000`| The time interval for generating the memory tracker log. Unit: Millisecond. `memory_tracker_detail_log` is `true` when this parameter takes effect.| Yes|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ For details about Memory Tracker, see [Memory Tracker: Memory Management Practic
| Name | Predefined value | Description |Whether supports runtime dynamic modifications|
| :------------------- | :------------------------ | :------------------------------------------ |:------------------|
|`memory_tracker_limit_ratio` |`0.8` | The value of this parameter can be set to `(0, 1]`, `2`, and `3`.<br/>`(0, 1]`: The percentage of available memory. Formula: `Percentage of available memory = Available memory / (Total memory - Reserved memory)`.<br/>When the expected memory required for a query exceeds the current available memory, {{nebula.name}} stops accepting queries. <br/> **Note**: For clusters with a mixed-used environment, the value of `memory_tracker_limit_ratio` should be set to a **lower** value. For example, when Graphd is expected to occupy only 50% of memory, the value can be set to less than `0.5`.<br/>`2`: Dynamic Self Adaptive mode. MemoryTracker dynamically adjusts the available memory based on the system's current available memory. <br/>**Note**: This feature is experimental. As memory usage cannot be monitored in real time in dynamic adaptive mode, an OOM error may still occur to handle large memory allocations. <br/>`3`: Disable MemoryTracker. MemoryTracker only logs memory usage and does not interfere with executions even if the limit is exceeded.| Yes|
|`memory_tracker_limit_ratio` |`0.8` | The value of this parameter can be set to `(0, 1]`, `2`, and `3`.<br/>`(0, 1]`: The percentage of available memory. Formula: `Percentage of available memory = Available memory / (Total memory - Reserved memory)`.<br/>When an ongoing query results in memory usage exceeding the configured limit, the query fails and subsequently the memory is released. <br/> **Note**: For the hybrid deployment of a cluster with cloud-based and on-premises nodes, the value of `memory_tracker_limit_ratio` should be set to a **lower** value. For example, when the graphd is expected to occupy only 50% of memory, the value can be set to less than `0.5`.<br/>`2`: Dynamic Self Adaptive mode. MemoryTracker dynamically adjusts the available memory based on the system's current available memory. <br/>**Note**: This feature is experimental. As memory usage cannot be monitored in real time in dynamic adaptive mode, an OOM error may still occur to handle large memory allocations. <br/>`3`: Disable MemoryTracker. MemoryTracker only logs memory usage and does not interfere with executions even if the limit is exceeded.| Yes|
|`memory_tracker_untracked_reserved_memory_mb` |`50`| The reserved memory that is not tracked by the Memory Tracker. Unit: MB.| Yes|
|`memory_tracker_detail_log` |`false` | Whether to enable the Memory Tracker log. When the value is `true`, the Memory Tracker log is generated.| Yes|
|`memory_tracker_detail_log_interval_ms` |`60000`| The time interval for generating the Memory Tracker log. Unit: Millisecond. `memory_tracker_detail_log` is `true` when this parameter takes effect.| Yes|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Graph 服务提供了两份初始配置文件`nebula-graphd.conf.default`和`neb

| 名称 | 预设值 | 说明 |是否支持运行时动态修改|
| :------------------- | :------------------------ | :------------------------------------------ |---------------------|
|`memory_tracker_limit_ratio` |`0.8` |取值可设置为:`(0, 1]`、`2`、`3`。<br/>**警惕:设置该参数时请确保`system_memory_high_watermark_ratio`的值不为`1`,否则该参数的值不生效。**<br/>`(0, 1]`:可用内存的百分比。计算公式:可用内存的百分比 = 可用内存 / (总内存 - 保留内存)。<br/>当预期的查询所需内存大于当前可用内存时,{{nebula.name}}停止接受查询。<br/> **注意**:对于混合部署的集群,需要根据实际情况**调小**该参数。例如,当预期 Graphd 只占用 50% 的内存时,该参数的值可设置为小于`0.5`。<br/>`2`:动态自适应模式(Dynamic Self Adaptive),Memory Tracker 会根据系统当前的可用内存,动态调整可用内存。<br/>**注意**:此功能为实验性功能,由于动态自适应不能做到实时监控操作系统内存使用情况,在一些大内存分配的场景,还是会存在 OOM 可能。<br/>`3`:关掉 Memory Tracker,Memory Tracker 将只记录内存使用情况,即使超过限额,也不会干预执行。|支持|
|`memory_tracker_limit_ratio` |`0.8` |取值可设置为:`(0, 1]`、`2`、`3`。<br/>**警惕:设置该参数时请确保`system_memory_high_watermark_ratio`的值不为`1`,否则该参数的值不生效。**<br/>`(0, 1]`:可用内存的百分比。计算公式:可用内存的百分比 = 可用内存 / (总内存 - 保留内存)。<br/>当正在进行的查询导致内存使用超过配置的内存限制时,该查询会失败,并在失败后释放内存。<br/> **注意**:对于云上和本地节点混合部署的集群,需要根据实际情况**调小**该参数。例如,当预期 Graphd 只占用 50% 的内存时,该参数的值可设置为小于`0.5`。<br/>`2`:动态自适应模式(Dynamic Self Adaptive),Memory Tracker 会根据系统当前的可用内存,动态调整可用内存。<br/>**注意**:此功能为实验性功能,由于动态自适应不能做到实时监控操作系统内存使用情况,在一些大内存分配的场景,还是会存在 OOM 可能。<br/>`3`:关掉 Memory Tracker,Memory Tracker 将只记录内存使用情况,即使超过限额,也不会干预执行。|支持|
|`memory_tracker_untracked_reserved_memory_mb` |`50`|保留内存的大小,单位:MB。|支持|
|`memory_tracker_detail_log` |`false` | 是否定期生成较详细的内存跟踪日志。当值为`true`时,会定期生成内存跟踪日志。|支持|
|`memory_tracker_detail_log_interval_ms` |`60000`|内存跟踪日志的生成时间间隔,单位:毫秒。仅当`memory_tracker_detail_log``true`时,该参数生效。|支持|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ rocksdb options 配置的格式为`{"<option_name>":"<option_value>"}`,多个
| 名称 | 预设值 | 说明 |是否支持运行时动态修改|
| :------------------- | :------------------------ | :------------------------------------------ |:----------------------- |
|`memory_tracker_limit_ratio` |`0.8` |取值可设置为:`(0, 1]`、`2`、`3`。<br/>`(0, 1]`:可用内存的百分比。计算公式:可用内存的百分比 = 可用内存 / (总内存 - 保留内存)。<br/>当预期的查询所需内存大于当前可用内存时,{{nebula.name}}停止接受查询。<br/> **注意**:对于混合部署的集群,需要根据实际情况**调小**该参数。例如,当预期 Graphd 只占用 50% 的内存时,该参数的值可设置为小于`0.5`。<br/>`2`:动态自适应模式(Dynamic Self Adaptive),Memory Tracker 会根据系统当前的可用内存,动态调整可用内存。<br/>**注意**:此功能为实验性功能,由于动态自适应不能做到实时监控操作系统内存使用情况,在一些大内存分配的场景,还是会存在 OOM 可能。<br/>`3`:关掉 Memory Tracker,Memory Tracker 将只记录内存使用情况,即使超过限额,也不会干预执行。|支持|
|`memory_tracker_limit_ratio` |`0.8` |取值可设置为:`(0, 1]`、`2`、`3`。<br/>`(0, 1]`:可用内存的百分比。计算公式:可用内存的百分比 = 可用内存 / (总内存 - 保留内存)。<br/>当正在进行的查询导致内存使用超过配置的内存限制时,该查询会失败,并在失败后释放内存。<br/> **注意**:对于云上和本地节点混合部署的集群,需要根据实际情况**调小**该参数。例如,当预期 Graphd 只占用 50% 的内存时,该参数的值可设置为小于`0.5`。<br/>`2`:动态自适应模式(Dynamic Self Adaptive),Memory Tracker 会根据系统当前的可用内存,动态调整可用内存。<br/>**注意**:此功能为实验性功能,由于动态自适应不能做到实时监控操作系统内存使用情况,在一些大内存分配的场景,还是会存在 OOM 可能。<br/>`3`:关掉 Memory Tracker,Memory Tracker 将只记录内存使用情况,即使超过限额,也不会干预执行。|支持|
|`memory_tracker_untracked_reserved_memory_mb` |`50`|保留内存的大小,单位:MB。|支持|
|`memory_tracker_detail_log` |`false` | 是否定期生成较详细的内存跟踪日志。当值为`true`时,会定期生成内存跟踪日志。|支持|
|`memory_tracker_detail_log_interval_ms` |`60000`|内存跟踪日志的生成时间间隔,单位:毫秒。仅当`memory_tracker_detail_log`为`true`时,该参数生效。|支持|
Expand Down

0 comments on commit 32b1061

Please sign in to comment.