Questions tagged [linux-kernel]

The Linux kernel is the operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software.

Filter by
Sorted by
Tagged with
60 votes
12 answers
247k views

How do I make Linux recognize a new SATA /dev/sda drive I hot swapped in without rebooting?

Hot swapping out a failed SATA /dev/sda drive worked fine, but when I went to swap in a new drive, it wasn't recognized: [root@fs-2 ~]# tail -18 /var/log/messages May 5 16:54:35 fs-2 kernel: ata1: ...
Philip Durbin's user avatar
45 votes
2 answers
61k views

Effects of configuring vm.overcommit_memory

My VPS web server running on CentOS 5.4 (Linux kernel 2.6.16.33-xenU) irregularly (like once a month give or take a few weeks) becomes unresponsive due to oom-killer kicking in. Monitoring of the ...
dunxd's user avatar
  • 9,714
43 votes
5 answers
13k views

Intentionally cause an I/O error in Linux?

Is there anyway, with Linux, to purposely cause a block device to report an I/O error, or possibly simulate one for testing purposes?
Dok's user avatar
  • 1,168
32 votes
5 answers
12k views

What are the performance implications for millions of files in a modern file system?

Let's say we're using ext4 (with dir_index enabled) to host around 3M files (with an average of 750KB size) and we need to decide what folder scheme we're going to use. In the first solution, we ...
Leandro Moreira's user avatar
25 votes
9 answers
23k views

Maximum number of files in one ext3 directory while still getting acceptable performance?

I have an application writing to an ext3 directory which over time has grown to roughly three million files. Needless to say, reading the file listing of this directory is unbearably slow. I don't ...
knorv's user avatar
  • 1,819
23 votes
4 answers
30k views

Linux memory fragmentation

Is there a way to detect memory fragmentation on Linux? This is because on some long running servers I have noticed performance degradation and only after I restart process I see better performance. I ...
Raghu's user avatar
  • 286
20 votes
2 answers
6k views

Why CPU spent time on IO(wa)?

I know wa (in top) measures the CPU time on waiting for I/O. Many articles say that. But I am confused that, based on 2 knowledge points: if a process uses a system call to read disk, the process is ...
HUA Di's user avatar
  • 303
19 votes
8 answers
58k views

kswapd often uses 100% CPU when swap is in use

Most of the time when my computer starts to need swap, I see a massive spike in CPU usage (kswapd0 is consistently using 99%-100% CPU). According to top, the time is spent in sy (system/kernel) not wa ...
Zaz's user avatar
  • 813
19 votes
1 answer
26k views

Difference between net.core.rmem_max and net.ipv4.tcp_rmem

What's the difference between net.core.rmem_max and the third value of net.ipv4.tcp_rmem? Which has the higher priority for tcp connections? For below two examples, what's the max buffer for tcp ...
bydsky's user avatar
  • 293
18 votes
2 answers
3k views

Cause of page fragmentation on "large" server with xfs, 20 disks and Ceph

Any insight from someone with a bit of experience in the linux IO system would be helpful. Here is my story: Recently brought up a cluster of six Dell PowerEdge rx720xds to serve files via Ceph. ...
pingu's user avatar
  • 181
15 votes
4 answers
44k views

In CentOS 6.x, how can I upgrade to Kernel 3.4?

I have a server running CentOS 6.2 with kernel version 2.6.32, but I need to increase my application Performance. The Kernel Version 3.4 has x32abi which can improve the performance so i want to ...
shiva's user avatar
  • 147
15 votes
3 answers
27k views

How can I tune the initial TCP retransmit timeout?

The initial TCP RTO value of 3s is too long for most LAN-based applications. How can I tune it lower? Is there a sysctl?
claymation's user avatar
15 votes
2 answers
3k views

Linux kernel detecting wrong processor frequency

After a cold boot of a 6.0.8 Debian server (HP ProLiant), ntpd played havoc with system time: offset and jitter with respect to the usual and reliable reference time servers growing without limit. (...
Stefano M's user avatar
  • 313
14 votes
3 answers
5k views

Why does /proc/net/tcp6 represents ::1 as ::100:0

I was writing an utility to check /proc/net/tcp and tcp6 for active connections as its faster than parsing netstat output. As I dont actually have ipv6 enabled I was mainly utilizing localhost as my ...
gregswift's user avatar
  • 275
14 votes
3 answers
19k views

1000 HZ linux kernel necessary if I have tickless and high resolution timer?

I am trying to improve performance on my server. I have a few processes that need low jitter (less than 10ms variance). I have a load average of 4 maximum on an i7-920 (4 physical cores, 8 with HT). ...
Bob's user avatar
  • 195
14 votes
2 answers
1k views

CoreOS: tcpdump mysteriously solves network issue (excessive number of sockets used)

I've got a mystery for you today. We run a small, three node Elasticsearch cluster based on CoreOS (2023.5.0 / Linux 4.19.25-coreos) on Azure. Elasticsearch is run inside a docker container in host ...
Stephan Klein's user avatar
13 votes
2 answers
3k views

How to avoid downtime with linux?

Frequently software updates to Ubuntu require reboots (which can have side effects such as downtime). I see Ubuntu has https://www.ubuntu.com/livepatch which allows for kernel updates without reboots,...
user75126's user avatar
  • 250
13 votes
3 answers
6k views

How dangerous might it be - and what performance gains may be had - by turning vulnerability mitigations off on non-Internet facing servers?

When a virtual machine Linux host server is non-Internet facing and is used exclusively on a LAN and is using a relatively well tested distribution like Proxmox, how dangerous would it be to turn off ...
ylluminate's user avatar
  • 1,197
12 votes
4 answers
46k views

is /dev/dm-1 a partition or a whole block device?

Is there a way to figure out if /dev/dm-1 is a block device partition or a whole block device? If /dev/dm-1 is a partition, is there a way to find out the path to the corresponding whole block device?
Loic Dachary's user avatar
12 votes
2 answers
23k views

Can't update linux kernel on VPS

I recently started using VPS from OVH: http://www.ovh.co.uk/vps/vps-classic.xml This is likely problem very specific to this one provider. My goal is to install and run Docker on it, for this I need ...
zencodism's user avatar
  • 265
12 votes
5 answers
7k views

tc u32 --- how to match L2 protocols in recent kernels?

I have a nice shaper, with hashed filtering, built at a linux bridge. In short, br0 connects external and internal physical interfaces, VLAN tagged packets are bridged "transparently" (I ...
brownian's user avatar
  • 291
12 votes
1 answer
5k views

How to achieve per-packet multipath routing on Linux?

Linux Kernel before 3.6 used route caching to do IPv4 multipath routing, which meant routing between two separate lines/ISPs was quite easy. From 3.6 the algorithm changed to being per-packet, meaning ...
bao7uo's user avatar
  • 1,714
12 votes
1 answer
29k views

How to properly permanent enable ip forwarding in Linux with systemd?

I try to enable ip forwarding (between enp0s3 and tun0 interfaces) and write net.ipv4.ip_forward = 1 in /etc/sysctl.conf. After restart I have $ cat /proc/sys/net/ipv4/ip_forward 1 But forwarding ...
Unsacrificed's user avatar
11 votes
6 answers
20k views

Do Containers Have An OS?

I know that containers use the host's kernel and from what I understand , that's the reason we do not need an OS. My questions are (and I couldn't find any good explanation online) : 1) If that's ...
John Doe's user avatar
  • 515
11 votes
3 answers
35k views

What is mdev and how to /dev/* nodes get created in Linux?

Our Linux kernel is 2.6.31 running on an embedded MIPS processor with busybox. The initialisation script (rcS) starts mdev with: echo "/sbin/stbhotplug" > /proc/sys/kernel/hotplug mdev -s Can ...
user626201's user avatar
11 votes
4 answers
13k views

How can I see logs in a server after a kernel panic hang?

I am running a production gentoo Linux machine, and recently there was a situation where the server hung in my co-located premises and when I got there I noticed that the server was hung on what ...
Low Kian Seong's user avatar
10 votes
1 answer
9k views

Default value of /proc/sys/fs/file-max

I am aware that /proc/sys/fs/file-max defines the maximum number of open file descriptors and can be set on runtime or during boot. However: what is its default value? Checking 10 servers in my ...
taranion's user avatar
  • 235
10 votes
1 answer
18k views

Why does Linux answer to ARP on incorrect interfaces?

I have the following Linux networking setup: there is an eth10 network interface with the assigned address 10.11.0.1/24. Then there is a tap0 network interface with assigned dummy address 0.0.0.1/32 (...
juhist's user avatar
  • 322
10 votes
3 answers
8k views

Linux: Why does the CPU frequency fluctuate when using the performance governor?

I'm using a Debian 8 amd64 machine for benchmarking. During experimentation, I would like the CPU to operate at a fixed frequency (preferably the maximum possible). This will rule out the CPU clock ...
Edd Barrett's user avatar
10 votes
2 answers
3k views

View full program command line arguments in OOM killer logs

Is it possible to view full program command line arguments in OOM killler logs ? What I see now in /var/log/syslog is Memory cgroup out of memory: Kill process 29187 (beam.smp) score 998 or sacrifice ...
sergeyz's user avatar
  • 223
9 votes
1 answer
13k views

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

If I use my machine [Ubuntu 16.04 64 bit, kernel 4.4] for a while, QEMU needs the kernel caches to be dropped, otherwise, it won't manage to allocate the RAM. Why does it happen? This is a sample ...
Marcus's user avatar
  • 242
9 votes
2 answers
33k views

How do I set the default kernel parameters in CentOS for all existing and future kernels?

I'd like to remove the rhgb and quiet kernel parameters which are used by default when the kernel is booted in CentOS 6, but I want this to apply to all currently installed kernels as well as any ...
mgorven's user avatar
  • 31k
9 votes
2 answers
784 views

nic: Something Wicked happened! ffff

I'm configuring a GNU/Linux Router with Debian Stretch (9.7) and before rebooting the server, all traffic from one interface to another was going ok, but after that, I received a message like this (...
ivanleoncz's user avatar
  • 1,731
9 votes
2 answers
29k views

How does one diagnose Linux LACP issues at the kernel level?

Is there an underlying administrative or diagnostic interface to the Linux bonding driver to determine what is going on internally? I've used link aggregation between Linux boxes and Cisco switches ...
jjoganic's user avatar
9 votes
2 answers
2k views

Linux Kernel Versioning: Debian Sid vs Ubuntu Precise

I have setup two machines: On one machine I have installed Ubuntu Precise 12.04 beta and dist-upgraded to the latest packages. On the other machine I have installed Debian Sid Unstable and dist-...
Andrew Tomazos's user avatar
9 votes
1 answer
12k views

Flush processes consume too much of CPU

The Server is EC2 Instance, it stands for saving files to NAS (NFS) from HTTPD. The processes like flush-0:32 consume over %90 of CPU and load average: 65.50, 64.02, 66.59. According the graph, it's ...
Roman Newaza's user avatar
8 votes
2 answers
8k views

Why 224.0.0.1 traffic is filtered by Linux hosts?

When sending an ICMPv4 echo request to a destination address like 224.0.0.1, it is ignored by Linux hosts receiving the request. The destination MAC address used is 01:00:5e:00:00:01. The only way to ...
djoproject's user avatar
8 votes
0 answers
4k views

Multithreading with multi-queue NIC on SMP system [closed]

How are packets scheduled from network interface queues to CPUs, then onwards to threads for processing? What needs to be considered when it comes to how packets are hashed across queues, hardware ...
svenx's user avatar
  • 416
7 votes
5 answers
3k views

Convey multicast (to another LAN) through WAN disabling multicast

My Server and Client softwares run both on Linux. The Server broadcasts multicast, the Client listens multicast. My Client has to migrate to another site, and unfortunately multicast is not allowed ...
oHo's user avatar
  • 565
7 votes
4 answers
8k views

linux initcwnd and initrwnd via /etc/sysctl.conf

Folks, As we know, the 3.x kernels have higher TCP default connection values, such as initcwnd and initrwnd. For 2.x friends, is there a way to set these in /etc/sysctl.conf instead of the ip route ...
CMag's user avatar
  • 707
7 votes
1 answer
42k views

How to compile the kernel with debug symbols? [closed]

I've already finishing compiling the kernel from source, but how to compile it with debug symbols,what additional steps to I need to take?
yum's user avatar
  • 589
7 votes
1 answer
16k views

How to disable ipv6 support in Linux entirely?

We are currently setting up a some local network servers to run in a full ipv4 network. I can be sure, that this network don't have ipv6 support, and never will. Next to that, partially because of a ...
user avatar
7 votes
3 answers
4k views

Linux: echo 3 > /proc/sys/vm/drop_caches takes hours to complete

I have a Thecus N8900 NAS, which is a Linux based file server, providing files via NFS to six clients. For some reason that Thecus support has yet to explain, it runs a script that checks /proc/...
rmm's user avatar
  • 81
7 votes
5 answers
2k views

MySQL 5.5 degraded performance in linux kernel 3.2 compared to 2.6

Our database servers (mainly based on the Debian stable packages (=currently Wheezy) seem to have about 4 times more load for the same workload in kernel 3.2.0-4-amd64 then in it's previous 2.6.32-5-...
Wrikken's user avatar
  • 991
6 votes
4 answers
68k views

How to view linux kernel logs live?

I have a kernel module logging input of some sensor while I work with it. I want to see if there is a command that outputs /var/log/messages (for example) but waits for more logs to come. That is, ...
Shahbaz's user avatar
  • 169
6 votes
2 answers
5k views

Linux (non-transparent) per-process hugepage accounting

I've recently converted some java apps to run with linux manually-configured hugepages, as described here. I point out "manually-configured" because they are not transparent hugepages, which gave us ...
Dan Pritts's user avatar
  • 3,281
6 votes
3 answers
1k views

Kernel updates without rebooting

Similar to some of the topics touched on in this question, Is it important to reboot Linux after a kernel update?, I was curious if there was a way in which one could apply kernel updates to the ...
John's user avatar
  • 2,276
6 votes
2 answers
7k views

Our embedded linux system won't recognize a USB Device if it is plugged in before powerup. Suggestions?

We are developing on a small embedded device. This device us a gumstix overo board running OpenEmbedded linux. We have our development almost completely done, and have run into the strangest of bugs ...
Blaine's user avatar
  • 111
6 votes
1 answer
5k views

Debugging kmalloc-64 slab allocations / memory leak

I have two virtual servers that are configured very similarly: Debian bullseye (testing), 5.6.0 kernel, 512 MB RAM. They're both running a similar workload: MySQL, PowerDNS, WireGuard, dnstools.ws ...
Daniel Lo Nigro's user avatar
6 votes
1 answer
9k views

Why can't my Linux kernel reclaim its slab memory?

I have a system that suffered from ever-increasing memory usage until it hit the point where it was hitting swap even for mundane things and consequently becoming pretty unresponsive. The culprit ...
asciiphil's user avatar
  • 3,146

1
2 3 4 5
12