Skip to content

Instantly share code, notes, and snippets.

@alex2006hw
Created July 19, 2017 01:09
Show Gist options
  • Save alex2006hw/01436e75e0a418c376fb817e86586b1b to your computer and use it in GitHub Desktop.
Save alex2006hw/01436e75e0a418c376fb817e86586b1b to your computer and use it in GitHub Desktop.
micro-f1-small-linux-server-start-up-script
sysctl net.ipv4.ip_local_port_range="15000 61000"
sysctl net.ipv4.tcp_fin_timeout=30
sysctl net.ipv4.tcp_tw_recycle=1
sysctl net.ipv4.tcp_tw_reuse=1
sysctl net.core.somaxconn=1024
ifconfig eth0 txqueuelen 5000
sysctl net.core.netdev_max_backlog=2000
sysctl net.ipv4.tcp_max_syn_backlog=2048
( [ ! -f /swapfile ] && ( /bin/dd if=/dev/zero of=/swapfile bs=10k count=10k;mkswap /swapfile;swapon /swapfile) ) &
@alex2006hw
Copy link
Author

to install

curl -o-  https://gist.githubusercontent.com/alex2006hw/01436e75e0a418c376fb817e86586b1b/raw/84bc5d09e69b6f0e08718529d2c9f78c2e26c480/linux-start | bash

@alex-alex2006hw
Copy link

to use local scratchdisk as spare disk on GCP

curl -o- https://raw.githubusercontent.com/users-alex/linux/master/bin/setupSpareDisk | bash

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