blog.masa23.jp
Quick Start Guide to XDP
Overview This is a quick guide to get started with XDP.
Detailed explanations of eBPF and other concepts are omitted.
XDP is a framework for processing packets at the earliest stage of the Linux kernel’s networking stack, allowing programs to be directly inserted into the NIC (Network Interface Card) using eBPF.
Since XDP operates on packets at the earliest stage of the Linux kernel’s networking stack, it can process them faster than filters like iptables.
…
2024-07-24Reproducing IO Suspension with dmsetup
Due to various circumstances, I wanted to reproduce a situation where I/O stops, so here are my notes on how I reproduced I/O suspension using dmsetup.
Reproducing IO Suspension with dmsetup Check status dmsetup info Suspend IO dmsetup suspend /dev/vol01/test Resume IO dmsetup resume /dev/vol01/test Links dmsetup Command Red Hat Enterprise Linux 7 | Red Hat Customer Portal
…
2024-06-17Using Pktgen-DPDK
Overview I wanted to perform a load test with short packets, so I tried using Pktgen-DPDK.
It is necessary to enable IOMMU beforehand. IOMMU Activation Memo
Environment Environment Version Ubuntu 22.04 DPDK 23.11.1 Pktgen-DPDK main branch NIC Intel X520 DA2 Installing Required Packages Install dependencies
sudo apt-get update sudo apt-get install -y git build-essential libnuma-dev python3-pyelftools linux-headers-$(uname -r) meson ninja-build Building and Installing DPDK Download the DPDK library
DPDK Download I chose to use the latest LTS version, 23.
…
2024-06-13Notes on Enabling IOMMU
BIOS Refer to the BIOS manual. Linux Kernel Add the required options at boot time # vi /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on" For AMD, specify amd_iommu=on, and for Intel, specify intel_iommu=on.
Apply GRUB configuration # update-grub Reboot # reboot Verify parameters # cat /proc/cmdline Check dmesg # dmesg | grep iommu
…
2024-05-29Introducing a 2.5Gbps Multi-Gigabit Switch at Home (SKS3200M-8GPY1XF)
Following the introduction of the 10G home network (SKS8300-8X), I decided to purchase an 8-port 2.5Gbps Hatcho switch.
It features 8 multi-gigabit 2.5Gbps ports and one 10Gbps SFP+ port.
Purchased Items Model Description Price Quantity Notes SKS3200M-8GPY1XF 2.5Gbps Management Switch ¥10,104 1 AliExpress CAB-10GSFP-P0.5M-30(Cisco-1pc)-ip 10Gbps SFP+ 0.5m DAC Cable ¥1,599 1 Amazon Items Received Main unit Power cable Manual (initial IP address for WebUI not included…) Rubber feet The login information was noted on the back of the main unit.
…
2024-05-28Disabling Vendor Lock on Intel X520 DA2
Notes on using non-Intel SFP+ with Intel X520 DA2 on Linux.
Add driver options # cat << _EOF_ > /etc/modprobe.d/ixgbe.conf options ixgbe allow_unsupported_sfp=1,1 _EOF_ Unload and reload the driver # modprobe -r ixgbe # modprobe ixgbe Regenerate initramfs # update-initramfs -u Without this, allow_unsupported_sfp=1,1 will not be enabled on reboot.
…
2024-05-27Introducing 10G Home Network (SKS8300-8X)
Background I introduced NURO Hikari 2G at home and installed the SONY NSD-G1000T, but I couldn’t use the 2.5Gbps port and was wasting the 2Gbps line. There weren’t any affordable managed switches with 2.5Gbps ports, but I found a very cheap managed 10Gbps switch called SKS8300-8X and decided to buy it as a guinea pig. It has 8 10G SFP+ ports and costs less than 15,000 yen. Moreover, it’s a
…
2023-11-29Using DWARF-2 Debugging Information with GDB on FreeBSD
When debugging a program built with gcc using GDB on FreeBSD, you might encounter errors if the debug information format is different. Here are some notes on the issue.
Doesn’t Work When debugging a program built with gcc on FreeBSD’s GDB, you may see an error stating that there is no symbol information.
# gcc -g test.c # gdb a.out Works By setting the debug information to use the DWARF-2 format, symbol information will be displayed in gdb.
…
2023-11-23How to Cache 502 and 504 Errors with a Web Accelerator
This is a method to cache 502 (Bad Gateway) and 504 (Gateway Timeout) errors using the Sakura Cloud Web Accelerator.
High access to non-cacheable content or even cacheable content can cause the origin server to return 502 (Bad Gateway) or 504 (Gateway Timeout) errors due to high server load.
Normally, error responses from nginx do not include Cache-Control headers, so they are not cached, which means the load on the origin server continues.
…
2023-10-10Rundeck Installation Notes
This document records the setup notes for Rundeck.
Environment Version Ubuntu 22.04 Rundeck 4.14.1 Installing Java # apt-get install -y openjdk-11-jre-headless Registering the Repository The official method uses apt-key, which issues a warning on 22.04, so we will change it.
# curl -L https://packages.rundeck.com/pagerduty/rundeck/gpgkey > /etc/apt/keyrings/rundeck.asc Next, add the Rundeck repository.
# cat << _EOF_ > /etc/apt/sources.list.d/rundeck.list deb [signed-by=/etc/apt/keyrings/rundeck.asc] https://packages.rundeck.com/pagerduty/rundeck/any/ any main deb-src [signed-by=/etc/apt/keyrings/rundeck.asc] https://packages.rundeck.com/pagerduty/rundeck/any/ any main _EOF_ Once the repository is added, update the package information.
…
2023-07-04