traffic footprint characterization of workloads using bpf
play

Traffic Footprint Characterization of Workloads using BPF Aditi - PowerPoint PPT Presentation

Traffic Footprint Characterization of Workloads using BPF Aditi Ghag aghag@vmware.com VMware Outline Background Scheduling use case Characterization of workloads eBPF based framework Traffic footprint-aware container scheduling


  1. Traffic Footprint Characterization of Workloads using BPF Aditi Ghag aghag@vmware.com VMware

  2. Outline Background Scheduling use case Characterization of workloads eBPF based framework Traffic footprint-aware container scheduling Discussion

  3. Diversity of Workloads Latency Throughput Distributed and Short-lived sensitive intensive Communication intensive Data analytics Web search Functions Microservices Map reduce Front-end live VMs In-memory key- migration value store

  4. Resources • Containerization Scheduling use case • Container Orchestration frameworks

  5. Current Container Scheduling • CPU • Memory • Policy How do we add network awareness to the scheduler?

  6. Characterization • Identify network characteristics of workloads of Workloads

  7. Traffic Footprint Characterization of Workloads Elephants v/s Mice § Elephant flows fill up network buffers § packet drops and queuing delays § Increased tail latency of mice flows Containers (or VMs) that source or sink elephant flows: heavy network footprint

  8. Effect of Elephant flows on Mice Flows 99 th percentile sockperf: Mice Flows latency iperf: Elephant Flows Various sockperf and sockperf iperf sockperf iperf 14.04 ms (≈ 50X) iperf pods client client server server placements iperf iperf Worker Node 1 client server 3.32 ms (≈ 12X) sockperf sockperf client server sockperf sockperf iperf iperf 0.62 ms (≈ 2.4X) client server client server sockperf sockperf 0.28 ms ( Baseline) client server Kubernetes Worker Worker Worker Worker Worker Node 1 Node 2 Node 3 Node 4 Node 5 Cluster Hypervisor KVM A KVM B

  9. Detecting and Mapping Elephant Flows in End Hosts Detecting Elephant Closer to application: Mapping Elephant flows to Flows has more context containers/VM(s) Learn workload network • footprint Identify network state at • infrastructure level

  10. Traffic Footprint Characterizing eBPF based Elephant Flows Detection and Mapping Framework

  11. eBPF and Conntrack • Conntrack tracks lifecycle of every flow • eBPF enables to run user-supplied programs inside of kernel • eBPF programs attached to Conntrack kernel events

  12. eBPF Tracing with Conntrack Data Structures • BPF hash map • Flow entry key • Flow attributes value

  13. Data Structures struct flow_key struct flow_stats { { u32 src_addr; char iface_name[IFNAMSIZ]; u32 dst_addr; u64 tstamp; u16 src_port; u16 zone_id; u16 dst_port; bool is_elephant_flow; u8 protocol; }; };

  14. eBPF Tracing with Conntrack Elephant Flows Data Structures Detection and Mapping • 1 st hook point: Add flow • 2 nd hook point: Update flow counters • 3 rd hook point: Delete flow

  15. Obje Ob jectiv ive: : De Detect and map ele lephan ant flo lows to contain ainers/VM(s) Delete Flow Add Flow Update Flow (1 st Hook point) BPF_HASH(flows, struct flow_key, struct flow_stats); int kprobe__nf_ct_deliver_cached_events(struct pt_regs *ctx, const struct nf_conn *ct) { // Look for ‘ASSURED’ flows // Create flow entry in BPF hash map }

  16. Obje Ob jectiv ive: : De Detect and map ele lephan ant flo lows to contain ainers/VM(s) Add Flow Update Flow Delete Flow (2 nd Hook point) // BPF table for sending ‘add mapped elephant flows’ event data to user space BPF_PERF_OUTPUT(add_mapped_elephant_flows); int kprobe__nf_ct_refresh_acct(struct pt_regs *ctx, const struct nf_conn *ct, enum ip_conntrack_info ctinfo, const struct sk_buff *skb) { // Parse kernel data structures // Identify elephant flows using number of bytes transferred // Generate add elephant flow event add_mapped_elephant_flows.perf_submit(ctx, &flow_stats, sizeof(flow_stats)); }

  17. Obje Ob jectiv ive: : De Detect and map ap ele lephan ant flo lows to contain ainers/VM(s) Delete Flow Add Flow Update Flow (3 rd Hook point) // BPF table for sending ‘delete mapped elephant flows’ event data to user space BPF_PERF_OUTPUT(del_mapped_elephant_flows); bool kprobe__nf_ct_delete(struct pt_regs *ctx, const struct nf_conn *ct) { // If the given flow is marked as an elephant flow, generate delete elephant // flow event // Delete entry from BPF map del_mapped_elephant_flows.perf_submit(ctx, &flow_stats, sizeof(flow_stats)); }

  18. eBPF Tracing with Conntrack Elephant Flows Attributing Elephant Data Structures Detection and Flows to Containers Mapping • Conntrack Zones as identifiers

  19. Traffic Footprint- aware • Network-aware Kubernetes scheduler Resource Scheduling

  20. Augmenting Container Scheduler (1) • Tag workloads with network footprint information • Proactively isolate heavy and light footprint workloads • Prefer hosts with less number of elephant flows

  21. Augmenting Container Scheduler (2) Go Goal: In Intel elligen ent pl placemen ement of a po pod d in n a VM (aka no node) de) 4 Filter and Rank nodes based on CPU, memory Mapping of Elephant and traffic footprint of pod flows to VMs Deploy 2 3 New Pod Kubernetes Scheduler Worker Number of node Elephant Flows 5 Pod Bind Pod Worker Worker . . . to the Node 1 Node N Best Node Data Collector 1 eBPF Elephant Flows Detection + Mapping . . . Hypervisor Hypervisor

  22. Other use cases • Receive-side scaling • Resources allocation • Hardware offloading • Flowlet generation

  23. Future Work • Use Conntrack metadata to store flow stats • Deploy in high scale environments • Explore other use cases • Identify other network characteristics

  24. Thank you Questions?

Recommend


More recommend