-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up scoring #67
Comments
From the other issue:
|
Running this on a machine with an SSD would likely fix many of these problems. |
https://github.com/UMDLARS/dtanm/wiki/Hardware-Notes adds some notes on performance. This should be expanded with better quantitative detail. |
The most recent competition, of a larger size (>20 teams), went much better. SSDs somewhat improved run time and allowed us to do several in parallel for a >5x speedup. I guess it looks like simply using a faster machine can (mostly) solve this! |
Yeah, we should have more benchmarks. Results:
Generated using: #!/bin/sh
CURL() {
curl -H 'Cookie: session=<session_cookie>' $@
}
echo === INITIAL STATS ===
CURL localhost:5000/stats.json
echo =====================
for num_workers in 1 2 3 4 6 8 12 16 24 32; do
# clear results
docker exec -it dtanm_db_1 psql --dbname postgres --username=postgres -c "DELETE FROM result;"
# scale workers
docker-compose up -d --scale worker=$num_workers
# re-run all tests
CURL localhost:5000/admin/rescore_all -s >/dev/null
start_date_human=$(date)
start_date_unix=$(date +%s)
# wait for scoring to be done
queue_depth=$(CURL localhost:5000/stats.json -s | jq '.["Tasks in scoring queue"]')
while [ $queue_depth -ne 0 ] && sleep 1; do
/bin/echo -ne "\e[0K\r$queue_depth remaining"
queue_depth=$(CURL localhost:5000/stats.json -s | jq '.["Tasks in scoring queue"]')
done
cat <<EOF
========================
RESULTS FOR $num_workers WORKERS
Started at $start_date_human
Finished at $(date)
Elapsed: $(expr $(date +%s) - $start_date_unix) seconds
========================
$(CURL localhost:5000/stats.json -s | jq .)
========================
EOF
docker image prune -f
docker container prune -f
done |
@pahp @ATR2600 @jnowaczek Benchmarks finished! https://github.com/UMDLARS/dtanm/wiki/Hardware-Notes Looks like last year's hardware was indeed pretty bad at parallelization--- 1->2 cores was an improvement, but improvements were relatively slight after that, with increased time per run offsetting benefits of parallel execution. Is there any more data you want? Otherwise, I'm ready to close this. |
With ~35 players and 9 teams, grading escalated to roughly 10 minutes with a queue of upwards of 200 tasks, and this was without anyone spamming the attacks list. We need to do something to speed up scoring. (And, how could we handle the case where someone is maliciously spamming the attacks?)
The text was updated successfully, but these errors were encountered: