Skip to content

Instantly share code, notes, and snippets.

@dizda
Forked from carlos8f/gist:3473107
Created July 6, 2020 07:26
Show Gist options
  • Save dizda/a6b7bb4a2ff56fc40663cdc9e90553fa to your computer and use it in GitHub Desktop.
Save dizda/a6b7bb4a2ff56fc40663cdc9e90553fa to your computer and use it in GitHub Desktop.
siege Mac OS X caveats
Mac OS X has only 16K ports available that won't be released until socket
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds.
Consider reducing in case of available port bottleneck.
You can check whether this is a problem with netstat:
# sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
# sudo sysctl -w net.inet.tcp.msl=100
net.inet.tcp.msl: 15000 -> 100
@dizda
Copy link
Author

dizda commented Jul 6, 2020

To check the current number of TIME_WAIT for a specific port (5000): netstat -an|grep 5000|grep TIME_WAIT |wc -l

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