Review rate limiting features for the slow query logging

Registered by Laurynas Biveinis

Superseded by https://blueprints.launchpad.net/percona-server/+spec/rate-limit-to-slow-log

Current the slow query log rate limiting is implemented using a combination of two variables: log_slow_rate_type and log_slow_rate_limit. The interplay of these is very complicated, it is possible to produce some limiting behaviors that are probably unexpected and purely a side effect of implementation warts.

The only thing actually needed is to have query sampling. Apparently this was implemented first, but "did not work as expected" (for all I know could have been a bug...) and then additional complexity with session limiting was piled on the top.

Thus let's revisit this for 5.6 and start with the actual desired thing: --slow-query-log-rate-pct=<numeric>, range 0..100, default 100. Follow-up as necessary until the desired rate limiting is achieved.

Blueprint information

Status:
Complete
Approver:
Vadim Tkachenko
Priority:
Not
Drafter:
Laurynas Biveinis
Direction:
Needs approval
Assignee:
Laurynas Biveinis
Definition:
Superseded
Series goal:
Accepted for 5.6
Implementation:
Started
Milestone target:
None
Started by
Laurynas Biveinis
Completed by
Laurynas Biveinis

Related branches

Sprints

Whiteboard

is 0..100, default 100 - accept only integers or floats also?
intergers may be not enough.

We can make it floats, but I'm a bit wary of possible inexactiness. I.e. if 100.0 would still filter out some queries.

VT: so probably it should be --slow-query-log-rate=0...N
where N means how many queries to skip for logging ?

Laurynas: yes, it makes sense then.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.