好消息!在 3.10 版本的硬件上,你的同乡伙伴们现在也能运行 eBPF 了!
DeepFlow 的 eBPF 特性支持 RedHat/CentOS 的 3.10 内核了!
01
RedHat/CentOS 做了什么
日前,DeepFlow 一名潜在客户提到红帽在 3.10 内核中移植了一部分 eBPF 特性,让我司研发评估 DeepFlow 适配的可能性。在红帽的文章中提到:
eBPF in Red Hat Enterprise Linux 7.6 is enabled only for tracing purposes, which allows attaching eBPF programs to probes, tracepoints and perf events. Other use cases such as eBPF socket filters or eXpress DataPath (XDP) are not enabled at this stage.
好巧不巧,对于可观测性场景来讲恰好也够用了!这个评估工作早年我们实际上有过心动,但考虑到发行版的限制以及红帽的免责声明最终放弃了在 DeepFlow 中进行支持。此次由于得到了客户的鼓励,我们正式开启了严谨的评估、适配、测试的工作,并且于近日 DeepFlow 6.4 LTS 发布前顺利完成。
02
DeepFlow 做了什么
总结来讲,目前 DeepFlow 中的 eBPF 能力(AutoTracing、AutoProfiling)对内核版本的要求如下:
体系架构 | 发行版 | 内核版本 | kprobe [4] | Golang uprobe | OpenSSL uprobe | perf |
---|---|---|---|---|---|---|
X86 | CentOS 7.9 | 3.10.0 [1] | Y | Y [2] | Y [2] | Y |
RedHat 7.6 | 3.10.0 [1] | Y | Y [2] | Y [2] | Y | |
* | 4.9-4.13 | Y | ||||
* | 4.14 [3] | Y | Y [2] | Y | ||
* | 4.15 | Y | Y [2] | Y | ||
* | 4.16 | Y | Y | Y | ||
* | 4.17+ | Y | Y | Y | Y | |
ARM | CentOS 8 | 4.18 | Y | Y | Y | Y |
EulerOS | 5.10+ | Y | Y | Y | Y | |
麒麟 KylinOS V10 SP3+ | 4.19.90-52.25+ | Y | Y | Y | Y | |
其他发行版 | 5.8+ | Y | Y | Y | Y |
上表中对内核版本的额外说明:
- [1]: 在这两个发行版中,DeepFlow 支持版本号高于 3.10.0-940 的内核
- [2]: 目前尚不支持使用 uprobe hook 在容器内部运行的 Golang/OpenSSL 进程
- [3]: 在内核 4.14 版本中,一个 tracepoint 不能被多个 eBPF program attach(如:不能同时运行两个或多个 deepflow-agent),其他版本不存在此问题
- [4]: 包括 kprobe 和 tracepoint
03
注意事项
虽然红帽有下述免责声明,但目前我们已经测试了 3.10.0-940 之上的几个小版本内核,若对 DeepFlow 中零侵扰的分布式追踪能力有强烈需求,可以一试:
The eBPF in Red Hat Enterprise Linux 7.6 is provided as Tech Preview and thus doesn't come with full support and is not suitable for deployment in production. It is provided with the primary goal to gain wider exposure, and potentially move to full support in the future. eBPF in Red Hat Enterprise Linux 7.6 is enabled only for tracing purposes, which allows attaching eBPF programs to probes, tracepoints and perf events.
对于 Preview 类新特性,这时候 eBPF 的核心优势就能体现价值了:安全,不崩!
04
什么是 DeepFlow
DeepFlow 是云杉网络开发的一款可观测性产品,旨在为复杂的云基础设施及云原生应用提供深度可观测性。DeepFlow 基于 eBPF 实现了应用性能指标、分布式追踪、持续性能剖析等观测信号的零侵扰(Zero Code)采集,并结合智能标签(SmartEncoding)技术实现了所有观测信号的全栈(Full Stack)关联和高效存取。使用 DeepFlow,可以让云原生应用自动具有深度可观测性,从而消除开发者不断插桩的沉重负担,并为 DevOps/SRE 团队提供从代码到基础设施的监控及诊断能力。
GitHub 地址:https://github.com/deepflowio/deepflow
访问 DeepFlow Demo,体验零插桩、全覆盖、全关联的可观测性。
推荐阅读
-
好消息!在 3.10 版本的硬件上,你的同乡伙伴们现在也能运行 eBPF 了!
-
[【科普来了】一文读懂PE:什么是PE,PE怎么用?......- I. 什么是 PE? PE的英文全称是Preinstallation Environment,翻译过来就是预装环境。有了这个名字就好理解了,可以直接说它是一个预装的、微型的或精简版的系统。它的体积非常小,大多数 PE 通常只有一两百兆,通常我们可以把它安装在 U 盘或移动硬盘上,随身携带,在任何电脑上启动它。无需依赖电脑上的原始系统。 二、PE 可以做什么? 网上的 PE 工具大多是由很多喜欢折腾电脑的玩家或团队制作的,根据制作者和团队的不同,PE 的功能也会有所不同。但核心的系统安装、系统备份还原、硬盘分区、启动修复之类的系统维护功能还是有的,而且大多差别不大。 区别基本在于集成维护工具的数量,比如一个简单的系统安装功能,可以通过很多工具来实现,不同 PE 之间的区别仅在于工具数量和工具版本的新旧。 其次,一些常用的工具还有开机密码去除、硬件检测等功能,还有一个实用的功能就是文件强制删除,相信有些小伙伴在删除文件时会遇到出现权限不足等提示而无法删除,在PE中就不会出现这样的情况,因为PE是默认以最高权限运行的,对于这类情况可以直接删除。 一些功能比较丰富的 PE 还会具备联网功能,以及集成一些常用软件(如 Office),如果只是临时使用,甚至可以把它当作一个正常的系统来使用。 三、使用 PE 安装系统的好处? 首先当然是如上所述,PE 功能齐全,类似硬盘分区等操作你都可以在装系统之前提前搞定,避免了装完系统之后还要一步步去搞定的麻烦。 其次,个人觉得最方便的就是可以用最简单的方法一次性创建多系统启动盘。 用U盘装系统的朋友应该都知道,在制作启动U盘时一般一个系统只能写入一次,比如你只有一个U盘,你要装Win10就要制作一个启动盘,要装Win7又要重新制作一个,而且每次都要格式化,非常不方便。虽然也有制作一体化镜像,然后一次性写入的方法,但操作起来太麻烦、太繁琐。 有了 PE,就可以避免这种麻烦,只需把 PE 写入 U 盘,然后把需要安装的系统镜像都放到 U 盘里,只要 U 盘空间足够,想放多少就放多少,避免了因为安装不同系统而反复制作启动盘的麻烦。而且,由于制作一次后无需格式化,你还可以在 U 盘中放入其他数据,而不必担心文件丢失。 四、可靠的好 PE 推荐 其实,PE工具虽然有很多种,但其实功能都差不多,无非就是更新的快慢而已。 但关键在于靠谱,什么叫靠谱呢?虽然都能用,功能也全,但有的夹杂着 "私货"。说白了,就是捆绑软件,或者捆绑主页,或者怎么卸载都不干净的那种。