Using the Trace Feature in DBLE for Performance Analysis
This article demonstrates how to enable DBLE's trace function, view detailed execution timing with `show trace`, and analyze performance bottlenecks across client, middleware, and MySQL layers, including a real‑world case study and optimization tips.
This section shows a video demonstration of DBLE's trace functionality.
Enabling trace
Log into a traffic port and execute set trace=1 to turn on tracing.
Benefits of trace
Running a query such as select * from some_table (similar to MySQL's show profile ) allows you to see the time spent in each execution stage by issuing show trace . The output lists start/end times, each phase (SQL parsing, routing, preparation, dispatch, result collection, write‑back to client), and resembles an explain output.
When multiple nodes are involved, show trace displays concurrent dispatch times and individual result‑set retrieval times, helping you pinpoint where latency occurs.
By analyzing the trace result set, you can identify slow stages, such as excessive time in DBLE or MySQL, and thus locate performance bottlenecks.
Case analysis
A real case involved three nodes where one MySQL instance was slower; after tuning its configuration to match the others, the overall performance improved, illustrating the "bottleneck bucket" principle.
Trace also reveals if DBLE's internal thread pool is undersized; adjusting thread counts can improve local consumption capacity.
Images illustrating the trace timeline and sequence diagram are included in the original material.
For further learning, the DBLE source code and documentation are available at the provided GitHub links, and course inquiries can be made via the ActiontechOSS community channels.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.