Capturing Packets in Linux at a Speed of Millions of Packets per Second without Using Third Party Libraries

My article will tell you how to accept 10 million packets per second without using such libraries as Netmap, PF_RING, DPDK and other. We are going to do this with Linux kernel version 3.16 and some code in C and C++. To begin with, I would like to say a few words on how pcap (a well-known method for packet capture) works. pcap is used in such popular utilities as iftop, tcpdump, arpwatch.

Multitasking in the Linux Kernel. Workqueues

Let’s go on talking about multithreading in the Linux kernel. Last time I told you about interrupts, the ways to process them, and tasklets. Since I’ve wanted it to be one article, I will refer to tasklets in the story about the workqueue, and assume that the reader is already familiar with them. Just like the last time, I will try to make my story as detailed as possible.

Multitasking in the Linux Kernel. Interrupts and Tasklets

In the previous article I mentioned about multithreading. The article covered such basic notions as types of multitasking, the scheduler, scheduling strategies, the state machine, and other. This time, I want to look at the problem of scheduling from another perspective. Namely, I’m going to tell you about scheduling not threads, but their “younger brothers”. Since the article turned out to be quite long, at the last moment I decided to break it up into several parts:

IPv6 in Practice

IPv6 for Cloud Servers Frankly speaking, the Internet lion’s share operates on IPv4. There are some living islands of IPv6 in Asia, plus several big sites, (such as google.com, facebook.com) respond via IPv6. But it’s better to use IPv6. The more websites will be ready to operate using IPv6, the easier and simpler conversion will be. Thus, it’s a relevant investment in the future. What does IPv6 mean for a particular cloud server from a practical point of view?

What is grep and How do We Use It?

When reading some articles about Unix commands, I noticed that the examples provided in them were not practically useful. It turns out that we do not know how to use tools that are actually useful. Before that Three years ago I was asked to hold an interview with applicants for the position of unix system administrator. There were eight applicants, and two of them were top-rated at the freelance marketplace.

Teaching the File System to Read

What I’m Going to Tell You About In the previous article we constructed the environment needed to get familiar with the kernel. Then we took a look at loadable kernel modules and wrote a simple “Hello World!”. Finally, we wrote a simple and useless file system. Now it’s time to go on. The main aim of this article is to teach the file system to read from disk. For now it will read the operating information only (the super block and index nodes).

Writing a File System in Linux Kernel

Who This Article is for Introduction Environment Setup Environment Check Up Returning to the File System Summary Links Who This Article is for There are no complex or difficult concepts in this article, all required is a basic knowledge of the command line, the C language, Makefile and a general understanding about file systems.

Processes Paralleling to Speed up Computing and Tasks Execution in Linux

Almost all PCs, released during the last few years, have had at least a dual core processor. So reader, if your PC isn’t extremely old or the bottom of the barrel budget brand, then most likely you are the owner of a multiple-processor system. Also if you like to play games, you should know you are utilizing potentially hundreds of GPU cores. But during the lion’s share of time all of these cores just gather dust.

bcat: pipe to browser utility

Preview log files Use it as a pager Viewing the clipboard Markdown Great find! bcat is a small utility to pipe console’s output to browser. Do you have a script which outputs HTML? bcat! Do you need to preview a README file with Markdown formatting? bcat! Is your script fetching web pages and you want to see the result?