Last active
December 29, 2015 00:39
-
-
Save lxe/7587895 to your computer and use it in GitHub Desktop.
ludicrousspeed.sh
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 | |
# Some tweaks to OSX tcp/fd setting | |
# to ease load testing | |
# | |
# Disclaimer: I have no idea what i'm doing | |
# | |
# Descrease port hold time | |
sysctl -w net.inet.tcp.msl=1000 | |
# Increase number of available ports | |
sysctl -w net.inet.ip.portrange.first=32768 | |
# Increase socket connection limit | |
sysctl -w kern.ipc.somaxconn=1048576 | |
# Increase file descriptor limit | |
launchctl limit maxfiles 2048 1048576 | |
sysctl -w kern.maxfilesperproc=1048576 | |
# This doesn't persist, but here it is anyways: | |
ulimit -S -n 1048576 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment