Skip to content

Commit 1dd94bb

Browse files
rvqlsharang
authored andcommitted
feat: Add config to pcap output queue size
1 parent 53dbc15 commit 1dd94bb

5 files changed

Lines changed: 83 additions & 7 deletions

File tree

agent/src/config/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,7 @@ impl Default for TcpHeader {
15351535
#[serde(default)]
15361536
pub struct PcapStream {
15371537
pub receiver_queue_size: usize,
1538+
pub sender_queue_size: usize,
15381539
pub buffer_size_per_flow: u32,
15391540
pub total_buffer_size: u64,
15401541
#[serde(with = "humantime_serde")]
@@ -1545,6 +1546,7 @@ impl Default for PcapStream {
15451546
fn default() -> Self {
15461547
Self {
15471548
receiver_queue_size: 65536,
1549+
sender_queue_size: 8192,
15481550
buffer_size_per_flow: 65536,
15491551
total_buffer_size: 88304,
15501552
flush_interval: Duration::from_secs(60),

agent/src/trident.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,11 +2522,7 @@ impl AgentComponents {
25222522
let pcap_batch_queue = "2-pcap-batch-to-sender";
25232523
let (pcap_batch_sender, pcap_batch_receiver, pcap_batch_counter) =
25242524
queue::bounded_with_debug(
2525-
user_config
2526-
.processors
2527-
.packet
2528-
.pcap_stream
2529-
.receiver_queue_size,
2525+
user_config.processors.packet.pcap_stream.sender_queue_size,
25302526
pcap_batch_queue,
25312527
&queue_debugger,
25322528
);

server/agent_config/README-CH.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3715,7 +3715,8 @@ inputs:
37153715
[eBPF] INFO openssl uprobe, pid:1005, path:/proc/1005/root/usr/lib64/libssl.so.1.0.2k
37163716
```
37173717
3718-
注意:开启此功能时,需要同时在 `inputs.proc.process_matcher` 中进一步指定具体的进程列表,
3718+
注意:开启此功能后,Envoy mTLS 流量可自动完成追踪;
3719+
若为非 Envoy 流量,则需要同时在 `inputs.proc.process_matcher` 中进一步指定具体的进程列表,
37193720
即 `inputs.proc.process_matcher.[*].enabled_features` 中需要包含 `ebpf.socket.uprobe.tls`。
37203721
37213722
##### DPDK {#inputs.ebpf.socket.uprobe.dpdk}
@@ -6788,6 +6789,35 @@ processors:
67886789

67896790
设置 deepflow-agent 的 1-mini-meta-packet-to-pcap 队列大小。
67906791

6792+
#### Sender 队列大小 {#processors.packet.pcap_stream.sender_queue_size}
6793+
6794+
**标签**:
6795+
6796+
<mark>agent_restart</mark>
6797+
<mark>ee_feature</mark>
6798+
6799+
**FQCN**:
6800+
6801+
`processors.packet.pcap_stream.sender_queue_size`
6802+
6803+
**默认值**:
6804+
```yaml
6805+
processors:
6806+
packet:
6807+
pcap_stream:
6808+
sender_queue_size: 8192
6809+
```
6810+
6811+
**模式**:
6812+
| Key | Value |
6813+
| ---- | ---------------------------- |
6814+
| Type | int |
6815+
| Range | [4096, 64000000] |
6816+
6817+
**详细描述**:
6818+
6819+
设置 deepflow-agent 的 2-pcap-batch-to-sender 队列大小。
6820+
67916821
#### 每个 Flow 的缓冲区大小 {#processors.packet.pcap_stream.buffer_size_per_flow}
67926822
67936823
**标签**:

server/agent_config/README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,8 @@ to the following:
37863786
[eBPF] INFO openssl uprobe, pid:1005, path:/proc/1005/root/usr/lib64/libssl.so.1.0.2k
37873787
```
37883788

3789-
Note: When enabling this feature, the specific process list must also be specified in `inputs.proc.process_matcher`,
3789+
Note: When this feature is enabled, Envoy mTLS traffic can be automatically traced.
3790+
For non-Envoy traffic, the specific process list must also be specified in `inputs.proc.process_matcher`,
37903791
i.e., `ebpf.socket.uprobe.tls` must be included in `inputs.proc.process_matcher.[*].enabled_features`.
37913792

37923793
##### DPDK {#inputs.ebpf.socket.uprobe.dpdk}
@@ -6945,6 +6946,36 @@ processors:
69456946
The length of the following queues:
69466947
- 1-mini-meta-packet-to-pcap
69476948

6949+
#### Sender Queue Size {#processors.packet.pcap_stream.sender_queue_size}
6950+
6951+
**Tags**:
6952+
6953+
<mark>agent_restart</mark>
6954+
<mark>ee_feature</mark>
6955+
6956+
**FQCN**:
6957+
6958+
`processors.packet.pcap_stream.sender_queue_size`
6959+
6960+
**Default value**:
6961+
```yaml
6962+
processors:
6963+
packet:
6964+
pcap_stream:
6965+
sender_queue_size: 8192
6966+
```
6967+
6968+
**Schema**:
6969+
| Key | Value |
6970+
| ---- | ---------------------------- |
6971+
| Type | int |
6972+
| Range | [4096, 64000000] |
6973+
6974+
**Description**:
6975+
6976+
The length of the following queues:
6977+
- 2-pcap-batch-to-sender
6978+
69486979
#### Buffer Size Per Flow {#processors.packet.pcap_stream.buffer_size_per_flow}
69496980

69506981
**Tags**:

server/agent_config/template.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4772,6 +4772,23 @@ processors:
47724772
receiver_queue_size: 65536
47734773
# type: int
47744774
# name:
4775+
# en: Sender Queue Size
4776+
# ch: Sender 队列大小
4777+
# unit:
4778+
# range: [4096, 64000000]
4779+
# enum_options: []
4780+
# modification: agent_restart
4781+
# ee_feature: true
4782+
# description:
4783+
# en: |-
4784+
# The length of the following queues:
4785+
# - 2-pcap-batch-to-sender
4786+
# ch: |-
4787+
# 设置 deepflow-agent 的 2-pcap-batch-to-sender 队列大小。
4788+
# upgrade_from:
4789+
sender_queue_size: 8192
4790+
# type: int
4791+
# name:
47754792
# en: Buffer Size Per Flow
47764793
# ch: 每个 Flow 的缓冲区大小
47774794
# unit:

0 commit comments

Comments
 (0)