Tweaking sysctl.conf, anyone ever use any of these?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Level 1
Level 1
Posts: 9
Joined: Tue Jan 01, 2013 3:01 am

Tweaking sysctl.conf, anyone ever use any of these?

Postby binskipy2u » Thu Jan 24, 2013 5:13 am

Any thoughts.. dont want to bork the system.. note the network/swap tweaks...

I got these from various sites regarding tweaking swappiness and broadband... Anyone else use some,most, all of these?

to enable these on the fly, open up a terminal and type in.. sudo sysctl -p

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1

# Disables IP source routing
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Increase maximum amount of memory allocated to shm
# Only uncomment if needed!
# kernel.shmmax = 67108864
# Disable ICMP Redirect Acceptance
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.accept_redirects = 0

# Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.default.log_martians = 1
net.ipv4.conf.all.log_martians = 1

# Decrease the time default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 25

# Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 1200

# Turn on the tcp_window_scaling
net.ipv4.tcp_window_scaling = 1

# Turn on the tcp_sack
net.ipv4.tcp_sack = 1

# tcp_fack should be on because of sack
net.ipv4.tcp_fack = 1

# Turn on the tcp_timestamps
net.ipv4.tcp_timestamps = 1

# Enable TCP SYN Cookie Protection
net.ipv4.tcp_syncookies = 1

# Enable ignoring broadcasts request
net.ipv4.icmp_echo_ignore_broadcasts = 1

# Enable bad error message Protection
net.ipv4.icmp_ignore_bogus_error_responses = 1

# Make more local ports available
# net.ipv4.ip_local_port_range = 1024 65000
# Set TCP Re-Ordering value in kernel to '5'

net.ipv4.tcp_reordering = 5

# Lower syn retry rates
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 3

# Set Max SYN Backlog to '2048'
net.ipv4.tcp_max_syn_backlog = 2048

# Various Settings
net.core.netdev_max_backlog = 1024

# Increase the maximum number of skb-heads to be cached
net.core.hot_list_length = 256

# Increase the tcp-time-wait buckets pool size
net.ipv4.tcp_max_tw_buckets = 360000

# This will increase the amount of memory available for socket input/output queues
net.core.rmem_default = 65535
net.core.rmem_max = 8388608
net.ipv4.tcp_rmem = 4096 87380 8388608
net.core.wmem_default = 65535
net.core.wmem_max = 8388608
net.ipv4.tcp_wmem = 4096 65535 8388608
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.core.optmem_max = 40960

vm.swappiness = 0
vm.dirty_background_ratio = 50
vm.dirty_ratio = 80

User avatar
Level 14
Level 14
Posts: 5138
Joined: Mon Dec 01, 2008 11:21 am

Re: Tweaking sysctl.conf, anyone ever use any of these?

Postby viking777 » Thu Jan 24, 2013 5:48 am

I don't use any of them (at least not knowingly), but I got a massive increase in adsl speed when I did this:

I thought I had a post on here about my experience with that tweak , but I can't find it. It was years ago I did it, but I think I got something like an extra 1Mb/sec after removing that wire, but that is only from memory and if I were able to do a memtest check on my own memory it would definitely indicate 'pre-fail' :lol: The increase in speed was significant and instant though, I do remember that.

There are a few things you should know about this tweak, firstly your router doesn't even have to be attached to the master socket for it to make a difference, mine isn't. Secondly it doesn't stop any phones from ringing, anywhere. Thirdly it isn't much use if you don't have an old style BT socket (I think they have improved a bit recently) so not much use trying it outside of Britain.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).

Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 5 guests