Skip to content

eCapture1.52版本是否进行过基础的性能和压力测试? #990

Description

@fengzhibo294

运行环境:

  • 操作系统:openEuler 22.03 (LTS-SP3) x86_64
  • 硬件:虚拟机,Intel Xeon E5-2620 v4 2.10GHz,16 核
  • eCapture:1.52 版本(Ubuntu 环境自行编译)
  • OpenSSL:1.1.1w(2023-11-16)、 nginx/1.21.5

程序修改与运行配置:
1、eBPF Map 大小 const MapSize int = 1024 * 8
2、关闭核心逻辑:注释 m.processor.Write(eventStruct),不做 HTTPS 明文解析,仅保留基础连接 / 事件识别
具体操作是在dumpSslData函数注释掉//m.processor.Write(eventStruct)
3、新增日志:
AddConn 函数打印新连接建立日志
dumpSslData 函数打印 SSL 数据事件日志(UUID 去重,仅首次打印)
4、去重机制(m *MOpenSSLProbe) dumpSslData中

			connInfo := m.GetConn(eventStruct.Pid, eventStruct.Fd)
			if connInfo == nil {
				...
			}else {
				...
				
				//添加的代码 uuidQueue原型声明var uuidQueue map[string]bool
				uuid := eventStruct.GetUUID()
				if !uuidQueue[uuid] {
					uuidQueue[uuid] = true
					m.logger.Debug().Str("dumpSslData uuid", uuid).Msg("")
				}
			}
	5、日志输出:全部重定向到 log.log

测试用例:
curl 批量发送 HTTPS 请求,请求参数:HTTP/1.1、关闭长连接(no-keepalive)、上传 96KB 文件。
测试指令:for i in {1..160}; do curl -k -s --http1.1 --no-keepalive -o /dev/null -w "第${i}次:%{http_code}\n" -F "file=@/root/ssl_test/test.txt" https://172.20.64.81/upload; sleep 0.01; done
间隔:0.01s / 0.1s / 0.5s / 1s 均测试过

测试结果:
AddConn 日志 稳定 160 条(连接建立无丢失)
dumpSslData 日志 不稳定:
偶尔 320 条(正常)
绝大多数情况 <320 条(固定丢失事件)
降低请求频率(0.1s~1s)依然丢失
手动测试一条接一条测试测试正常,间隔2-3秒curl -k -F "file=@/root/ssl_test/test.txt" https://172.20.64.81/upload

核心结论:
请问下eCapture 1.5.2 官方做过基础性能 / 压力测试?

麻烦帮忙看下,谢谢!@cfc4n @yuweizzz

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions