<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linux &#8211; Noise</title>
	<atom:link href="https://noise.getoto.net/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://noise.getoto.net</link>
	<description>The collective thoughts of the interwebz</description>
	<lastBuildDate>Wed, 29 Oct 2025 13:00:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>So long, and thanks for all the fish: how to escape the Linux networking stack</title>
		<link>https://noise.getoto.net/2025/10/29/so-long-and-thanks-for-all-the-fish-how-to-escape-the-linux-networking-stack/</link>
		
		<dc:creator><![CDATA[Chris Branch]]></dc:creator>
		<pubDate>Wed, 29 Oct 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[Egress]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[research]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=91256c9be3cbd319968a5d477320c197</guid>

					<description><![CDATA[Many products at Cloudflare aren’t possible without pushing the limits of network hardware and software to deliver improved performance, increased efficiency, or novel capabilities such as soft-unicast, our method for sharing IP subnets across data centers. Happily, most people do not need to know the intricacies of how your operating system handles network and Internet access in general. Yes, even most people within Cloudflare. But sometimes we try to push well beyond the design intentions of Linux’s networking stack. This is a story about one of those attempts.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>How to build your own VPN, or: the history of WARP</title>
		<link>https://noise.getoto.net/2025/10/29/how-to-build-your-own-vpn-or-the-history-of-warp/</link>
		
		<dc:creator><![CDATA[Chris Branch]]></dc:creator>
		<pubDate>Wed, 29 Oct 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[warp]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=f789317da24339edd66973ae0692d5b0</guid>

					<description><![CDATA[WARP’s initial implementation resembled a VPN that allows Internet access through it. Here’s how we built it – and how you can, too.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>A deep dive into BPF LPM trie performance and optimization</title>
		<link>https://noise.getoto.net/2025/10/21/a-deep-dive-into-bpf-lpm-trie-performance-and-optimization/</link>
		
		<dc:creator><![CDATA[Matt Fleming]]></dc:creator>
		<pubDate>Tue, 21 Oct 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[deep dive]]></category>
		<category><![CDATA[eBPF]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=ede9ca85fa7a4162bc63b102f09eb928</guid>

					<description><![CDATA[This post explores the performance of BPF LPM tries, a critical data structure used for IP matching.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Safe in the sandbox: security hardening for Cloudflare Workers</title>
		<link>https://noise.getoto.net/2025/09/25/safe-in-the-sandbox-security-hardening-for-cloudflare-workers/</link>
		
		<dc:creator><![CDATA[Erik Corry]]></dc:creator>
		<pubDate>Thu, 25 Sep 2025 14:00:00 +0000</pubDate>
				<category><![CDATA[Attacks]]></category>
		<category><![CDATA[Birthday Week]]></category>
		<category><![CDATA[Cloudflare Workers]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Malicious JavaScript]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerabilities]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=fd8d79357b0568cba93e1074460c9922</guid>

					<description><![CDATA[We are further hardening Cloudflare Workers with the latest software and hardware features. We use defense-in-depth, including V8 sandboxes and the CPU's memory protection keys to keep your data safe.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>New Linux Vulnerabilities</title>
		<link>https://noise.getoto.net/2025/06/03/new-linux-vulnerabilities/</link>
		
		<dc:creator><![CDATA[Bruce Schneier]]></dc:creator>
		<pubDate>Tue, 03 Jun 2025 11:07:32 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[vulnerabilities]]></category>
		<guid isPermaLink="false">https://www.schneier.com/?p=70309</guid>

					<description><![CDATA[<p>They’re <a href="https://thehackernews.com/2025/05/new-linux-flaws-allow-password-hash.html">interesting</a>:</p>
<blockquote><p>Tracked as <a href="https://www.openwall.com/lists/oss-security/2025/05/29/3">CVE-2025-5054 and CVE-2025-4598</a>, both vulnerabilities are race condition bugs that could enable a local attacker to obtain access to access sensitive information. Tools like Apport and systemd-coredump are designed to handle crash reporting and core dumps in Linux systems.</p>
<p>[…]</p>
<p>“This means that if a local attacker manages to induce a crash in a privileged process and quickly replaces it with another one with the same process ID that resides inside a mount and pid namespace, apport will attempt to forward the core dump (which might contain sensitive information belonging to the original, privileged process) into the namespace.”...</p></blockquote>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>QUIC restarts, slow problems: udpgrm to the rescue</title>
		<link>https://noise.getoto.net/2025/05/07/quic-restarts-slow-problems-udpgrm-to-the-rescue/</link>
		
		<dc:creator><![CDATA[Marek Majkowski]]></dc:creator>
		<pubDate>Wed, 07 May 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[udp]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=8b17e6540859a6902a2787240a6846b8</guid>

					<description><![CDATA[udpgrm is a lightweight daemon for graceful restarts of UDP servers. It leverages SO_REUSEPORT and eBPF to route new and existing flows to the correct server instance.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>New Linux Rootkit</title>
		<link>https://noise.getoto.net/2025/04/24/new-linux-rootkit/</link>
		
		<dc:creator><![CDATA[Bruce Schneier]]></dc:creator>
		<pubDate>Thu, 24 Apr 2025 19:35:15 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rootkits]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.schneier.com/?p=70167</guid>

					<description><![CDATA[<p><a href="https://betanews.com/2025/04/24/hackers-bypass-linux-security-with-armo-curing-rootkit/">Interesting</a>:</p>
<blockquote><p>The company has released a working rootkit called “Curing” that uses io_uring, a feature built into the Linux kernel, to stealthily perform malicious activities without being caught by many of the detection solutions currently on the market.</p>
<p>At the heart of the issue is the heavy reliance on monitoring system calls, which has become the go-to method for many cybersecurity vendors. The problem? Attackers can completely sidestep these monitored calls by leaning on io_uring instead. This clever method could let bad actors quietly make network connections or tamper with files without triggering the usual alarms...</p></blockquote>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>How Netflix Accurately Attributes eBPF Flow Logs</title>
		<link>https://noise.getoto.net/2025/04/08/how-netflix-accurately-attributes-ebpf-flow-logs/</link>
		
		<dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
		<pubDate>Tue, 08 Apr 2025 17:50:58 +0000</pubDate>
				<category><![CDATA[Containers]]></category>
		<category><![CDATA[eBPF]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[observability]]></category>
		<guid isPermaLink="false">https://medium.com/p/afe6d644a3bc</guid>

					<description><![CDATA[By Cheng Xie, Bryan Shultz, and Christine XuIn a previous blog post, we described how Netflix uses eBPF to capture TCP flow logs at scale for enhanced network insights. In this post, we delve deeper into how Netflix solved a core problem: accurately at...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>A steam locomotive from 1993 broke my yarn test</title>
		<link>https://noise.getoto.net/2025/04/02/a-steam-locomotive-from-1993-broke-my-yarn-test/</link>
		
		<dc:creator><![CDATA[Yew Leong]]></dc:creator>
		<pubDate>Wed, 02 Apr 2025 13:00:00 +0000</pubDate>
				<category><![CDATA[deep dive]]></category>
		<category><![CDATA[Developer Platform]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=b7caf2cc47d86de3517b1e431f089ba3</guid>

					<description><![CDATA[Yarn tests fail consistently at the 27-second mark. The usual suspects are swiftly eliminated. A deep dive is taken to comb through traces, only to be derailed into an unexpected crash investigation.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Searching for the cause of hung tasks in the Linux kernel</title>
		<link>https://noise.getoto.net/2025/02/14/searching-for-the-cause-of-hung-tasks-in-the-linux-kernel/</link>
		
		<dc:creator><![CDATA[Oxana Kharitonova]]></dc:creator>
		<pubDate>Fri, 14 Feb 2025 14:00:00 +0000</pubDate>
				<category><![CDATA[deep dive]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=a1b788f940a8a570e3f08691bf6237ec</guid>

					<description><![CDATA[The Linux kernel can produce a hung task warning. Searching the Internet and the kernel docs, you can find a brief explanation that the process is stuck in the uninterruptible state.]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Multi-Path TCP: revolutionizing connectivity, one path at a time</title>
		<link>https://noise.getoto.net/2025/01/03/multi-path-tcp-revolutionizing-connectivity-one-path-at-a-time/</link>
		
		<dc:creator><![CDATA[Marek Majkowski]]></dc:creator>
		<pubDate>Fri, 03 Jan 2025 14:00:00 +0000</pubDate>
				<category><![CDATA[deep dive]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[TCP]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=2570337c324db0df43fad199071effa2</guid>

					<description><![CDATA[Multi-Path TCP (MPTCP) leverages multiple network interfaces, like Wi-Fi and cellular, to provide seamless mobility for more reliable connectivity. While promising, MPTCP is still in its early stages,]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Perfectl Malware</title>
		<link>https://noise.getoto.net/2024/10/14/perfectl-malware/</link>
		
		<dc:creator><![CDATA[Bruce Schneier]]></dc:creator>
		<pubDate>Mon, 14 Oct 2024 11:06:27 +0000</pubDate>
				<category><![CDATA[attribution]]></category>
		<category><![CDATA[cryptocurrency]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.schneier.com/?p=69468</guid>

					<description><![CDATA[<p>Perfectl in an <a href="https://arstechnica.com/security/2024/10/persistent-stealthy-linux-malware-has-infected-thousands-since-2021/">impressive piece</a> of malware:</p>
<blockquote><p>The malware has been circulating since at least 2021. It gets installed by exploiting more than 20,000 common misconfigurations, a capability that may make millions of machines connected to the Internet potential targets, researchers from Aqua Security said. It can also exploit CVE-2023-33246, a vulnerability with a severity rating of 10 out of 10 that was patched last year in Apache RocketMQ, a messaging and streaming platform that’s found on many Linux machines.</p>
<p>The researchers are calling the malware Perfctl, the name of a malicious component that surreptitiously mines cryptocurrency. The unknown developers of the malware gave the process a name that combines the perf Linux monitoring tool and ctl, an abbreviation commonly used with command line tools. A signature characteristic of Perfctl is its use of process and file names that are identical or similar to those commonly found in Linux environments. The naming convention is one of the many ways the malware attempts to escape notice of infected users...</p></blockquote>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Noisy Neighbor Detection with eBPF</title>
		<link>https://noise.getoto.net/2024/09/10/noisy-neighbor-detection-with-ebpf/</link>
		
		<dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
		<pubDate>Tue, 10 Sep 2024 18:00:21 +0000</pubDate>
				<category><![CDATA[Containers]]></category>
		<category><![CDATA[eBPF]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[observability]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">https://medium.com/p/64b1f4b3bbdd</guid>

					<description><![CDATA[<p><em>By </em><a href="https://www.linkedin.com/in/josefernandezmn/"><em>Jose Fernandez</em></a><em>, </em><a href="https://www.linkedin.com/in/sebastien-dabdoub-2a5a0958/"><em>Sebastien Dabdoub</em></a><em>, </em><a href="https://www.linkedin.com/in/jason-koch-5692172/"><em>Jason Koch</em></a><em>, </em><a href="https://www.linkedin.com/in/artemtkachuk/"><em>Artem Tkachuk</em></a></p><p>The Compute and Performance Engineering teams at Netflix regularly investigate performance issues in our multi-tenant environment. The first step is determining whether the problem originates from the application or the underlying infrastructure. One issue that often complicates this process is the "noisy neighbor" problem. On <a href="https://netflixtechblog.com/titus-the-netflix-container-management-platform-is-now-open-source-f868c9fb5436">Titus</a>, our multi-tenant compute platform, a "noisy neighbor" refers to a container or system service that heavily utilizes the server's resources, causing performance degradation in adjacent containers. We usually focus on CPU utilization because it is our workload's most frequent source of noisy neighbor issues.</p><p>Detecting the effects of noisy neighbors is complex. Traditional performance analysis tools such as<a href="https://www.brendangregg.com/perf.html"> perf</a> can introduce significant overhead, risking further performance degradation. Additionally, these tools are typically deployed after the fact, which is too late for effective investigation.<em> </em>Another challenge is that debugging noisy neighbor issues requires significant low-level expertise and specialized tooling<em>. </em>In this blog post, we'll reveal how we leveraged eBPF to achieve continuous, low-overhead instrumentation of the Linux scheduler, enabling effective self-serve monitoring of noisy neighbor issues. Learn how Linux kernel instrumentation can improve your infrastructure observability with deeper insights and enhanced monitoring.</p><h3>Continuous Instrumentation of the Linux Scheduler</h3><p>To ensure the reliability of our workloads that depend on low latency responses, we instrumented the <a href="https://en.wikipedia.org/wiki/Run_queue">run queue</a> latency for each container, which measures the time processes spend in the scheduling queue before being dispatched to the CPU. Extended waiting in this queue can be a telltale of performance issues, especially when containers are not utilizing their total CPU allocation. Continuous instrumentation is critical to catching such matters as they emerge, and eBPF, with its hooks into the Linux scheduler with minimal overhead, enabled us to monitor run queue latency efficiently.</p><p>To emit a run queue latency metric, we leveraged three eBPF hooks: <strong>sched_wakeup, sched_wakeup_new,</strong> and <strong>sched_switch</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6bapyclfXZPsUIaXFM-xaQ.png"></figure><p>The <strong>sched_wakeup </strong>and <strong>sched_wakeup_new</strong> hooks are invoked when a process changes state from 'sleeping' to 'runnable.' They let us identify when a process is ready to run and is waiting for CPU time. During this event, we generate a timestamp and store it in an eBPF hash map using the process ID as the key.</p><pre>struct {<br>    __uint(type, BPF_MAP_TYPE_HASH);<br>    __uint(max_entries, MAX_TASK_ENTRIES);<br>    __uint(key_size, sizeof(u32));<br>    __uint(value_size, sizeof(u64));<br>} runq_lat SEC(".maps");<br><br>SEC("tp_btf/sched_wakeup")<br>int tp_sched_wakeup(u64 *ctx)<br>{<br>    struct task_struct *task = (void *)ctx[0];<br>    u32 pid = task-&#62;pid;<br>    u64 ts = bpf_ktime_get_ns();<br><br>    bpf_map_update_elem(&#38;runq_lat, &#38;pid, &#38;ts, BPF_NOEXIST);<br>    return 0;<br>}</pre><p>Conversely, the <strong>sched_switch</strong> hook is triggered when the CPU switches between processes. This hook provides pointers to the process currently utilizing the CPU and the process about to take over. We use the upcoming task's process ID (PID) to fetch the timestamp from the eBPF map. This timestamp represents when the process entered the queue, which we had previously stored. We then calculate the run queue latency by simply subtracting the timestamps.</p><pre>SEC("tp_btf/sched_switch")<br>int tp_sched_switch(u64 *ctx)<br>{<br>    struct task_struct *prev = (struct task_struct *)ctx[1];<br>    struct task_struct *next = (struct task_struct *)ctx[2];<br>    u32 prev_pid = prev-&#62;pid;<br>    u32 next_pid = next-&#62;pid;<br> <br>    // fetch timestamp of when the next task was enqueued<br>    u64 *tsp = bpf_map_lookup_elem(&#38;runq_lat, &#38;next_pid);<br>    if (tsp == NULL) {<br>        return 0; // missed enqueue<br>    }<br><br>    // calculate runq latency before deleting the stored timestamp<br>    u64 now = bpf_ktime_get_ns();<br>    u64 runq_lat = now - *tsp;<br><br>    // delete pid from enqueued map<br>    bpf_map_delete_elem(&#38;runq_lat, &#38;next_pid);<br>    ....</pre><p>One of the advantages of eBPF is its ability to provide pointers to the actual kernel data structures representing processes or threads, also known as tasks in kernel terminology. This feature enables access to a wealth of information stored about a process. We required the process's cgroup ID to associate it with a container for our specific use case. However, the cgroup information in the struct is safeguarded by an<a href="https://elixir.bootlin.com/linux/v6.6.16/source/include/linux/sched.h#L1225"> RCU (Read Copy Update) lock</a>.</p><p>To safely access this RCU-protected information, we can leverage <a href="https://docs.kernel.org/bpf/kfuncs.html">kfuncs</a> in eBPF. kfuncs are kernel functions that can be called from eBPF programs. There are kfuncs available to lock and unlock RCU read-side critical sections. These functions ensure that our eBPF program remains safe and efficient while retrieving the cgroup ID from the task struct.</p><pre>void bpf_rcu_read_lock(void) __ksym;<br>void bpf_rcu_read_unlock(void) __ksym;<br><br>u64 get_task_cgroup_id(struct task_struct *task)<br>{<br>    struct css_set *cgroups;<br>    u64 cgroup_id;<br>    bpf_rcu_read_lock();<br>    cgroups = task-&#62;cgroups;<br>    cgroup_id = cgroups-&#62;dfl_cgrp-&#62;kn-&#62;id;<br>    bpf_rcu_read_unlock();<br>    return cgroup_id;<br>}</pre><p>Having the data ready, we must package it and send it to userspace. For this purpose, we chose the eBPF <a href="https://nakryiko.com/posts/bpf-ringbuf/">ring buffer</a>. It is efficient, high-performing, and user-friendly. It can handle variable-length data records and allows data reading without necessitating extra memory copying or syscalls. However, the sheer amount of data points was causing the userspace program to use too much CPU, so we implemented a rate limiter in eBPF to sample the data effectively.</p><pre>struct {<br>    __uint(type, BPF_MAP_TYPE_RINGBUF);<br>    __uint(max_entries, 256 * 1024);<br>} events SEC(".maps");<br><br>struct {<br>    __uint(type, BPF_MAP_TYPE_PERCPU_HASH);<br>    __uint(max_entries, MAX_TASK_ENTRIES);<br>    __uint(key_size, sizeof(u64));<br>    __uint(value_size, sizeof(u64));<br>} cgroup_id_to_last_event_ts SEC(".maps");<br><br>struct runq_event {<br>    u64 prev_cgroup_id;<br>    u64 cgroup_id;<br>    u64 runq_lat;<br>    u64 ts;<br>};<br><br>SEC("tp_btf/sched_switch")<br>int tp_sched_switch(u64 *ctx)<br>{<br>    // ....<br>    // The previous code<br>    // ....<br> <br>    u64 prev_cgroup_id = get_task_cgroup_id(prev);<br>    u64 cgroup_id = get_task_cgroup_id(next);<br> <br>    // per-cgroup-id-per-CPU rate-limiting <br>    // to balance observability with performance overhead<br>    u64 *last_ts = <br>        bpf_map_lookup_elem(&#38;cgroup_id_to_last_event_ts, &#38;cgroup_id);<br>    u64 last_ts_val = last_ts == NULL ? 0 : *last_ts;<br><br>    // check the rate limit for the cgroup_id in consideration<br>    // before doing more work<br>    if (now - last_ts_val &#60; RATE_LIMIT_NS) {<br>        // Rate limit exceeded, drop the event<br>        return 0;<br>    }<br><br>    struct runq_event *event;<br>    event = bpf_ringbuf_reserve(&#38;events, sizeof(*event), 0);<br>  <br>    if (event) {<br>        event-&#62;prev_cgroup_id = prev_cgroup_id;<br>        event-&#62;cgroup_id = cgroup_id;<br>        event-&#62;runq_lat = runq_lat;<br>        event-&#62;ts = now;<br>        bpf_ringbuf_submit(event, 0);<br>        // Update the last event timestamp for the current cgroup_id<br>        bpf_map_update_elem(&#38;cgroup_id_to_last_event_ts, &#38;cgroup_id,<br>            &#38;now, BPF_ANY);<br><br>    }<br><br>    return 0;<br>}</pre><p>Our userspace application, developed in Go, processes events from the ring buffer to emit metrics to our metrics backend, <a href="https://netflixtechblog.com/introducing-atlas-netflixs-primary-telemetry-platform-bd31f4d8ed9a">Atlas</a>. Each event includes a run queue latency sample with a cgroup ID, which we associate with running containers on the host. We categorize it as a system service if no such association is found. When a cgroup ID correlates with a container, we emit a percentile timer Atlas metric (runq.latency) for that container. We also increment a counter metric (sched.switch.out) to monitor preemptions occurring for the container's processes. Access to the prev_cgroup_id of the preempted process allows us to tag the metric with the cause of the preemption, whether it's due to a process within the same container (or cgroup), a process in another container, or a system service.</p><p>It's important to highlight that both the runq.latency metric and the sched.switch.out metrics are needed to determine if a container is affected by noisy neighbors, which is the goal we aim to achieve — relying solely on the runq.latency metric can lead to misconceptions. For example, if a container is at or over its cgroup CPU limit, the scheduler will throttle it, resulting in an apparent spike in run queue latency due to delays in the queue. If we were only to consider this metric, we might incorrectly attribute the performance degradation to noisy neighbors when it's actually because the container is hitting its CPU request limits. However, simultaneous spikes in both metrics, mainly when the cause is a different container or system process, clearly indicate a noisy neighbor issue.</p><h3>A Noisy Neighbor Story</h3><p>Below is the runq.latency metric for a server running a single container with ample CPU overhead. The 99th percentile averages 83.4µs (microseconds), serving as our baseline. Although there are some spikes reaching 400µs, the latency remains within acceptable parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DcYxRgeDwX5i07IrdTZyA.png"><figcaption>container1’s 99th percentile runq.latency averages 83µs (microseconds), with spikes up to 400µs, without adjacent containers. This serves as our baseline for a container not contending for CPU on a host.</figcaption></figure><p>At 10:35, launching container2, which fully utilized all CPUs on the host, caused a significant 131-millisecond spike (131,000 microseconds) in container1's P99 run queue latency. This spike would be noticeable in the userspace application if it were serving HTTP traffic. If userspace app owners reported an unexplained latency spike, we could quickly identify the noisy neighbor issue through run queue latency metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJrwEbrWPOxVMS0JP7uE9A.png"><figcaption>Launching container2 at 10:35, which maxes out all CPUs on the host, <strong>caused a 131-millisecond spike in container1’s P99 run queue latency</strong> due to increased preemptions by system processes. This indicates a noisy neighbor issue, where system services compete for CPU time with containers.</figcaption></figure><p>The sched.switch.out metric indicates that the spike was due to increased preemptions by system processes, highlighting a noisy neighbor issue where system services compete with containers for CPU time. Our metrics show that the noisy neighbors were actually system processes, likely triggered by container2 consuming all available CPU capacity.</p><h3>Optimizing eBPF Code</h3><p>We developed an open-source eBPF process monitor called <a href="https://netflixtechblog.com/announcing-bpftop-streamlining-ebpf-performance-optimization-6a727c1ae2e5">bpftop</a> to measure the overhead of eBPF code in this hot kernel path. Our estimates suggest that the instrumentation adds less than 600 nanoseconds to each sched_* hook. We conducted a performance analysis on a Java service running in a container, and the instrumentation did not introduce significant overhead. The performance variance with the run queue profiling code active versus inactive was not measurable in milliseconds.</p><p>During our research on how eBPF statistics are measured in the kernel, we identified an opportunity to improve its calculation. We submitted this <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce09cbdd988887662546a1175bcfdfc6c8fdd150">patch</a>, which was included in the Linux kernel 6.10 release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YD6hkXce9a70AgvSHstgWA.gif"></figure><p>Through trial and error and using bpftop, we identified several optimizations that helped maintain low overhead for this code:</p><ul><li>We found that BPF_MAP_TYPE_HASH was the most performant for storing enqueued timestamps. Using BPF_MAP_TYPE_TASK_STORAGE resulted in nearly a twofold performance decline. BPF_MAP_TYPE_PERCPU_HASH was slightly less performant than BPF_MAP_TYPE_HASH, which was unexpected and requires further investigation.</li><li>The BPF_CORE_READ helper adds 20–30 nanoseconds per invocation. In the case of raw tracepoints, specifically those that are "BTF-enabled" (tp_btf/*), it is safe and more efficient to access the task struct members directly. Andrii Nakryiko recommends this approach in this <a href="https://nakryiko.com/posts/bpf-core-reference-guide/#btf-enabled-bpf-program-types-with-direct-memory-reads">blog post</a>.</li><li>BPF_MAP_TYPE_LRU_HASH maps are 40–50 nanoseconds slower per operation than regular hash maps. Due to space concerns from PID churn, we initially used them for enqueued timestamps. We have since increased the map size, mitigating this risk.</li><li>The sched_switch, sched_wakeup, and sched_wakeup_new are all triggered for kernel tasks, which are identifiable by their PID of 0. We found monitoring these tasks unnecessary, so we implemented several early exit conditions and conditional logic to prevent executing costly operations, such as accessing BPF maps, when dealing with a kernel task. Notably, kernel tasks operate through the scheduler queue like any regular process.</li></ul><h3>Conclusion</h3><p>Our findings highlight the value of low-overhead continuous instrumentation of the Linux kernel with eBPF. We have integrated these metrics into customer dashboards, enabling actionable insights and guiding multitenancy performance discussions. We can also now use these metrics to refine CPU isolation strategies to minimize the impact of noisy neighbors. Additionally, thanks to these metrics, we've gained deeper insights into the Linux scheduler.</p><p>This project has also deepened our understanding of eBPF technology and underscored the importance of tools like bpftop for optimizing eBPF code. As eBPF adoption increases, we foresee more infrastructure observability and business logic shifting to it. One promising project in this space is <a href="https://github.com/sched-ext/scx">sched_ext</a>, potentially revolutionizing how scheduling decisions are made and tailored to specific workload needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&#38;referrerSource=full_rss&#38;postId=64b1f4b3bbdd" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/noisy-neighbor-detection-with-ebpf-64b1f4b3bbdd">Noisy Neighbor Detection with eBPF</a> was originally published in <a href="https://netflixtechblog.com/">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Investigation of a Cross-regional Network Performance Issue</title>
		<link>https://noise.getoto.net/2024/08/06/investigation-of-a-cross-regional-network-performance-issue/</link>
		
		<dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
		<pubDate>Mon, 05 Aug 2024 22:18:00 +0000</pubDate>
				<category><![CDATA[debugging]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[TCP]]></category>
		<guid isPermaLink="false">https://medium.com/p/422d6218fdf1</guid>

					<description><![CDATA[Hechao Li, Roger CruzCloud Networking TopologyNetflix operates a highly efficient cloud computing infrastructure that supports a wide array of applications essential for our SVOD (Subscription Video on Demand), live streaming and gaming services. Utili...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Backdoor in XZ Utils That Almost Happened</title>
		<link>https://noise.getoto.net/2024/04/11/backdoor-in-xz-utils-that-almost-happened/</link>
		
		<dc:creator><![CDATA[Bruce Schneier]]></dc:creator>
		<pubDate>Thu, 11 Apr 2024 11:01:51 +0000</pubDate>
				<category><![CDATA[backdoors]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[economics of security]]></category>
		<category><![CDATA[essays]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[national security policy]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Social Engineering]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[supply chain]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.schneier.com/?p=68771</guid>

					<description><![CDATA[<p>Last week, the Internet dodged a major nation-state attack that would have had catastrophic cybersecurity repercussions worldwide. It’s a catastrophe that didn’t happen, so it won’t get much attention—but it should. There’s an important moral to the <a href="https://arstechnica.com/security/2024/04/what-we-know-about-the-xz-utils-backdoor-that-almost-infected-the-world/">story of the attack</a> and its <a href="https://www.nytimes.com/2024/04/03/technology/prevent-cyberattack-linux.html">discovery</a>: The security of the global Internet depends on countless obscure pieces of software written and maintained by even more obscure unpaid, distractible, and sometimes vulnerable volunteers. It’s an untenable situation, and one that is being exploited by malicious actors. Yet precious little is being done to remedy it...</p>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>XZ Utils Backdoor</title>
		<link>https://noise.getoto.net/2024/04/02/xz-utils-backdoor/</link>
		
		<dc:creator><![CDATA[Bruce Schneier]]></dc:creator>
		<pubDate>Tue, 02 Apr 2024 18:50:50 +0000</pubDate>
				<category><![CDATA[backdoors]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Social Engineering]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.schneier.com/?p=68714</guid>

					<description><![CDATA[<p>The cybersecurity world got really lucky last week. An intentionally placed backdoor in XZ Utils, an open-source compression utility, was pretty much <a href="https://www.openwall.com/lists/oss-security/2024/03/29/4">accidentally discovered</a> by a Microsoft engineer—weeks before it would have been incorporated into both Debian and Red Hat Linux. From <a href="https://arstechnica.com/security/2024/04/what-we-know-about-the-xz-utils-backdoor-that-almost-infected-the-world/">ArsTehnica</a>:</p>
<blockquote><p>Malicious code added to XZ Utils versions 5.6.0 and 5.6.1 modified the way the software functions. The backdoor manipulated sshd, the executable file used to make remote SSH connections. Anyone in possession of a predetermined encryption key could stash any code of their choice in an SSH login certificate, upload it, and execute it on the backdoored device. No one has actually seen code uploaded, so it’s not known what code the attacker planned to run. In theory, the code could allow for just about anything, including stealing encryption keys or installing malware...</p></blockquote>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Linux kernel security tunables everyone should consider adopting</title>
		<link>https://noise.getoto.net/2024/03/06/linux-kernel-security-tunables-everyone-should-consider-adopting/</link>
		
		<dc:creator><![CDATA[Ignat Korchagin]]></dc:creator>
		<pubDate>Wed, 06 Mar 2024 14:00:43 +0000</pubDate>
				<category><![CDATA[deep dive]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Security Week]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=74be1ade78d98cd6b77d0f7002f726e2</guid>

					<description><![CDATA[This post illustrates some of the Linux Kernel features, which are helping us to keep our production systems more secure. We will deep dive into how they work and why you may consider enabling them as well]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>Announcing bpftop: Streamlining eBPF performance optimization</title>
		<link>https://noise.getoto.net/2024/02/26/announcing-bpftop-streamlining-ebpf-performance-optimization/</link>
		
		<dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
		<pubDate>Mon, 26 Feb 2024 16:43:30 +0000</pubDate>
				<category><![CDATA[eBPF]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[observability]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Rust]]></category>
		<guid isPermaLink="false">https://medium.com/p/6a727c1ae2e5</guid>

					<description><![CDATA[By Jose FernandezToday, we are thrilled to announce the release of bpftop, a command-line tool designed to streamline the performance optimization and monitoring of eBPF applications. As Netflix increasingly adopts eBPF [1, 2], applying the same rigor ...]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>connect() &#8211; why are you so slow?</title>
		<link>https://noise.getoto.net/2024/02/08/connect-why-are-you-so-slow/</link>
		
		<dc:creator><![CDATA[Frederick Lawler http://blog.cloudflare.com/author/frederick/]]></dc:creator>
		<pubDate>Thu, 08 Feb 2024 14:00:27 +0000</pubDate>
				<category><![CDATA[deep dive]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[protocols]]></category>
		<guid isPermaLink="false">http://noise.getoto.net/?guid=385532496572903165afc3a0369621d9</guid>

					<description><![CDATA[This is our story of what we learned about the connect() implementation for TCP in Linux. Both its strong and weak points. How connect() latency changes under pressure, and how to open connection so that the syscall latency is deterministic and time-bound]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
		<item>
		<title>New Windows/Linux Firmware Attack</title>
		<link>https://noise.getoto.net/2023/12/12/new-windows-linux-firmware-attack/</link>
		
		<dc:creator><![CDATA[Bruce Schneier]]></dc:creator>
		<pubDate>Tue, 12 Dec 2023 12:01:18 +0000</pubDate>
				<category><![CDATA[BIOS]]></category>
		<category><![CDATA[exploits]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[vulnerabilities]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://www.schneier.com/?p=68191</guid>

					<description><![CDATA[<p>Interesting attack based on malicious pre-OS <a href="https://arstechnica.com/security/2023/12/just-about-every-windows-and-linux-device-vulnerable-to-new-logofail-firmware-attack/">logo images</a>:</p>
<blockquote><p>LogoFAIL is a constellation of two dozen newly discovered vulnerabilities that have lurked for years, if not decades, in Unified Extensible Firmware Interfaces responsible for booting modern devices that run Windows or Linux….</p>
<p>The vulnerabilities are the subject of a coordinated mass disclosure released Wednesday. The participating companies comprise nearly the entirety of the x64 and ARM CPU ecosystem, starting with UEFI suppliers AMI, Insyde, and Phoenix (sometimes still called IBVs or independent BIOS vendors); device manufacturers such as Lenovo, Dell, and HP; and the makers of the CPUs that go inside the devices, usually Intel, AMD or designers of ARM CPUs…...</p></blockquote>]]></description>
		
		
		<enclosure url="" length="0" type="" />

			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 45/381 objects using Memcached
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Memcached

Served from: noise.getoto.net @ 2025-12-11 05:02:48 by W3 Total Cache
-->