Best way to disable swap in Linux

Identify configured swap devices and files with cat /proc/swaps. Turn off all swap devices and files with swapoff -a. Remove any matching reference found in /etc/fstab. Optional: Destroy any swap devices or files found in step 1 to prevent their reuse. Due to your concerns about leaking sensitive information, you may wish to consider performing … Read more

How do I list loaded Linux module parameter values?

You can do it by using this simple one way command, which uses the /proc/modules and /sys virtual filesystems: cat /proc/modules | cut -f 1 -d ” ” | while read module; do \ echo “Module: $module”; \ if [ -d “/sys/module/$module/parameters” ]; then \ ls /sys/module/$module/parameters/ | while read parameter; do \ echo -n … Read more

rm on a directory with millions of files

The data=writeback mount option deserves to be tried, in order to prevent journaling of the file system. This should be done only during the deletion time, there is a risk however if the server is being shutdown or rebooted during the delete operation. According to this page, Some applications show very significant speed improvement when … Read more

TCP congestion control version: HTCP module vs highspeed module in linux kernel

Doesn’t HTCP stands for highspeed TCP? No. It stands for TCP for high-speed and long-distance networks and is described in this document from the Hamilton Institute. HighSpeed TCP is published in RFC 3649. So what is the differences between “HTCP” and “highspeed” module here? The common point first, is that they want to turn high bandwidth long distance networks more efficient. The main difference, … Read more

QEMU: /bin/sh: can’t access tty; job control turned off

From Linux From Scratch Chapter 6.8. Populating /dev 6.8.1. Creating Initial Device Nodes When the kernel boots the system, it requires the presence of a few device nodes, in particular the console and null devices. Create these by running the following commands: You should then continue with the steps in “6.8.2. Mounting tmpfs and Populating /dev”. … Read more