I tweeted recently that %usr is what we wanna do; %sys is what we gotta do…What I meant was to point out that the kernel’s main goals in life are to bring up hardware, and manage access to it on behalf of an application and get out of the way.
Continue reading ““Baby, we were born to run…” — Every userspace process ever.”
Category: Linux
Battle Plan for RDMA over Converged Ethernet (RoCE)
What is all that %sys time ? “I never know what she’s _doing_ in there…” Ha!
12:01:35 PM CPU %usr %nice %sys %iowait %irq %soft %idle
12:01:36 PM all 0.08 0.00 3.33 0.00 0.00 5.00 91.59
12:01:36 PM 0 0.00 0.00 40.59 0.00 0.00 59.41 0.00
...
You can instantly find out with ‘perf top’. In this case (netperf), the kernel is spending time copying skb’s around, mediating between kernel and userspace. I wrote a bit about this in a previous blog post; the traditional protection ring.
All that copying takes time…precious, precious time. And CPU cycles; also precious. And memory bandwidth…etc.
Continue reading “Battle Plan for RDMA over Converged Ethernet (RoCE)”
Big-win I/O performance increase coming to KVM guests in RHEL6.4
I finally got the pony I’ve been asking for.
There’s a very interesting (and impactful) performance optimization coming to RHEL6.4. For years we’ve had to do this sort of tuning manually, but thanks to the power of open source, this magical feature has been implemented and is headed your way in RHEL6.4 (try it in the beta!)
What is this magical feature…is it a double-rainbow ? Yes. All the way.
It’s vhost thread affinity via virsh emulatorpin.
If you’re familiar with the vhost_net network infrastructure added to Linux, it moves the network I/O out of the main qemu userspace thread to a kthread called vhost-$PID (where $PID is the PPID of the main KVM process for the particular guest). So if your KVM guest is PID 12345, you would also see a [vhost-12345] process.
Anyway…
Continue reading “Big-win I/O performance increase coming to KVM guests in RHEL6.4”
Generating arbitrary network packets using the pktgen kernel module
I am staring at a workload that is zillions upon zillions of very tiny packets, and each one is important. They've got to get there fast. As fast as possible. Nagle: you are not welcome here. I am seeing some seemingly random jitter, and it's only on this one system. <confused> I need to take apart this stack piece by piece, and test each in isolation. Let's start at the lowest level possible. RHEL6 includes a kernel module called pktgen (modprobe pktgen). This module allows you to create network packets, specify it's attributes and send them at the fastest possible rate with the least overhead. Using pktgen, I was able to achieve over 3.3M packets per second on a 10GB Solarflare NIC. These packets do not have any protocol TCP/UDP packet processing overhead. You can watch the receivers netstat/IP counters, though. Since these are synthetic packets, you have to give pktgen some basic information in order for the packets to be constructed with enough info to get there they're going. Things like destination IP/MAC, the number of packets and their size. I tested tiny packets, 64bytes (because that's what this workload needs). I also tested jumbo frames just to be sure I was doing it right. This brings up a habit of mine worth mentioning; purposely mis-tuning your environment to validate your settings. A sound practice! To get to 3.3Mpps, I only had to make one key change. Use a 10x factor for clone_skb. Anything less than 10 lead to fewer packets (a value of zero halved the pps throughput as compared to 10). Anything more than 10 had no performance benefit, so I'm sticking with 10 for now. Continue reading "Generating arbitrary network packets using the pktgen kernel module"
The Open-Source Advantage…through the eyes of Red Hat, DreamWorks and OpenStack
Let’s say you’re a big company in a competitive industry. One who innovates and succeeds by creating software. Not extending COTS, not adapting existing code. Generating fresh, new code, at your full expense. The value the company receives by investing in the creation of that software is competitive advantage, sometimes known as the profit-motive.
You’re an executive at this company. Creating the software was your idea. You are responsible for the ROI calculations that got the whole thing off the ground.
Your career may rest on the advantage the invention provides, and you are boldly considering opening up the code you’ve created. But first you need to understand why so many of your peers (at company after company) have staked their careers behind open-sourcing what was once their company’s secret sauce.
Let’s look at some examples.
Continue reading “The Open-Source Advantage…through the eyes of Red Hat, DreamWorks and OpenStack”
