← Back to team overview

maria-discuss team mailing list archive

Re: Reason for changing the thread_pool_size default value?

 

Hi, Ian!

On Mar 19, Ian Gilfillan wrote:
> 
> What was the reason for changing the default thread_pool_size from the 
> number of CPU's to 8?
> 
> If I look at the history of sql_vars.cc - 
> https://github.com/MariaDB/server/commits/10.1/sql/sys_vars.cc?page=2 - 
> the commit made on the 17th of November still has it as the number of 
> CPU's, but the next commit on the 2nd of December has it at 8. This 
> doesn't appear as a change in the summary.

It was done by me with the comment "GLOBAL_VALUE_ORIGIN=AUTO" (which was
one in the series of commits implementing SYSTEM_VARIABLES table).

The INFORMATION_SCHEMA.SYSTEM_VARIABLES table has a GLOBAL_VALUE_ORIGIN
column that tell where the global value of the variable comes from.

"DEFAULT" means a compiled-in default, a constant, which is always the
same for a given binary.

Using an expression as a default value for thread_pool_size didn't
really fit that description. All default values must be constants.

So, I've moved this assignment to mysqld.cc - that is, thread_pool_size
still gets the value from the number of CPU's. But by doing it, it sets
the GLOBAL_VALUE_ORIGIN to AUTO (auto-sized), not DEFAULT.

Regards,
Sergei


References