Skip to content

Commit

Permalink
Add map_prealloc_disabled to template.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
yinjiping committed Sep 30, 2024
1 parent 6cf1812 commit 340f993
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
19 changes: 10 additions & 9 deletions server/agent_config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1477,15 +1477,6 @@ static_config:
# The configuration is only effective if DWARF is enabled.
dwarf-shard-map-size: 128

# Disable the feature of pre-allocating memory during hash map creation
# Default: false
# Note:
# When full map preallocation is too expensive, setting 'map_prealloc_disabled' to true will
# prevent memory pre-allocation during map definition, but it may result in some performance
# degradation. This configuration only applies to maps of type 'BPF_MAP_TYPE_HASH'.
# Currently applicable to socket trace and uprobe Golang/OpenSSL trace functionalities.
map_prealloc_disabled: false

# Java compliant update latency time
# Default: 60s. Range: [5, 3600]s
# Note:
Expand Down Expand Up @@ -1650,6 +1641,16 @@ static_config:
# eBPF hook on the CPU consumption of the application process.
syscall-trace-id-disabled: false

# Disable Pre-allocating Memory
# Default: false
# Note:
# When full map preallocation is too expensive, setting 'map_prealloc_disabled' to true will
# prevent memory pre-allocation during map definition, but it may result in some performance
# degradation. This configuration only applies to maps of type 'BPF_MAP_TYPE_HASH'.
# Currently applicable to socket trace and uprobe Golang/OpenSSL trace functionalities.
# Disabling memory preallocation will reduce memory usage by approximately 60MB.
map-prealloc-disabled: false

######################################
## Agent Running in Standalone Mode ##
######################################
Expand Down
21 changes: 21 additions & 0 deletions server/agent_config/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,27 @@ inputs:
# 当 trace_id 注入所有请求时,所有请求的 syscall_trace_id 计算逻辑可以关闭。这将大大减少
# eBPF hook 进程的 CPU 消耗。
syscall_trace_id_disabled: false
# type: bool
# name:
# en: Disable Pre-allocating Memory
# ch: 禁用预分配内存
# unit:
# range: []
# enum_options: []
# modification: agent_restart
# ee_feature: false
# description:
# en: |-
# When full map preallocation is too expensive, setting 'map_prealloc_disabled' to true will
# prevent memory pre-allocation during map definition, but it may result in some performance
# degradation. This configuration only applies to maps of type 'BPF_MAP_TYPE_HASH'.
# Currently applicable to socket trace and uprobe Golang/OpenSSL trace functionalities.
# Disabling memory preallocation will approximately reduce memory usage by 60MB.
# ch: |-
# 当完整的map预分配过于昂贵时,将 `map_prealloc_disabled` 设置为 true 可以防止在定义map时进行
# 内存预分配,但这可能会导致一些性能下降。此配置仅适用于 `BPF_MAP_TYPE_HASH` 类型的 bpf map。
# 目前适用于 socket trace 和 uprobe Golang/OpenSSL trace 功能。禁用内存预分配大约会减少60M的内存占用。
map_prealloc_disabled: false
# type: section
# name:
# en: Preprocess
Expand Down

0 comments on commit 340f993

Please sign in to comment.