Skip to content

Instantly share code, notes, and snippets.

@yudai09
Created September 8, 2016 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yudai09/578df16ff695d840fb0a5c9a6be86969 to your computer and use it in GitHub Desktop.
Save yudai09/578df16ff695d840fb0a5c9a6be86969 to your computer and use it in GitHub Desktop.
THREADS=300
ULIMITS=4096
DOMAIN=your.domain
function dig(){
for i in $(seq $THREADS); do
dig @localhost $DOMAIN &
done
wait
echo 'done'
}
echo "THREADS=$THREADS, ULIMITS=$ULIMITS"
ulimit -u $ULIMITS
time dig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment