Created
September 26, 2014 14:17
-
-
Save billyriantono/657dad656248d774259d to your computer and use it in GitHub Desktop.
Optimize Server for Node.JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Apply Optimize for Sysctl v 0.10 | |
# by Billy Riantono - billy[ at ]riantono.com | |
#get optimalization config for sysctl | |
wget https://gist.githubusercontent.com/kotekalabs/657dad656248d774259d/raw/5619fbbcbde469e8645564629966ea223e3722b4/optimize-sysctl.conf | |
#applied the config to sysctl.conf | |
cat optimize-sysctl.conf >> /etc/sysctl.conf | |
#applied the new sysctl.conf | |
sysctl -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net.core.rmem_max = 33554432 | |
net.core.wmem_max = 33554432 | |
net.ipv4.tcp_rmem = 4096 16384 33554432 | |
net.ipv4.tcp_wmem = 4096 16384 33554432 | |
net.ipv4.tcp_mem = 786432 1048576 26777216 | |
net.ipv4.tcp_max_tw_buckets = 360000 | |
net.core.netdev_max_backlog = 2500 | |
vm.min_free_kbytes = 65536 | |
vm.swappiness = 0 | |
net.ipv4.ip_local_port_range = 1024 65535 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment