← Back to team overview

maria-developers team mailing list archive

Re: [Commits] f21705d: MDEV-7806 - thread_pool_size is not auto-sized

 

Hi, Sergey!

On Nov 17, Sergey Vojtovich wrote:
> revision-id: f21705dfbfcd87e46937222eb860727beb21a89b (mariadb-10.1.8-66-gf21705d)
> parent(s): c0216f1d02e63686f986fa8f352fdf6de61249a7
> committer: Sergey Vojtovich
> timestamp: 2015-11-17 13:13:47 +0400
> message:
> 
> MDEV-7806 - thread_pool_size is not auto-sized
> 
> thread_pool_size is auto-sized before my_getopt(). But my_getopt starts from
> resetting all options to their default values. So the auto-sized value is lost.
> 
> Fixed by autosizing default value directly.
> 
> diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
> index 682d803..e65a939 100644
> --- a/sql/sys_vars.cc
> +++ b/sql/sys_vars.cc
> @@ -3270,7 +3270,7 @@ static Sys_var_uint Sys_threadpool_size(
>   "This parameter is roughly equivalent to maximum number of concurrently "
>   "executing threads (threads in a waiting state do not count as executing).",
>    GLOBAL_VAR(threadpool_size), CMD_LINE(REQUIRED_ARG),
> -  VALID_RANGE(1, MAX_THREAD_GROUPS), DEFAULT(8), BLOCK_SIZE(1),
> +  VALID_RANGE(1, MAX_THREAD_GROUPS), DEFAULT(my_getncpus()), BLOCK_SIZE(1),
>    NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_threadpool_size),
>    ON_UPDATE(fix_threadpool_size)
>  );

Strange solution. Why wouldn't you move autosizing after
config variables are read?

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


Follow ups