mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2024-12-29 14:11:44 +00:00
cal cpu core number
This commit is contained in:
parent
69bb2ae79b
commit
031b0b617b
@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
chown compiler:compiler /spj
|
||||
echo 0 > /tmp/counter
|
||||
gunicorn --workers 4 --threads 4 --error-logfile /log/gunicorn.log --bind 0.0.0.0:8080 server:wsgiapp
|
||||
core=$(grep --count ^processor /proc/cpuinfo)
|
||||
n=$(($core*4))
|
||||
gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp
|
Loading…
Reference in New Issue
Block a user