Hot answers tagged

119 votes
Accepted

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 ...
user avatar
  • 12.3k
96 votes
Accepted

How does vm.overcommit_memory work?

You can find the documentation in man 5 proc (or at kernel.org): /proc/sys/vm/overcommit_memory This file contains the kernel virtual memory accounting mode. Values are: ...
user avatar
  • 81.9k
59 votes

How can I find out what is causing interrupts on Windows?

After digging through the documentation (based on the other answers here), this is the process I ended up using: Capture the ETW log of the problem The easiest way to do this is using the Windows ...
user avatar
35 votes

Does the "bs" option in "dd" really improve the speed?

What you have done is only a read speed test. if you are actually copying blocks to another device you have pauses in the reading while the other device is accepting the data you want to write, when ...
user avatar
22 votes

GRUB "Some modules may be missing from core image" warning

I was having the same problem while rebuilding a degraded SW-RAID array, and tripped over this on another website: The grub-2.00 source where the warning arises is in ./grub-core/disk/diskfilter.c ...
user avatar
  • 329
22 votes

GRUB "Some modules may be missing from core image" warning

Had the same thing today. Turns out it's caused by grub-probe trying to access partitions through /dev/sda, which is not cache-coherent with /dev/sda1 (and sda2 etcetera). You can fix it using ...
user avatar
  • 221
21 votes

How does vm.overcommit_memory work?

This is an old question with a well-established answer, but I think there's more to add. First of all, when vm.overcommit_memory = 0, the vm.overcommit_ratio value is irrelevant. The kernel will use ...
user avatar
  • 334
19 votes
Accepted

Why can't QEMU allocate the memory if the Linux caches are too big?

Not all cached data can be discarded immediately. For example, cached dirty pages have to be written back to disk before they can be removed from RAM. You have no swap, so until those writes complete, ...
user avatar
18 votes

how to tell if NIC has multiqueue enabled?

ethtool -l <interface> will display the status of queues associated with an interface, if that interface's driver supports such a thing. In ethtool-land, multiqueue is indicated by "channels". ...
user avatar
17 votes

How do I list loaded Linux module parameter values?

grep -H '' /sys/module/ath9k*/parameters/* /sys/module/ath9k/parameters/blink:1 /sys/module/ath9k/parameters/bt_ant_diversity:0 /sys/module/ath9k/parameters/btcoex_enable:0 /sys/module/ath9k/...
user avatar
17 votes

Kernel stack trace to source code lines

I don't have a ~= RHEL5 at hand, so the output shown is from a Fedora 20, though the process should be mostly the same (the name of the function has changed). You'd need to install the appropriate ...
user avatar
  • 14.9k
17 votes
Accepted

Disabling rp_filter on one interface

Info there: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/Documentation/networking/ip-sysctl.txt?h=v4.9#n1090 Note the last sentence that would explain your attempts: ...
user avatar
  • 8,737
15 votes

Prevent the console from clearing the screen?

With systemd things are different. See article Stop Clearing My God Damned Console. In short: mkdir /etc/systemd/system/getty@.service.d cat >/etc/systemd/system/getty@.service.d/noclear.conf &...
user avatar
  • 1,103
15 votes
Accepted

Kernel stack trace to source code lines

Given an unstripped vmlinux with debugging symbols (typically included with "linux-devel" or "linux-headers" packages matching your kernel version), you can use the addr2line program included with ...
user avatar
  • 6,081
15 votes

Best way to disable swap in Linux

It used to be that only swap partitions in /etc/fstab were used automatically, however, systemd may be changing that slightly. You might need to do: systemctl mask dev-sdXX.swap (change sdXX) to ...
user avatar
  • 456
15 votes
Accepted

Why are connections in FIN_WAIT2 state not closed by the Linux kernel?

The kernel timeout only applies if the connection is orphaned. If the connection is still attached to a socket, the program that owns that socket is responsible for timing out the shutdown of the ...
user avatar
12 votes
Accepted

What is the unit of "mem" and "memory" in /proc/net/sockstat

There seems to be no documentation of this besides the kernel source itself, and I presume you don't want to dig quite that deep. After digging through several pages of search results I finally found ...
user avatar
12 votes

Best way to disable swap in Linux

If you are really sure you want to disable swapping (note: this is not recommended, even where you are pretty sure that physical RAM is more than enough), follow these steps: run swapoff -a: this ...
user avatar
  • 43.7k
11 votes

Does the "bs" option in "dd" really improve the speed?

With regards to the internal hard disk, at least -- when you are reading from the device the block layer at least has to retrieve one sector which is 512 bytes. So, when handling a 1 byte read you've ...
user avatar
  • 22.9k
9 votes

How to auto-start Degraded Software RAID1 under Debian 8.0.0 on boot?

The initramfs executes /scripts/local-top/mdadm to handle raid. In that script is the statement if $MDADM --assemble --scan --run --auto=yes${extra_args:+ $extra_args}; then verbose && ...
user avatar
8 votes

Kernel stack trace to source code lines

Install kernel-debuginfo Download decode_stacktrace.sh which is in the kernel source tree. Make stack dump output useful again. # ./decode_stacktrace.sh /usr/lib/debug/lib/modules/`uname -r`/...
user avatar
  • 211
8 votes

How to fine tune TCP performance on Linux with a 10Gb fiber connection

In Linux/Intel I would use following methodology for performance analysis: Hardware: turbostat Look for C/P states for cores, frequencies, number of SMIs. [1] cpufreq-info Look for current driver, ...
user avatar
  • 5,601
8 votes

How does CPU affinity interact with cgroups in Linux?

From the cpusets documentation: Calls to sched_setaffinity are filtered to just those CPUs allowed in that task's cpuset. This implies that CPU affinity masks are intersected with the cpus in ...
user avatar
8 votes

Can't run docker-container 'failed to create endpoint frosty_varahamihira on network bridge'

install the linux-modules-extra-raspi package to get the veth module.
user avatar
7 votes

rm on a directory with millions of files

TLDR: use rsync -a --delete emptyfolder/ x. This question has 50k views, and quite a few answers, but nobody seems to have benchmarked all the different replies. There's one link to an external ...
user avatar
  • 171
7 votes
Accepted

Linux read disk cache and NFS

Answer A8 of the Linux NFS FAQ has an explanation. A summary: it's up to the client to poll the server to ask for changes (by checking file attributes to see if they've changed since last time the ...
user avatar
7 votes

kube-proxy won't start in Minikube because of permission denied issue with /proc/sys/net/netfilter/nf_conntrack_max

change maxPerCore to 0 in configMap of kube-proxy to leave the limit as-is and ignore conntrack-min
user avatar
6 votes

TIME_WAIT consumes file descriptors?

The file descriptor is used by application to read/write from the socket. Thus if the application call close(), the file descriptor is immediately released. On the other hand, if the application call ...
user avatar
  • 376
6 votes

can high load cause server hang and error "blocked for more than 120 seconds"?

sudo sysctl -w vm.dirty_ratio=10 sudo sysctl -w vm.dirty_background_ratio=5 Then commit the change with: sudo sysctl -p solved it for me....
user avatar
  • 69
6 votes
Accepted

When a socket switch to TIME_WAIT state, why I can't see its inode number?

When the socket is in TIME_WAIT, there is no process attached to it anymore and the kernel is just holding it in case some other packet arrives. At this point, the software the originally opened this ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible