Cloud Native

Version: 25.03

CTinspector Introduction

Overview

CTinspector is a language VM framework developed by China Telecom e-Cloud Technology Co., Ltd. based on the eBPF instruction set. CTinspector enables quick expansion of application instances to diagnose network performance bottlenecks, storage I/O hotspots, and load balancing issues, ensuring stable and timely diagnosis during system running.

Before CTinspector introduces the O&M and problem analysis of the cloud base system, the OVS O&M and ACL configuration efficiency is relatively low, and some functions are not supported.

  • The filtering field needed by the maintenance personnel is not implemented, or the AND or NOT condition expression is not supported.

  • Many commands in the system have similar filtering requirements, such as CT flow tables, OpenFlow flow tables, and offload flow tables. Developing command parameters for each flow table is a heavy development burden.

  • Stateful filtering, for example, viewing the flow table that matches the most packets, cannot be implemented based on command parameters. Traditional filtering rules are for individual flow tables. The relationships between flow tables cannot be established.

Architecture

CTinspector uses a packet VM of the eBPF instruction set. The minimum size of the packet VM is 256 bytes, covering registers, segments (stack, code, and data), and page tables. The packet VM supports independent migration, in which the packet VM code can invoke the migrate kernel function to migrate to a specified node. It also supports resumable execution, that is, once migrated, the packet VM continues to execute the next instruction from the position where it has been interrupted on the previous node.

The overall architecture of CTinspector is as follows:

The CTinspector framework comprises the following components:

  • eBPF compiler/JIT: The eBPF compiler compiles C code into eBPF binary code, and JIT compiles eBPF instructions into machine code.

  • eBPF linker/loader: loads and links library functions, that is, kernel functions.

  • Runner: executes the eBPF VM, including loading registers, code segments, and stacks, and mapping data segments.

  • Scheduler: determines when to execute the eBPF VM, including determining the VM status and dependency wait conditions.

  • Basic kernel functions: basic library functions, such as transporter, memory mapper, fork, and join_meeting.

  • Extended kernel functions: custom library functions provided by each hook point in addition to the core functions provided by the eBPF VM runner.

  • Memory mapper: maps application data to the eBPF VM to ensure the eBPF program can read and write application data.