sysctl is a mechanism for controlling options and limits in the Unix-like operating system kernels. Sysctls can be used to tune performance or change behaviors of many subsystems.

learn more… | top users | synonyms

2
votes
1answer
2k views

How to make sysctl network bridge settings persist after a reboot?

I am setting up a notebook for software demo purpose. The machine has 8GB RAM, a Core i7 Intel CPU, a 128GB SSD, and runs Ubuntu 12.04 LTS 64bit. The notebook is used as a KVM host and runs a few KVM ...
108
votes
4answers
148k views

FreeBSD performance tuning: Sysctl parameter, loader.conf, kernel

I wanted to share knowledge of tuning FreeBSD via sysctl.conf / loader.conf / KENCONF / etc. It was initially based on Igor Sysoev's (author of nginx) presentation about FreeBSD tuning up to ...
6
votes
2answers
6k views

How to reset sysctl to it's OS defaults?

I couldn't find an answer in the man pages for sysctl. My sysctl.conf file is still at it's default state, I'm testing several values and loaded new settings via sysctl -p newsettings.conf. I though ...
3
votes
1answer
18 views

enabling ufw disables some of the settings in sysctl.conf

When I add rules to ufw and then enable it, some of my settings in sysctl.conf become void so I have to do sysctl -p after doing ufw enable. So for example one of my settings in sysctl.conf is to not ...
5
votes
2answers
9k views

Higher rmem_max value leading to more packet loss

The rmem_max Linux setting defines the size of the buffer that receives UDP packets. When traffic becomes too busy, packet loss starts occurring. I made a graph showing how packet loss increases ...
9
votes
1answer
271 views

Difference between ulimit, launchctl, sysctl?

When managing the limits of the operating system (specifically OSX), what is the difference and overlap between the functionality and history of these three tools: ulimit launchctl, launchd sysctl ...
0
votes
0answers
24 views

nginx monitoring failed to load status page under load

Nginx monitoring script so-called ztc failing to load nginx test page (mostly under highest load to nginx about 2000 rps, which used as proxy), causing errors like "nginx is down" on zabbix, and, in a ...
0
votes
0answers
56 views

Unusually high dentry cache usage leads to PHP performance degradation

We have lots of servers serving lots of requests with apache and php accessing remote memcacheds. But we are experiencing degradation from php side accessing memcached and obtaining lots of memcached ...
2
votes
3answers
9k views

Shared memory: shmget fails: No space left on device — how to increase limits?

I call shmget many times in my program, to get shm of of average size 85840 bytes. I obtain about 32771 shm ok, then shmget doesn't return a shm, but the error: "No space left on device". I have ...
2
votes
2answers
2k views

How to enable core files on CentOS 6

I am trying to enable core files on a machine running CentOS 6; however, nothing I have tried has produced core files…here is what I have done: Added the following two lines to ...
0
votes
1answer
199 views

NGINX not responding during DDoS attacks

I'm going to get straight to the point, NGINX doesn't seem to handle any HTTP requests during a DDoS attack using XML-RPC. The server only uses about 1% of the CPU during an XML-RPC DDoS attack. The ...
0
votes
0answers
276 views

centos 7: sysctl -p /etc/sysctl.d/50-default.conf returns error

I have rented container from OVH a while ago but last night all of a sudden my machine stopped responding on IP level... after reboot I have noticed the following systemd-sysctl.service - Apply ...
0
votes
0answers
94 views

UFW - Set correct kernel params

As every system administrator does, one of the first things i did right after booting up my web server was install ufw and tune/set kernel parameters in /etc/sysctl.conf. By the way, this is my ...
0
votes
0answers
75 views

systemd difference between start and restart

In /etc/sysctl.d folder we have config files are going to be applied at boot time. I use debian 8 with systemd. And now procps is managed by systemd. Please, help me understand, why service procps ...
3
votes
3answers
3k views

Kernel Tuning with Privileged Docker Container

I'm building a container to tune kernel settings for a load balancer. I'd prefer to deploy those changes to the host in an image using a single privileged container. For example: docker run --rm ...
5
votes
3answers
229 views

OOM invoked with plenty of free swap

I am running an ARM router with i2p and tor on it - a Netgear R7000. Of course I've added a full 512 MB of SWAP to it to prevent OOMs, understanding that it could slow down the system... But then I ...
0
votes
0answers
864 views

sysctl: cannot stat /proc/sys/kernel/exec-shield: No such file or directory

Enable ExecShield protection - ExecShield is security Linux kernel patch to avoid worms and other problems. After Adding to /etc/sysctl kernel.exec-shield = 1 Getting this error sysctl: cannot ...
7
votes
4answers
4k views

Suggestions for making sysfs parameters persist across reboots

I'm experimenting with large changes to Linux system runtime parameters exposed through the sysfs virtual file system. What is the most efficient way to maintain these parameters so that they persist ...
26
votes
4answers
70k views

Improving TCP performance over a gigabit network with lots of connections and high traffic of small packets

I’m trying to improve my TCP throughput over a “gigabit network with lots of connections and high traffic of small packets”. My server OS is Ubuntu 11.10 Server 64bit. There are about 50.000 (and ...
0
votes
0answers
476 views

Fast Ethernet UDP optimize receive buffers

I have a Linux computer which must receive streaming data from several devices (up to 30 or so) during long terms. This computer is connected to a Fast Ethernet local area network (100 Mbps) where ...
21
votes
1answer
16k views

How does vm.overcommit_memory work?

When I use the default settings: vm.overcommit_memory = 0 vm.overcommit_ratio = 50 I can read these values from /proc/meminfo file: CommitLimit: 2609604 kB Committed_AS: 1579976 kB But ...
5
votes
3answers
4k views

Persisting nf_conntrack_max Across Reboots

In /proc I have two entries for nf_conntrack_max: /proc/sys/net/netfilter/nf_conntrack_max /proc/sys/net/nf_conntrack_max The seem to point to the same value as changing one also changes the ...
0
votes
2answers
2k views

Recommended TCP keepalive settings for a busy server

We are having some network timeout issues on a Debian server that is quite busy, and maintains multiple connections to a number of other servers on the network. Here are our current TCP keepalive ...
0
votes
1answer
2k views

error: “net.netfilter.nf_conntrack_acct” is an unknown key

I have the this error when I run sysctl -p in Debian 5.0.8. error: "net.netfilter.nf_conntrack_acct" is an unknown key My sysctl configuration net.netfilter.nf_conntrack_acct = 1 ...
1
vote
1answer
5k views

Sysctl config for high performance, large activity

We have some server with a huge amount of visitors (every minute, every day). Basically we had a nice fine-tuned sysctl config for this purpose. (If you don't modify it, it starts to behave ...
1
vote
1answer
2k views

File-descriptors setting on /etc/sysctl.conf

I have recently learnt that to be able to increase the amount of virtualhosts that we can serve via Apache depends on file-descriptors. they say the value should be added to /etc/sysctl.conf as ...
1
vote
1answer
921 views

Is there a location of the sysctl kernel parameters for osX?

I would like to read up on os X kernel parameters. I can find them listed, but where can I find the meaning of them? For example this parameter net.alf.loglevel: 55 which are not in the man ...
6
votes
2answers
4k views

Modifying kernel shared memory settings on a lion install

What's the location of the sysctl.conf file on lion? In Snow Leopard it was in /etc/sysctl.conf but now that folder doesn't contain it anymore. Searching for the file in spotlight yields no results. ...
3
votes
1answer
2k views

Increasing FreeBSD threads

For network apps that create one thread per connection (like Pound), threadcount can become a bottleneck on the number of concurrent connections you can server. I'm running FreeBSD 8 x64: $ sysctl ...
1
vote
1answer
835 views

net.inet.tcp.blackhole option on Fedora

This link of freebsdblog.org suggests a configuration option for FreeBSD that tells the system to drop all packages arriving from the network to a closed port and thus somewhat securing your system ...
1
vote
1answer
230 views

Slow POST upload (Linux kernel Tuning)

I'm working in a Caucho Resin backend with an HAproxy configured in front of them, in a dedicated server. Now I'm dealing with a file upload problem. Our web application allows a file upload for ...
6
votes
2answers
4k views

Netstat -s showing (and growing) “packets pruned from receive queue” and “packets collapsed in receive queue”

we are seeing the following: [root@primary data]# netstat -s | grep buffer ; sleep 10 ; netstat -s | grep buffer 20560 packets pruned from receive queue because of socket buffer overrun ...
8
votes
1answer
1k views

TCP packet being retransmitted 7 times when sysctl tcp_retries1 is set to 3 - why?

Ubuntu 12.04 I am trying to better understand how many times TCP will attempt to retransmit a packet when it does not receive confirmation the destination received it. After reading the tcp man page ...
3
votes
1answer
2k views

Permission denied for root to change inotify max_user_watches, how solve this?

As root in a CentOs 6.4 server I got this error in an application: Fri May 16 01:45:23 2014 Error: Terminating since out of inotify watches. Consider increasing /proc/sys/fs/inotify/max_user_watches ...
1
vote
4answers
6k views

Persistent changes to /proc/sys/sunrpc/tcp_slot_table_entries

I'm trying to make a persistent change to sunrpc.tcp_slot_table_entries on a Linux CentOS 5.5. This value has been found important for the performance of our NFS clients, and must be set before the ...
0
votes
1answer
2k views

TCP Zero windows size and full windows size

The problem that we are facing is that some of the http connection have response time > 60s (about 5%). I discover that the problem should between the web server and loadbalancer. Here is my finding, ...
1
vote
0answers
65 views

How to learn max/min value of a sysctl parameter can be in FreeBSD?

I have a simple question. I want to learn max/min value of a sysctl parameter can be. Where can I find bounds of these parameters? Thanks
2
votes
1answer
171 views

How do you change tcp_congestion_control on OpenVZ?

I have a network of OpenVZ machines that I am testing various congestion control methods on. I need to know how to change the congestion control. Currently I get nothing but permission denied. Is it ...
0
votes
1answer
188 views

Permission denied when setting values in sysctl on Ubuntu 12.04

I am trying to configure my Ubuntu 12.04 VPS (OpenVZ) to reboot when it runs out of memory. To do this I have added following lines to my "/etc/sysctl.conf" file. vm.panic_on_oom = 1 kernel.panic = ...
0
votes
2answers
355 views

nginx or kernel queueing traffic

We have a setup that looks like this: nginx->haproxy->app servers We are terminating SSL with nginx and it sits in front of everything. During our peak load times, we are experiencing about a 2x ...
9
votes
3answers
4k views

Where is the correct place to set net.netfilter.nf_conntrack_buckets?

I'm currently trying to set net.netfilter.nf_conntrack_buckets on boot. I initially assumed that this could be done through sysctl.conf, but net.netfilter.nf_conntrack_buckets (and other ...
1
vote
2answers
2k views

SYN Cookies on a LAN server - Ok / advisable to disable?

We are looking at tuning our linux tcp stack on one of our lan boxes. We were wondering if it is ok / advisable to disable SYN cookies on a server that doesnt have any sort of external (eg: ...
0
votes
2answers
949 views

Should rp_filter sysctl parameter be set on bonding master or member slaves?

I have a server running RHEL6.4. I need to configure .rp_filter sysctl parameter for my server's private interconnect. This server has 2 NICs bonded together. I looked through the documentation and ...
-1
votes
1answer
91 views

available file handles is 0, how to increase [closed]

Since some days, we're getting "Too Many Open Files" within an Java application while loading files. So i start searching on Google, and increased fs.file-max to 200000 in my /etc/sysctl.conf. After ...
1
vote
2answers
8k views

error: “net.ipv4.netfilter.ip_conntrack_max” is an unknown key

I have a problem on Ubuntu 10.04.3 LTS x64 with sysctl net.ipv4.netfilter.ip_conntrack_max . If I run this command on shell, I get back an error: error: net.ipv4.netfilter.ip_conntrack_max" is an ...
2
votes
1answer
2k views

No buffer space available and tuning with sysctl

Not really a network guy so please bear with me. I'm currently hosting a web application that sends UDP to all IP addresses in it's subnet periodically. That's 2048 IPs. My problem is it throws No ...
0
votes
2answers
495 views

Networking (dhcpcd) under LXC

I would like to boot an Arch Linux instance using LXC. Just about everything works, but I'm encountering the following error when trying to configure an interface using dhcpcd: # dhcpcd eth0 ...
5
votes
1answer
3k views

Linux networking port exhaustion

I've done as much research as I could on this without digging right off in the kernel source. There seems to be a large amount of disinformation/incorrect info on the subject, so I hope this answers ...
2
votes
4answers
5k views

After reboot debian box ignore sysctl.conf values

Where is right place for sysctl redefined values? I have: > uname -a Linux note 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux > cat /etc/debian_version wheezy/sid ...
2
votes
1answer
5k views

nf_conntrack: table full, dropping packet

Mar 24 03:29:26 kernel: [1557411.243821] TCP: time wait bucket table overflow (CT0) Mar 24 03:29:26 kernel: [1557411.243828] TCP: time wait bucket table overflow (CT0) Mar 24 03:29:26 kernel: ...