jobclient: initial number of jobs configurable

The new CLIENT_JOB_INITIAL configuration option allows to configure
the client to request more than one job in the first request round.
If a reasonable initial value is chosen, this removes the job ramp-up
after each fail-client restart, and slightly improves overall
throughput.

Change-Id: Idac2721264ec264c520d341fac64a8311a974708
This commit is contained in:
Horst Schirmeier
2014-01-20 21:09:39 +01:00
parent 2c31bf79b0
commit 5ffcb82138
3 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,7 @@ SET(CLIENT_RAND_BACKOFF_TSTART "3" CACHE STRING "Lower limit of client
SET(CLIENT_RAND_BACKOFF_TEND "8" CACHE STRING "Upper limit of client's backoff phase in seconds")
SET(CLIENT_RETRY_COUNT "3" CACHE STRING "Client's number of reconnect retries")
SET(CLIENT_JOB_REQUEST_SEC "30" CACHE STRING "Time in seconds a client tries to get work for (to reduce client/server communication frequency)")
SET(CLIENT_JOB_INITIAL "1" CACHE STRING "Initial amount of jobs to request")
SET(CLIENT_JOB_LIMIT "1000" CACHE STRING "How many jobs can a client ask for")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FailConfig.hpp.in

View File

@ -43,6 +43,7 @@
#define CLIENT_RETRY_COUNT @CLIENT_RETRY_COUNT@
#define CLIENT_JOB_REQUEST_SEC @CLIENT_JOB_REQUEST_SEC@
#define CLIENT_JOB_LIMIT @CLIENT_JOB_LIMIT@
#define CLIENT_JOB_INITIAL @CLIENT_JOB_INITIAL@
#define PROJECT_VERSION "@PROJECT_VERSION@"
#define FAIL_VERSION PROJECT_VERSION

View File

@ -21,7 +21,7 @@ JobClient::JobClient(const std::string& server, int port)
m_server_runid = 0; // server accepts this for virgin clients
m_job_total = 0;
m_job_runtime_total = 0;
m_job_throughput = 1; // client gets only one job at the first request
m_job_throughput = CLIENT_JOB_INITIAL; // will be corrected after measurement
m_connect_failed = false;
}