You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Igor Galić <i....@brainsware.org> on 2013/04/03 09:37:18 UTC
Re: [11/15] git commit: TS-1067 Add a new config option,
proxy.config.ssl.number.threads, and code
----- Original Message -----
> TS-1067 Add a new config option, proxy.config.ssl.number.threads, and
> code
>
commit message "proxy.config.ssl.number.threads"
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfc78c73/mgmt/RecordsConfig.cc
> ----------------------------------------------------------------------
> diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
> index 6926a40..bf9e56a 100644
> --- a/mgmt/RecordsConfig.cc
> +++ b/mgmt/RecordsConfig.cc
> @@ -281,6 +281,8 @@ RecordElement RecordsConfig[] = {
> ,
> {RECT_CONFIG, "proxy.config.udp.send_retries", RECD_INT, "0",
> RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
> ,
> + {RECT_CONFIG, "proxy.config.udp.threads", RECD_INT, "0",
> RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL}
> + ,
Code in RecordsConfig.cc: proxy.config.udp.threads
>
> //##############################################################################
> //#
>
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfc78c73/proxy/Main.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/Main.cc b/proxy/Main.cc
> index addbeeb..05c3bc4 100644
> --- a/proxy/Main.cc
> +++ b/proxy/Main.cc
> @@ -97,11 +97,6 @@ extern "C" int plock(int);
> //
> // Global Data
> //
> -#define DEFAULT_NUMBER_OF_THREADS ink_number_of_processors()
> -#define DEFAULT_NUMBER_OF_UDP_THREADS 1
> -#define DEFAULT_NUMBER_OF_SSL_THREADS 0
> -#define DEFAULT_NUM_ACCEPT_THREADS 0
> -#define DEFAULT_NUM_TASK_THREADS 0
> #define DEFAULT_HTTP_ACCEPT_PORT_NUMBER 0
> #define DEFAULT_COMMAND_FLAG 0
> #define DEFAULT_LOCK_PROCESS 0
> @@ -123,11 +118,13 @@ static void *
> mgmt_restart_shutdown_callback(void *, char *, int data_len);
> static int version_flag = DEFAULT_VERSION_FLAG;
>
> static int const number_of_processors = ink_number_of_processors();
> -static int num_of_net_threads = DEFAULT_NUMBER_OF_THREADS;
> +static int num_of_net_threads = number_of_processors;
> +static int num_of_udp_threads = 0;
> +static int num_accept_threads = 0;
> +static int num_task_threads = 0;
> +
> extern int num_of_cluster_threads;
> -static int num_of_udp_threads = DEFAULT_NUMBER_OF_UDP_THREADS;
> -static int num_accept_threads = DEFAULT_NUM_ACCEPT_THREADS;
> -static int num_task_threads = DEFAULT_NUM_TASK_THREADS;
> +
> #if TS_HAS_TESTS
> static int run_test_hook = 0;
> #endif
> @@ -1639,7 +1636,13 @@ main(int argc, char **argv)
> HttpProxyPort::loadDefaultIfEmpty();
>
> cacheProcessor.start();
> - udpNet.start(num_of_udp_threads);
> +
> + // UDP net-threads are turned off by default.
> + if (!num_of_udp_threads)
> + TS_ReadConfigInteger(num_of_udp_threads,
> "proxy.config.ssl.number.threads");
> + if (num_of_udp_threads)
> + udpNet.start(num_of_udp_threads);
> +
> sslNetProcessor.start(getNumSSLThreads());
Code in Main.cc: proxy.config.ssl.number.threads
> #ifndef INK_NO_LOG
colour me confused.
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
Re: [11/15] git commit: TS-1067 Add a new config option, proxy.config.ssl.number.threads,
and code
Posted by Leif Hedstrom <zw...@apache.org>.
On 4/3/13 1:37 AM, Igor Galić wrote:
>
> ----- Original Message -----
>> TS-1067 Add a new config option, proxy.config.ssl.number.threads, and
>> + // UDP net-threads are turned off by default.
>> + if (!num_of_udp_threads)
>> + TS_ReadConfigInteger(num_of_udp_threads,
>> "proxy.config.ssl.number.threads");
>> + if (num_of_udp_threads)
>> + udpNet.start(num_of_udp_threads);
>> +
>> sslNetProcessor.start(getNumSSLThreads());
> Code in Main.cc: proxy.config.ssl.number.threads
>
yeah, it's a bad commit message, and bad code :). I'll fix.
Thanks!
-- Leif