• 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Cannot find default value in sysctl - Ubuntu

Im running Ubuntu 14.0.4 LTS and im trying to change some default values to optimize.

I run sysctl -a to see all values.

I have /etc/sysctl.conf and /etc/sysctl.d/ which has a few 10-*.conf files in it.

I want to change net.ipv4.tcp_max_syn_backlog value but it is not present in any of the configuration files above.

a) Shall I just enter the new value in any of those files? Where is the default value stored?

b) After changing the value shall I run service procps start or sysctl -p?

I have read that the configuration files can be in the following places:

  1. /run/sysctl.d/*.conf (not present on my system)
  2. /usr/local/lib/sysctl.d/*.conf (not present on my system)
  3. /usr/lib/sysctl.d/*.conf (not present on my system)
  4. /lib/sysctl.d/*.conf (not present on my system)
  5. /etc/sysctl.d/*.conf
  6. /etc/sysctl.conf

Thanks in advance

The default value for kernel runtime parameters is selected/set at compilation time of the kernel (module). sysctl is used to read those parameters and allows you to modify/override those parameters at both system boot and at runtime.

Personally I have never used any other file than /etc/sysctl.conf and I would use sysctl -p to verify the syntax of the new parameters I set.
(Except when I don't use sysctl at all and manipulate kernel paramaters directly e.g. with the traditional echo 1 > /proc/sys/net/ipv4/ip_forward )

  • 1
Reply Report
      • 1
    • I prefer making a new file under sysctl.d. That way possible OS updates on the sysctl.conf file won't overwrite my changes.
      • 1
    • Thanks for your reply. I see, so if the default is 256 and I set it to 5000, then in order to "go back" to default I will have to set it to the value it originally was, removing the new value wont restore the default value. However isn't directly writing to "/proc/sys/..." temporary? Or will it survive reboot? Thanks in advance

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags