Re:Dynimize: Speed Up MySQL with CPU Performance Virtualization
by davidyeager on Wednesday May 09, 2018 @03:25AM
(#17027995)
This does not rewrite your database. It optimizes the live in-memory machine code of the mysqld (MySQL Server) process. It must run on the same OS host as the mysqld (MySQL Server) process being optimized. So if you are using this on the master and not on the replica, the replica won’t be touched. Hope that makes sense.
Re:Dynimize: Speed Up MySQL with CPU Performance Virtualization
by grogers on Wednesday May 09, 2018 @07:20AM
(#17028964)
I think the point was that profile guided optimization relies on the workload staying relatively fixed. If the workload suddenly changes (like promoting a readonly slave to be the writable master) the assumptions made by PGO may not be valid, and performance could be worse than if no modifications were made in the first place.
I think you'd just have to measure scenarios before using it in production.
Re:Dynimize: Speed Up MySQL with CPU Performance Virtualization
by davidyeager on Wednesday May 09, 2018 @09:55AM
(#17029810)
Dynimizer can react to drastic changes in workload and reoptimize depending on how you configure it.
Re:Dynimize: Speed Up MySQL with CPU Performance Virtualization
by martin_ on Wednesday May 09, 2018 @02:11PM
(#17032279)
grogers explained my intent well, especially around the promotion of a replica to a primary work load (thank you). I think we're arguing semantics between optimizing machine code and rewriting mysqld. I want to emphasize that Dynamizer looks super awesome, and I do intend to try it, so no offense was intended. Well done!
Re:Dynimize: Speed Up MySQL with CPU Performance Virtualization
by davidyeager on Wednesday May 09, 2018 @03:51PM
(#17033340)
Thanks! Sorry for terse tone... just responding quickly from a smartphone while travelling :-) Your concerns are definitely valid and we are working on improving the situation.
Dynimizer can detect a drastic workload change as you described and reoptimize in response. That’s the default operation which can be turned off. What has been observed is that if we optimized for say a write-heavy workload and then change it to read-only without reoptimizing (or vice versa), it will still show an improvement, just not as much. Hope that makes sense.
Re:Dynimize: Speed Up MySQL with CPU Performance Virtualization
by davidyeager on Wednesday May 09, 2018 @10:06AM
(#17029907)
For a future update we will be optionally caching optimizations to forgo the optimizations/warmup period. You can then move those cached optimizations from test to production to reduce uncertainty. Coming soon. Many advantages there over PGO which is very difficult to use.
Beyond actual errors being produced, I'm wondering what'd happen in weird scenarios such as one where by primary gets heavily optimized for its write load and creeps up to, say, 80% CPU or so at peak.. What then happens then if my replica which has been heavily optimized for its read load gets promoted in a failure scenario and gets pegged at high CPU?
Final thought here is if this tech really is solid, when is AWS going to start shipping it with my VM?