ArthurChiao's Blog

Recent Posts

  • 2022-08-28

    TCP Socket Listen: A Tale of Two Queues (2022)

    TL; DRThis post digs into the design and implementation of the TCP listen queuesin Linux kernel. Hope that after reading through this post, readers will have adeeper understanding about the underlying working mechanism of TCP/socketlistening and 3-way handshaking, as...

  • 2022-08-06

    The Mysterious Container net.core.somaxconn (2022)

    TL; DRTry to answer several quick questions with a long post: On creating a pod in Kubernetes, if somaxconn is not specified, what the default value will be, and who will set it? If changing node’s sysctl settings, will they be propagated to pods? Are all sysctl p...

  • 2022-07-25

    Differentiate three types of eBPF redirects (2022)

    TL; DRThere are three types of eBPF redirection fashions in Linux kernel that mayconfuse developers often: bpf_redirect_peer() bpf_redirect_neighbor() bpf_redirect()This post helps to clarify them by digging into the code in history order,and also discusses usages...

  • 2022-07-18

    Linux tracing/profiling 基础:符号表、调用栈、perf/bpftrace 示例等(2022)

    整理一些 tracing/profiling 笔记,目前大部分内容都来自Practical Linux tracing系列文章。 1 引言 1.1 热点与调用栈分析(perf record/report/script) 1.1.1 采样:perf record 1.1.2 查看函数 CPU 占用量:perf report 1.1.3 打印调用栈:perf script 1.1.4 生成火焰图:perf script | ....

  • 2022-07-14

    Cracking Kubernetes Authentication (AuthN) Model (2022)

    Part of this post’s contents first appeared in User and workload identities in Kubernetes,which was kindly edited, re-illustrated and exemplified by learnk8s.io, andvery friendly to beginners.The version posted here in contrast has a biased focus on the design andimp...

  • 2022-07-02

    Linux 网络栈原理、监控与调优:前言(2022)

    本文尝试从技术研发与工程实践(而非纯理论学习)角度,在原理与实现、监控告警、配置调优三方面介绍内核5.10 网络栈。由于内容非常多,因此分为了几篇系列文章。原理与实现 Linux 网络栈原理、监控与调优:前言 Linux 中断(IRQ/softirq)基础:原理及内核实现 Linux 网络栈接收数据(RX):原理及内核实现 Linux 网络栈发送数据(TX):原理及内核实现(TBD)监控 Monitoring Linux Network Stack调优 Linux 网络栈接收数据(RX):配置调优 Linux 网络...

  • 2022-07-02

    Linux 网络栈接收数据(RX):配置调优(2022)

    本文尝试从技术研发与工程实践(而非纯理论学习)角度,在原理与实现、监控告警、配置调优三方面介绍内核 5.10 网络栈。由于内容非常多,因此分为了几篇系列文章。原理与实现 Linux 网络栈原理、监控与调优:前言 Linux 中断(IRQ/softirq)基础:原理及内核实现 Linux 网络栈接收数据(RX):原理及内核实现监控 Monitoring Linux Network Stack调优 Linux 网络栈接收数据(RX):配置调优 1 网络设备驱动初始化 1.1 调整 RX 队列数量(eth...

  • 2022-07-02

    Linux 网络栈接收数据(RX):原理及内核实现(2022)

    Fig. Steps of Linux kernel receiving data process and the corresponding chapters in this post本文尝试从技术研发与工程实践(而非纯理论学习)角度,在原理与实现、监控告警、配置调优三方面介绍内核5.10 网络栈。由于内容非常多,因此分为了几篇系列文章。原理与实现 Linux 网络栈原理、监控与调优:前言 Linux 中断(IRQ/softirq)基础:原理及内核实现 Linux 网络栈接收数据(RX):原理及内核实现 Linux 网...

  • 2022-07-02

    Linux 中断(IRQ/softirq)基础:原理及内核实现(2022)

    1 什么是中断? 2 硬中断 2.1 中断处理流程 2.2 中断类型 系统支持的最大硬中断数量 MSI(Message Signaled Interrupts)/ MSI-X 2.3 Maskable and non-maskable(可关闭和不可关闭中断) 2.4 问题:执行足够快 vs 逻辑比较复杂 2.5 解决方式:延后中断处理(deferred interrupt handlin...

  • 2022-06-04

    K8s 的核心是 API 而非容器(一):从理论到 CRD 实践(2022)

    本文最初串联了以下几篇文章的核心部分, Kubernetes isn’t about containers,2021 Kubernetes is a Database, 2019 CRD is just a table in Kubernetes, 2020论述了 K8s 的核心价值是其通用、跨厂商和平台、可灵活扩展的声明式 API 框架,而不是容器(虽然容器是它成功的基础);然后手动创建一个 API extension(CRD),通过测试和类比来对这一论述有一个更直观的理解。例子及测试基于 K8s v1.21.0,感谢原...