From 5ffcb8213884cd7513ad8c4045f08fba8191d9d8 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Mon, 20 Jan 2014 21:09:39 +0100 Subject: [PATCH] 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 --- src/core/config/CMakeLists.txt | 1 + src/core/config/FailConfig.hpp.in | 1 + src/core/efw/JobClient.cc | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/config/CMakeLists.txt b/src/core/config/CMakeLists.txt index daf9a791..dc30d259 100644 --- a/src/core/config/CMakeLists.txt +++ b/src/core/config/CMakeLists.txt @@ -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 diff --git a/src/core/config/FailConfig.hpp.in b/src/core/config/FailConfig.hpp.in index 78fbe3c3..ab64f6cc 100644 --- a/src/core/config/FailConfig.hpp.in +++ b/src/core/config/FailConfig.hpp.in @@ -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 diff --git a/src/core/efw/JobClient.cc b/src/core/efw/JobClient.cc index 01f673f2..e4a2c6c1 100644 --- a/src/core/efw/JobClient.cc +++ b/src/core/efw/JobClient.cc @@ -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; }