Bug #103206 | Further possible improvements to native cloning | ||
---|---|---|---|
Submitted: | 5 Apr 2021 12:30 | Modified: | 2 Oct 2021 10:37 |
Reporter: | Simon Mudd (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Clone Plugin | Severity: | S3 (Non-critical) |
Version: | 8.0.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | allow from multiple sources, keep trying |
[5 Apr 2021 12:30]
Simon Mudd
[5 Apr 2021 13:14]
MySQL Verification Team
Hello Simon, Thank you for the enhancement request! regards, Umesh
[2 Oct 2021 10:18]
Simon Mudd
Adding some more things to consider: 1. set global clone_enable_compression = 1; DOES NOT appear to work with an existing session. That is the existing connections don't change. * improve documentation to explain when this setting will be used * consider reading the setting for each "request" and if the setting changes drop the connection and reconnect if this is a network setting triggered at connection time only, and then continuing normally. If this does not require reconnecting then make the thread check the setting after each operation and adjust the behaviour appropriately 2. other configuration settings like clone-max-data-bandwidth and clone-max-network-bandwidth also appear to adjust behaviour but the numbers I saw when throttling the copy did not seem to adjust very closely to the selected values, with data_speed and network_speed shown in performance_schema.clone_progress staying above the configured values. Again the reason for this is not clear so improved documentation would be helpful and if necessary check the settings more frequently to allow for more dynamic configuration. 3. Throttling output on the source. I have seen that the source server may get overloaded. Is this is a source of replication (master or intermediate master) the primary concern of an administrator is that "replication" works allowing other downstream replicas to keep up with the changes on the master. There appears to be no way to throttle writes on the source irrespective of what the recipient wants to do. That's not ideal. I can think of a setting which checks replication delay and tries to ensure that the replication delay is below a threshold, throttling back on cloning during this time, or simply the similar settings which appear to be configurable on the recipient to control network or i/o traffic, they should be also be optionally configurable on the source to allow throttling of downstream cloning rates. 4. unexplained variable network traffic speeds I see moments when the FILE COPY phase network and data speeds drop significantly. It's not clear why this is. The variation can change from 400 MB/s to 4 MB/s on 10 Gbe networking. I assume that this may be due to issues on the source but there's no visibility on why the behaviour changes so significantly. 5. clone_progress does not change on the source server. The copy I see there is from the clone that server made from another server. It would be useful perhaps to provide a different table for the source server to show it's view of what is going on. 6. Consider adding source host/port and version to performance_schema.clone_progress. This provides a simple additional bit of information showing where the clone is being made from. Given this table is not modified once the clone operation has completed it provides a record of not only when the clone took place but from which server and can be useful.
[2 Oct 2021 10:37]
Simon Mudd
7. clone_progress has no detailed indication of progress. It would be good to have an extra column COMPLETED_STEPS / JOBS / TASKS etc which indicates a completed step in the process and updates this as needed. If the number of steps is described for each stage then it's a good way to see how progress is completing. That can be inferred from the estimate / data/ network (at least in the FILE COPY stage but that sort of assumes all files are the same which is clearly not the case.