← Back to team overview

maria-developers team mailing list archive

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

 

Hi Sergei,

On Tue, Nov 17, 2015 at 03:22:23PM +0100, Sergei Golubchik wrote:
> Hi, Sergey!
> 
> On Nov 17, Sergey Vojtovich wrote:
> > On Tue, Nov 17, 2015 at 02:23:56PM +0100, Sergei Golubchik wrote:
> > > 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.
> > > 
> > > Strange solution. Why wouldn't you move autosizing after
> > > config variables are read?
> >
> > Well, it's not a precedent: we already have similar solution for
> > tc_log_size.
> > 
> > Wouldn't autosizing after config variables are read overwrite
> > configured value?  If so, we'll have to create special value for
> > thread_pool_size, e.g. if value is 0 then do autosizing, preserve
> > original value otherwise.
> 
> I think the preferred way is the one for tdc_size:
> 
>   ... read the options ...
>   if (IS_SYSVAR_AUTOSIZE(&tdc_size))
>     SYSVAR_AUTOSIZE(tdc_size, MY_MIN(400 + tdc_size / 2, 2000));
> 
> if you'd like you can fix tc_log_size too :)
Oh, you're right. I still have pre-origin image of sys_vars in my mind. Though I
wonder what's the role of default value for autosized vars now?

Thanks,
Sergey


Follow ups

References