Home
FlamingBytes
Cancel

Tuning kernel parameters in Docker

Configure namespaced kernel parameters(sysctl) at runtime The –sysctl sets namespaced kernel parameters (sysctls) in the container. For example, to turn on IP forwarding in the containers network ...

Sorting algorithm

In this post, it includes the following sorting algorithms. The code is self explained. selection sort insert sort bubble sort quick sort merge sort import java.util.Arrays; public c...

Thread synchronization

Mutexes A mutex is basically a lock that we set (lock) before accessing a shared resource and release (unlock) when we’re done. While it is set, any other thread that tries to set it will block un...

Interprocess communication(IPC)

Pipes Pipes are the oldest form of UNIX System IPC and are provided by all UNIX systems. Pipes have two limitations. Historically, they have been half duplex (i.e., data flows in only one dire...

Using bcc-tools for dynamic kernel tracing

In Red Hat Enterprise Linux 8.1, Red Hat ships a set of fully supported on x86_64 dynamic kernel tracing tools, called bcc-tools, that make use of a kernel technology called extended Berkeley Packe...

blktrace - A block layer IO tracing utility

What can blktrace do? Let’s dive into the block device layer and see how the I/O are handled in disk queues. The following stack shows the I/O paths including the block device layer. The applicat...

Understanding await in iostat

What’s meaning of await in iostat? The following is the description provided for await field in iostat man page. $ man iostat await The average time (in milliseconds) for I/O requests issued ...

Buffered and Direct IO

Buffered and Direct I/O The VxFS responds with read-ahead for sequential read I/O. This results in buffered I/O. The data is prefetched and retained in buffers, in anticipation of application aski...

Network ring buffer

Introduction Receive ring buffers are shared between the device driver and NIC. The card assigns a transmit (TX) and receive (RX) ring buffer. As the name implies, the ring buffer is a circular bu...

Semaphore

What is semaphore A semaphore is a very relaxed type of lockable object. A given semaphore has a predefined maximum count, and a current count. You take ownership of a semaphore with a wait operat...

Max open files limit

System wide open files limit To check system wide files limit: $ cat /proc/sys/fs/file-max 4875932 $ sysctl -a | grep file-max fs.file-max = 4875932 To change system wide files limit: $ echo "...

Iozone - A filesystem benchmark tool

Introduction IOzone is a filesystem benchmark tool. The benchmark generates and measures a variety of file operations. Iozone is useful for performing a broad filesystem analysis of a vendor’s co...

Kubernetes and Gluster performance

Kubernetes and Gluster Intro Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications. Gluster is a scalable, distr...

GlusterFS - A distributed file syste

What is Gluster? Gluster is a scalable, distributed file system that aggregates disk storage resources from multiple servers into a single global namespace. Advantages Scales to several petab...

CBT - Changed Block Tracking

Introduction Changed Block Tracking is an incremental backup technology for virtual machines. It helps create faster and smaller backups. It has the following advantages. Reduce backup time ...

Perf - The official Linux profiler

Introduction perf, aka perf_events, is the official Linux profiler and included in the Linux kernel source under tools/perf. It can instrument CPU performance counters, tracepoints, kprobes, and u...

Using fio to generate millions of files

fio is the acronym for Flexible IO Tester and is a tool for I/O performance measurement. From time to time, I use fio to run performance benchmark test, either to investigate I/O performance for c...

Analyze the library and system calls

When the application source code is not available, we can trace the function calls during its runtime in order to understand how the application code works. Library calls take place in user space....

Memory-Mapped I/O

Introduction Memory-mapped I/O lets us map a file on disk into a buffer in memory so that, when we fetch bytes from the buffer, the corresponding bytes of the file are read. Similarly, when we sto...

Memory fragmentation

Memory fragmentation Memory page availability can be checked from /proc/buddyinfo as below. $ cat /proc/buddyinfo Node 0, zone DMA 1 0 1 0 1 1 1 0 ...