Slava Akhmechet wrote:
> We're at a point where we need to understand performance bottlenecks
> of our storage engine and we're not sure how to proceed. What is the
> best way to do profiling? We are running benchmarks that compare our
> performance, cpu utilization, and IO throughput to MyISAM. We're also
> using procsystime to give us a picture of how much time we spend on
> various system calls. However, we're not sure how to best make sense
> of the numbers. We'd like to run gprof, but we're not sure how to
> compile MySQL to support it, and whether it will give realistic
> We'd appreciate if anyone could share their experience on how to
> effectively profile a storage engine.
It will depend on your version and your platform.
Since you use procsystime, I suppose you might be
on a platform where you can take advantage of the
DTrace hooking that's in MySQL 5.4. That's worth a
look because it's performance-oriented and will be main.
For anything that might run on Linux or Windows,
or requires monitoring with lower overhead than DTrace,
I expect that the future lies with Performance Schema.
I will be happy to answer questions about using this.
The rest of this email is simply a bunch of
pointers to publicly available blogs, source code,
Blog postings in order of appearance:
Source code of server including Performance Schema:
WL#2360: Performance Schema
WL#2515: Performance statements
WL#3249: SHOW PROCESSLIST should show memory
WL#4674: PERFORMANCE_SCHEMA Setup For Actors
WL#4678: PERFORMANCE_SCHEMA Instrumenting File IO
WL#4813 PERFORMANCE_SCHEMA Instrumenting Stages
WL#4816: PERFORMANCE_SCHEMA Summaries
WL#4895: PERFORMANCE_SCHEMA Instrumenting Table IO
WL#4878: PERFORMANCE_SCHEMA Trace
WL#4896: PERFORMANCE_SCHEMA Instrumenting Net IO
WL#2333: SHOW ENGINE ... LOCK STATUS