Tag Info

Hot answers tagged

11

Specific answer: Immediately speaking, you're calling sysctl::value, but value isn't declared in your sysctl class. See this example that uses a sysctl::conf declaration. Without the define value, there is no sysctl::value subclass for you to call. General answer and guidance: The Augeas construct (see also its type reference documentation) that is part ...


10

For all Linux systems which I used SHMALL is measured in pages and SHMMAX is measured in bytes. I think you may check your system using ipcs command, which always converts above parameters in KBytes while output, and compare it with sysctl values: [aseryozhin@centos ~]$ ipcs -l ------ Shared Memory Limits -------- max number of segments = 4096 ...


10

You can find the documentation in man 5 proc: This file contains the kernel virtual memory accounting mode. Values are: 0: heuristic overcommit (this is the default) 1: always overcommit, never check 2: always check, never overcommit In mode 0, calls of mmap(2) with MAP_NORESERVE are not checked, and the default check is very weak, leading to ...


8

As far as I know there is no "undo" for sysctl -- You need to re-enter the default settings (typically /etc/sysctl.conf simply does not specify defaults, so re-reading it won't revert your changes unless there's an explicit setting). If you do not know your default settings a reboot will get them back, and you can then list them with sysctl -a (store this ...


7

The problem might be that you are getting too many interrupts on your network card. If Bandwidth is not the problem, frequency is the problem: Turn up send/receive buffers on the network card ethtool -g eth0 Will show you the current settings (256 or 512 entries). You can propably raise these to 1024, 2048 or 3172. More does propably not make sense. ...


7

A smurf attack is where someone sends packets to a broadcast address, usually with a spoofed source, to trick you into sending a large number of replies. The clog your logs with error messages. Ignoring them keeps the logs uncluttered. It's not like you can fix the Internet anyway. A SYN flood attack is one where an attacker hits a server with a large ...


5

It is possible you don't have the ipv6 kernel module loaded on the system you're referring to. If you execute sysctl -a|grep ipv6 you will get a list of all available sysctl's referring specifically to ipv6. If that list is empty, that would lead me to believe ipv6 is not loaded. If you do see the net.ipv6.conf.all.forwarding entry in that sysctl grep, ...


4

Following might not be the definitive answer but it will definitely put forth some ideas Try adding these to sysctl.conf ## tcp selective acknowledgements. net.ipv4.tcp_sack = 1 ##enable window scaling net.ipv4.tcp_window_scaling = 1 ## net.ipv4.tcp_no_metrics_save = 1 While selective tcp ack is good for optimal performance in the case of high ...


4

It doesn't mean "try forever", it means "don't try at all." This is the server trying to politely tell the client that the server is getting ready to close his socket, and if it would please do an orderly disconnect, or send some more data, that would be wonderful. It will try X times to get the client to respond, and after X, it reclaims the socket on the ...


4

If you're looking for hardcore static performance, look into nginx. A web server that specializes specifically in serving static content. You will find that Apache can serve static content quite quickly too if you don't use complex features or .htaccess files, etc. Caching and connection handling are best left to the tunable features of the service daemon ...


4

More buffer doesn't necessarily imply more speed. More buffer simply implies more buffer. Below a certain value you'll see overflow as applications can't necessarily service received data quickly enough. This is bad, but at the point where there is sufficient buffer for the app to service at a reasonable rate even in the event of the occasional traffic ...


4

There are several bugreports about this on Red Hat Bugzilla, for example here, here and here. Just remove the lines or run sysctl -e -p instead of sysctl -p.


3

You mention in your question that you are using a VPS. What kind of VPS? It sounds like you are in a OpenVZ VPS. If it is OpenVZ, it is sharing the kernel among many containers like yours and you cannot change the kernel configuration per container but directly on the host. I actually build a litlle OpenVZ centos container and I tried to apply the kernel ...


3

I think that sysctl parameter is for viewing only. You'll want to use the /sys/module/nf_conntrack/parameters/hashsize interface for runtime changes, and the hashsize module option to set it during initial module load. You'd want an entry in a /etc/modprobe.d/ file that looks something like this: options nf_conntrack hashsize=XXXXX


3

Try: modprobe bridge lsmod | grep bridge You don't the those modules loaded into the kernel.


3

OpenVZ is container-based, and as such, uses a shared kernel. Containers can only change a very small, restricted set of sysctls (which ones, unfortunately, aren't even documented). If you need to do this, you need to be using something other than OpenVZ.


3

You have two main questions here: 1. Strictly IPv4 speaking, is port exhaustion actually possible? Yes. Take, for example, a load balancing router sending all connections to a NAT IP address. This is likely to happen when you have many SRC IPs connecting to the bottleneck of a single DST IP. This means that your webserver could have a bunch of ...


3

Setting tcp_orphan_retries to 0 is a special case, see tcp_timer.c 98 /* Calculate maximal number or retries on an orphaned socket. */ 99 static int tcp_orphan_retries(struct sock *sk, int alive) 100 { 101 int retries = sysctl_tcp_orphan_retries; /* May be zero. */ 102 103 /* We know from an ICMP that something is wrong. */ 104 ...


3

Check if there is a file in /etc/sysctl.d with your parameter. These files override the /etc/sysctl.conf file...


3

I believe /etc/sysctl.conf is still the right place (and man sysctl.conf agrees). Did you reboot? changes to /etc/sysctl.conf are not a real-time thing: They are only read/applied when the system enters multi-user mode during startup.


3

It's more like computer science question. Especially if you want to dig into hash tables and big-O notations. The answer is: If you are handling many TCP sessions on sever you really want to look up connection's tcp parameters in O(1) time instead of O(n). FreeBSD uses chaining to resolve hash table collisions. So if there is lots of connection there will ...


3

Have a look at Some sysctl's are ignored on boot. In short, the settings are applied early, before some kernel modules are loaded.


2

If it were me, I'd probably create an /etc/sysfs.conf, and an /etc/init.d/sysfsutils init script. Then I could keep all of my sysfs related configs and options separate from everything else. With an init script, it could be managed and handled using the standard idioms for managing services and configurations through SysV init scripts (including service ...


2

I've used this module in the past with RHEL5: puppet-sysctl To use it, you'll have to install the module to your modules folder (probably /etc/puppet/modules/sysctl) include the class on your node: (include sysctl) and then call the def resource like this: class s_sysctl::rhel_defaults { include sysctl # Controls IP packet forwarding ...


2

Use ipcs -l to check the limits actually in force, and ipcs -a and ipcs -m to see what is in use, so you can compare the output. Look at the nattch column: are there segments with no processes attached that were not removed when processes exited (which normally means the program crashed)? ipcrm can clear them, although if this is a test machine, a reboot is ...


2

It turns out shmmni is limited to 32768 in the kernel: define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ in the file ...version.../include/linux/ipc.h So short of recompiling the kernel, that is the hard limit on the number of shared memory segments. Sorry.


2

The location is still /etc/sysctl.conf or more precisely /private/etc/sysctl.conf. I had to tweak some settings because I wanted to run Postgresql on my machine and it turned out that I had to modify all of the five settings in order to get it running. So I created the file and put in something like this: kern.sysv.shmmax=1610612736 kern.sysv.shmmin=1 ...


2

You could look into the Eventually-Persistent Ram Disk (EPRD), but the best way to handle this is in hardware. You want something independent of the operating system in order to protect your data through OS crashes, power events and other disruptions. Is there a reason that you're not interested in using the non-volatile cache available on modern RAID ...


2

Linux already does some writeback caching. Look into pdflush and how it works. Unfortunately it takes some time to understand all the details, since it's quite complicated, but if you're wanting to tune it (e.g. for laptops) then that's the place to start.


2

These variables are measured in bytes as stated in the documentation. I think it is more important to look at the postgresql configuration parameters. You need to look at the SHMALL/SHMMAX values when needed. For example, if you want to increase the maximum number of connections, you may need to increase these limits. Tuning the database server depends on ...



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