facebookresearch / DCPerf

DCPerf benchmark suite for hyperscale cloud applications
MIT License
116 stars 5 forks source link

Misleading default values on help message for packages/mediawiki/run.sh script #44

Closed vrescami closed 2 months ago

vrescami commented 5 months ago

The run.sh help message shows that the default value for server threads is floor(2.8 * logical cpus / number of HHVM servers) and the default value for siege client threads is 200 or 150 * number of HHVM:

    -t          number of server threads for each HHVM. Default: floor(2.8 * logical cpus / number of HHVM servers) (=${SERVER_THREADS})
    -c          number of siege client threads. Default: 200 or 150 * number of HHVM, whichever is higher (=${CLIENT_THREADS})

However, in the code we can see that's not quite right. Server threads is the one that will be set to the max between 200 or the 2.8 factor, while client threads is just set to 150 * number of HHVM servers:

SERVER_THREADS=$(echo "${BC_MAX_FN}; max(200, (2.8 * $(nproc)) / ${HHVM_SERVERS})" | bc)  # Divides by integer 1 to truncate decimal
CLIENT_THREADS=$(( 150 * HHVM_SERVERS ))

I'd like to know which one is the recommended default configuration for this workload.