The Linux Channel

TUTORIALS :: Research Socket overhead in Linux vs Message Queues and benchmarking

Written by: Kiran Kankipati - Published: 21-Jun-2017

The objective of this research is to assess the system performance overheads of user-space sockets (in this case UDP sockets) vs Message queues. So that this can be used as a basis to access a server/device potential as a Linux based network appliance (can be a Firewall device, VPN, WAN Optimization, and so on). Kindly watch my video below in order to participate in this research.

(API) Watch Video: 226 Research Socket overhead in Linux vs Message Queues and benchmarking
226 Research Socket overhead in Linux vs Message Queues and benchmarking
* Click the image to watch this video on Youtube ↗

Download this episode my entire kernel module sample code, make file, clean script HERE.

Here is my next follow-up video where I did more extensive benchmarks with respect to each specific time interval (in this case every second) in three different devices an Intel 6-core desktop, an Intel dual-core Dell laptop and an Intel quad-core HP laptop. Here are the detailed single instance of UDP socket client-server performance benchmarks:

Device/CPU/ServerBandwidth
Intel Core i7-5820K desktop32 Gbps
Intel Core i7-4700MQ - HP Envy 15-J111TX Laptop30 Gbps - 20 Gbps (fluctuating)
Intel Core i7-4500U - Dell 15R 5537 Laptop28 Gbps

(API) Watch Video: 227 Research Socket overhead in Linux vs Message Queues - followup Episode2
227 Research Socket overhead in Linux vs Message Queues - followup Episode2
* Click the image to watch this video on Youtube ↗

Download this episode my entire kernel module sample code, make file, clean script HERE.

Here is my final conclusion/follow-up video where I compared the Episode-2 benchmarking code with new Message Queues benchmarking code. Unlike my other previous episode(s), in this case I tested with single Tx (UDP-Client/ MessageQ-Send) and Rx (UDP-Server/ MessageQ-Receive) and benchmarked my results. Here is the architecture diagram which represents the overall idea/objective of the same.

I tested the same with my Intel Core i7-5820K desktop, and found UDP Socket framework is performing around 32Gbps (with MAXBUF of 10240 per transmit buffer size) while the Message Queue framework is performing around 56Gbps (with MAXBUF of 8024 per transmit buffer size). With this we can visualize live the overall % of socket overhead vs a much simpler IPC like Message Queue in a single host/server/device. Here is my live detailed demo video of the same.

(API) Watch Video: 229 Research Socket overhead in Linux vs Message Queues - followup Episode3
229 Research Socket overhead in Linux vs Message Queues - followup Episode3
* Click the image to watch this video on Youtube ↗

Download this episode my entire kernel module sample code, make file, clean script HERE.


Featured Video:

(API) Watch Video: 0x199 Network Interface Card - Device Drivers | Architecture, Components and The Big-Picture
0x199 Network Interface Card - Device Drivers | Architecture, Components and The Big-Picture
* Click the image to watch this video on Youtube ↗


Suggested Topics:


Network Software Development:
Layer-2 (L2) Multicast Frame Deep Analysis ↗
21-Dec-2019

C code to check valid IP Address (IPv4) - Live Demo and Example ↗
18-Jun-2018

Network MTU and Path MTU Discovery PMTUD - WAN and Internet Performance Optimization ↗
30-Jan-2019

Data-Plane and Control-Plane of a Networking Device ↗
30-Oct-2019

iPerf tool - for network channel analysis, bandwidth tests and system & network benchmarking ↗
04-Jul-2018

Tail Drop - by Network Schedulers to Drop Packets in Network Appliances ↗
27-Jun-2018

Design & Architecture of custom Dynamic Routing Protocols ↗
01-Dec-2019

UDP sample socket code for Systems and Network software developers ↗
02-Feb-2017

TCP vs UDP an Expert Opinion ↗
18-Jan-2020

Bufferbloat in a Networking Device or an Appliance ↗
27-Jun-2018

Introduction to Network Processors (NPU) ↗
03-Nov-2019

Socket Options - Socket Programming - setsockopt(), getsockopt() ↗
15-Feb-2020


Research and Projects:
Data Profiling and Visual Analysis tool for Deep Learning and AI - VLOG - The Linux Channel ↗
21-Jun-2018

CYRIL ING√ČNIERIE - CoreFreq Linux CPU monitoring software ↗
19-Jun-2018

Difference between Intel Xeon Server vs Desktop Core i7 vs Intel Mobile Atom vs ARM Processors ↗
19-Jun-2018

Research Socket overhead in Linux vs Message Queues and benchmarking ↗
21-Jun-2017

Tour of my new Home Networking Lab within VirtualBox VM ↗
16-May-2017


Linux (user-space), Systems Architecture:
Synchronization in Linux user-space - Architecting multi-process and multi-threads ↗
18-Sep-2018

Linux user-space - Shared Memory IPC - Live Demo and Example ↗
18-Jul-2018

Linux user-space Atomic Operations via GCC Atomic builtins ↗
22-Mar-2017

C code to read a /proc file in Linux user-space - Live Demo and Example ↗
11-Jun-2018

Coding a simple look-up-table in C - without Linked lists and a binary search ↗
17-Jun-2018

Dynamic linking without STDLIB in Linux user-space C programming ↗
05-May-2017

mmap() munmap() - map or unmap files or devices into memory ↗
22-Feb-2020

A Linux system call in C without a standard library ↗
10-Mar-2017

Linux user-space Pthread Synchronization via Mutex - Live Demo and Example ↗
03-Jun-2018


Linux Kernel Software Development:
KERNEL - The Linux Channel - a High Performance Linux Kernel ↗
12-Dec-2018

Kernel customization via make menuconfig - Linux Kernel Compilation (or a Kernel Build) ↗
11-Jul-2018

Tracking Linux Kernel bugs in Kernel.org Bugzilla (or Bugzee as we call it in the Industry) ↗
24-Sep-2018

Tracking code changes in Linux Kernel Source code ↗
19-Nov-2018

How to upgrade or install a latest current release Linux Kernel version manually in Ubuntu? ↗
05-Jan-2018

Linux Networking Stack :: RFS: Receive Flow Steering ↗
09-Dec-2017

How to submit your Linux Kernel Patch ↗
07-Feb-2017


Linux Kernel Internals (PDFs) - by Ramin Farajpour:
Linux Kernel Internals :: Implementing a Linux Kernel System Call ↗
03-May-2019

Linux Kernel Internals :: Linux Kernel Development ↗
03-May-2019

Linux Kernel Internals :: Linux Kernel Boot Process ↗
19-Nov-2018


Software Development (Programming) Tools:
SNMP and MIB Browsers ↗
12-Feb-2019

Kompare GUI patch and diff tool in Linux ↗
19-Jun-2018

Bluefish IDE - a simple versatile light-weight best editor to edit kernel source files, html files, c source code, text files, SQL schema and so on. ↗
19-Jun-2018

What is a BSP | Board Support Package | Big Picture | Embedded Systems Software Development ↗
24-Jun-2019

What is a Toolchain | gcc Cross-Compiler | Libraries | BSP (Board Support Package) | Embedded ↗
24-Jun-2019


Embedded Projects:
GPS Geo-tracking system using LinkIt ONE ↗
11-Jan-2017

Using a GPS Sensor ↗
28-Jul-2017

 

Join The Linux Channel :: Facebook Group


Join a course:

💎 Linux, Kernel, Networking and Device Drivers: PDF Brochure
💎 PhD or equivalent (or Post Doctoral) looking for assistance: Details
💎 ... or unlimited life-time mentorship: Details


💗 Help shape the future: Sponsor/Donate


Recommended Topics:
Featured Video:
(API) Watch Video: 223 Code Snippet protocol fixed-header manual parsing and packet generation
223 Code Snippet protocol fixed-header manual parsing and packet generation
* Click the image to watch this video on Youtube ↗


Trending Video:
(API) Watch Video: 0x1ae Teardown | VLOG | SONY BCG-34HHU Ni-MH Compact Power-Charger for AA/AAA | 5V Micro USB Input
0x1ae Teardown | VLOG | SONY BCG-34HHU Ni-MH Compact Power-Charger for AA/AAA | 5V Micro USB Input
* Click the image to watch this video on Youtube ↗

TUTORIALS :: Linux Networking Stack :: RFS: Receive Flow Steering:


Linux ioctl() API interface:


Research :: Content Delivery Networks (CDN):
CDN Networks


Recommended Video:
(API) Watch Video: Linux Kernel net_device data-structure - dev_get_by_name API - Episode3
Linux Kernel net_device data-structure - dev_get_by_name API - Episode3
* Click the image to watch this video on Youtube ↗