This file contains 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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"runtime" | |
"runtime/debug" | |
"runtime/pprof" | |
"strconv" |
This file contains 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/url" | |
"os" | |
"path/filepath" |
This file contains 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
package main | |
import ( | |
"log" | |
"net" | |
"net/http" | |
"time" | |
) | |
var port = ":8080" |
This file contains 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 | |
# ab+ | |
# | |
# os and network tuning | |
# ulimit -n 100000 | |
# sudo echo "2048 64512" > /proc/sys/net/ipv4/ip_local_port_range | |
# sudo echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle | |
# sudo echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse | |
# sudo echo "10" > /proc/sys/net/ipv4/tcp_fin_timeout | |
# sudo echo "65535" > /proc/sys/net/core/somaxconn |