[tarantool-patches] Re: [PATCH v2 02/11] vinyl: factor load regulator out of quota

Vladimir Davydov vdavydov.dev at gmail.com
Sat Sep 29 14:36:28 MSK 2018


On Sat, Sep 29, 2018 at 08:00:46AM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [18/09/28 21:00]:
> > Turned out that throttling isn't going to be as simple as maintaining
> > the write rate below the estimated dump bandwidth, because we also need
> > to take into account whether compaction keeps up with dumps. Tracking
> > compaction progress isn't a trivial task and mixing it in a module
> > responsible for resource limiting, which vy_quota is, doesn't seem to be
> > a good idea. Let's factor out the related code into a separate module
> > and call it vy_regulator. Currently, the new module only keeps track of
> > the write rate and the dump bandwidth and sets the memory watermark
> > accordingly, but soon we will extend it to configure throttling as well.
> > 
> > Since write rate and dump bandwidth are now a part of the regulator
> > subsystem, this patch renames 'quota' entry of box.stat.vinyl() to
> > 'regulator'. It also removes 'quota.usage' and 'quota.limit' altogether,
> > because memory usage is reported under 'memory.level0' while the limit
> > can be read from box.cfg.vinyl_memory, and renames 'use_rate' to
> > 'write_rate', because the latter seems to be a more appropriate name.
> > 
> > Needed for #1862
> 
> It's all good except the name. The name is a bit more academic,
> generic and long than we both prefer.

Not longer, more generic or academic than 'scheduler'. Moreover, the two
names match perfectly IMO.

Why would you say it's academic BTW? 'Regulator' is a common engineering
term.

> Other names to consider:
> vy_pressure_valve, vy_back_pressure, or simply vy_valve, vy_load_valve,
> vy_load_control, vy_rate_control, vy_bandwidth, (I think if we add
> more names to the table we will be able to find a good one).

vy_valve - interesting, but I've never heard the term 'valve' used for
anything but air/fluid pressure control. Besides, vy_valve_no_memory
(the event triggered when quota hits the limit) sounds ridiculous.
Anyway, the term 'regulator' is sometimes used instead of 'valve' while
at the same time it may also denote other things that are supposed to
control something (there are things called 'linear voltage regulator'
and 'current regulator').

vy_load_valve, vy_pressure_valve - ditto plus too long.

vy_back_pressure - it's not pressure, actually, it's an object with
complex logic, one of tasks of which is to exert pressure.

vy_bandwidth - bandwidth->dump_bandwidth, oh my...

vy_rate_control, vy_load_control - these two are more or less acceptable
by me, but too long - I'd prefer a one-word name, because it's easier to
name a variable without causing confusing then (think of possible var
names: ctl, lctl, ldctl, load_control sound either weird or are just too
long). vy_control or vy_controller may be? But 'controller' is primarily
associated with game consoles nowadays, while 'control' reminds me of a
remote control I use to switch channels.

I also considered 'monitor', but since this thing not just monitors the
load, but also shapes it, I ruled it out.

That said, I'm all for vy_regulator, and I don't share your concern.
I suggest you take a look at what Google gives you when you search for
valve, regulator, controller pictures:

Valve:
https://www.google.ru/search?newwindow=1&biw=1366&bih=671&tbm=isch&sa=1&ei=dWGvW_2hKsilsAHqlYqQCA&q=valve&oq=valve&gs_l=img.3...0.0.0.67630.0.0.0.0.0.0.0.0..0.0....0...1c..64.img..0.0.0....0.3Zf0u1mmIk0

Controller:
https://www.google.ru/search?newwindow=1&biw=1366&bih=671&tbm=isch&sa=1&ei=zGGvW-rzN8mYsAHDvIXQAQ&q=controller&oq=controller&gs_l=img.3...0.0.0.2506.0.0.0.0.0.0.0.0..0.0....0...1c..64.img..0.0.0....0.MN_IjxK65_E

Control:
https://www.google.ru/search?newwindow=1&biw=1366&bih=671&tbm=isch&sa=1&ei=2WGvW8nsC8bVsAHv35OwBA&q=control&oq=control&gs_l=img.3...5597.6148.0.6310.0.0.0.0.0.0.0.0..0.0....0...1c.1.64.img..0.0.0....0.lmYqRhCCRmo

Regulator:
https://www.google.ru/search?newwindow=1&biw=1366&bih=671&tbm=isch&sa=1&ei=4GGvW6q9FMaisAHbx7CQAw&q=regulator&oq=regulator&gs_l=img.3...31737.32507.0.32629.0.0.0.0.0.0.0.0..0.0....0...1c.1.64.img..0.0.0....0.kgus6kvKzJc

'Regulator' looks exactly like what we want to implement to me :-)



More information about the Tarantool-patches mailing list