Comments on: New features I’d like to see in MySQL 5.8 https://shlomi-noach.github.io/blog/mysql/new-features-id-like-to-see-in-mysql-5-8 Blog by Shlomi Noach Thu, 08 Oct 2015 07:45:00 +0000 hourly 1 https://wordpress.org/?v=5.3.3 By: New statements I’d like to see in MySQL 5.8 | code.openark.org https://shlomi-noach.github.io/blog/mysql/new-features-id-like-to-see-in-mysql-5-8/comment-page-1#comment-328932 Thu, 08 Oct 2015 07:45:00 +0000 https://shlomi-noach.github.io/blog/?p=7417#comment-328932 […] New features I'd like to see in MySQL 5.8 […]

]]>
By: Mark Callaghan https://shlomi-noach.github.io/blog/mysql/new-features-id-like-to-see-in-mysql-5-8/comment-page-1#comment-328875 Wed, 07 Oct 2015 15:40:20 +0000 https://shlomi-noach.github.io/blog/?p=7417#comment-328875 Throttling IO read rates for such operations is interesting and feasible. In the past we had problems from create index using buffered IO and generating too many dirty pages. Linux can cause problems with IO read stalls when there is as little as 1G of dirty pages to write back. Domas might remember how we solved that.

]]>
By: shlomi https://shlomi-noach.github.io/blog/mysql/new-features-id-like-to-see-in-mysql-5-8/comment-page-1#comment-328874 Wed, 07 Oct 2015 15:37:21 +0000 https://shlomi-noach.github.io/blog/?p=7417#comment-328874 Mark,
Re: “nice”, I would throttle an operation based on disk I/O utilization or number of processes waiting on CPU. Under the assumption that your machine is (most of the time) not completely busy, this should give IMHO good behavior.

Niceness would be interesting for multi-minute running queries, such as bulk loads or ALTERs; for seconds-scale queries the problem is not so interesting (or interesting in another way).
Therefore one can re-caliber niceness on a second-granularity basis, e.g. every 1 sec. Perhaps for a second or two an operation would be intense, but would afterwards throttle/reduce-priority for the duration of a couple more seconds. Morgan suggests implementation might use tickets-like mechanism; I need to read more about it.

For system that run full power all the time, perhaps the correct solution is to pre-allocate resources; like max IOps.
I personally prefer state-based throttling and not configuration-based throttling, but I guess different workloads would do better with either.

If niceness is set per connection or per query, it might then be possible to ‘CANCEL NICENESS FOR QUERY 12345’ or similar. If niceness is as I suggested above, revisited every 1sec or whatever, then change to niceness would apply in reasonable time and you would feel safer having this escape route.

]]>
By: Mark Callaghan https://shlomi-noach.github.io/blog/mysql/new-features-id-like-to-see-in-mysql-5-8/comment-page-1#comment-328870 Wed, 07 Oct 2015 14:35:06 +0000 https://shlomi-noach.github.io/blog/?p=7417#comment-328870 My vague memory is that many years ago when we did GTID in the Google patch that online change from master to slave and back again was added for to support online changing of role.

Using “nice” to slow some queries is an interesting problem. Some queries that run too slow can be less than nice. A long open snapshot blocks purge in InnoDB and causes undo to grow. A long running UPDATE statement might hold row locks longer than desired. Can you be more specific about how you will use this feature?

]]>
By: Morgan Tocker https://shlomi-noach.github.io/blog/mysql/new-features-id-like-to-see-in-mysql-5-8/comment-page-1#comment-328863 Wed, 07 Oct 2015 12:33:45 +0000 https://shlomi-noach.github.io/blog/?p=7417#comment-328863 Thank you Shlomi! Suggestions noted.

]]>