Skip to content

Instantly share code, notes, and snippets.

@berstend
Created August 19, 2013 13:54
Show Gist options
  • Save berstend/6269381 to your computer and use it in GitHub Desktop.
Save berstend/6269381 to your computer and use it in GitHub Desktop.
Basic Ubuntu performance tuning
kernel.pid_max = 1000000
#portrange for outgoing connections
#(increase the ephemeral port range)
net.ipv4.ip_local_port_range=1024 65535
# Fixing 'Too many open files', Second useful on nginx+aio workloads
fs.file-max=3262291
fs.aio-max-nr=65536
# Increased backlog (default: 100/1000 depending on kernel)
net.core.netdev_max_backlog=10000
net.core.somaxconn=10000
# Decrease the time default value for tcp_fin_timeout connection
# net.ipv4.tcp_fin_timeout=15
net.ipv4.tcp_orphan_retries = 1
net.ipv4.tcp_fin_timeout = 25
net.ipv4.tcp_max_orphans = 8192
# Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time=1800
# Netfilter's conntrack
net.ipv4.netfilter.ip_conntrack_max=1048576
net.nf_conntrack_max=1048576
# General 10gigabit/LFP tuning
net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 65536 16777216
net.core.wmem_default = 65536
net.core.rmem_default = 65536
#net.ipv4.tcp_orphan_retries=2
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_mem = 50576 64768 98152
# Minimize TIME_WAIT sockets
net.ipv4.tcp_tw_reuse = 1
# TESTING
# http://urbanairship.com/blog/2010/09/29/linux-kernel-tuning-for-c500k/
net.ipv4.tcp_rmem=4096 4096 16777216
net.ipv4.tcp_wmem=4096 4096 16777216
fs.file-max = 999999
# http://johanlouwers.blogspot.de/2010/02/aio-max-nr-parameter-for-oracle.html
fs.aio-max-nr = 1048576
# http://stackoverflow.com/questions/12022815/node-js-struggling-with-lots-of-concurrent-connections
#net.ipv4.tcp_max_orphans = 20000
#net.ipv4.tcp_max_syn_backlog = 10000
#net.core.somaxconn = 10000
#net.core.netdev_max_backlog = 10000
# FIX IPv6 prefix with wrong length errors
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
@Axilarry
Copy link

Axilarry commented May 9, 2014

Man I need this. I have over 2000 invitations I never sent that I need to revoke. Your code almost worked. Here are the two relevant error messages. Somehow, I pray, you are still on the scene. If so, could you please let me know if there's a way to beat these? Thanks!

XMLHttpRequest cannot load http://www.linkedin.com/inbox/mailbox/message/get?itemId=S872065406_9&goback=%2Esiv_*1_0_*1_*1_*1_*1_*1_*1_*1&trk=COMM_NI. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.linkedin.com' is therefore not allowed access.

Denying load of chrome-extension://ganlifbpkcplnldliibcbegplfmcfigp/scripts/vendor/jquery/jquery.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment