List:Internals« Previous MessageNext Message »
From:MARK CALLAGHAN Date:June 4 2009 3:01am
Subject:Re: Profiling a storage engine
View as plain text  
On Wed, Jun 3, 2009 at 7:17 PM, Slava Akhmechet <coffeemug@stripped> wrote:
> Hi,
>
> 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
> numbers.
>
> We'd appreciate if anyone could share their experience on how to
> effectively profile a storage engine.

I have never had any luck using gprof on multi-threaded servers. If
you use Linux, then oProfile works great for flat profiles and Google
perftools works great for hierarchical profiles. But to use perftools,
you need to make some changes to the server.

This blog post references code that has the changes. The key change is
to call a perftools function when a thread is created --
http://mysqlha.blogspot.com/2009/03/more-on-using-google-perftools-with.html

-- 
Mark Callaghan
mdcallag@stripped
Thread
Profiling a storage engineSlava Akhmechet4 Jun
  • Re: Profiling a storage engineMARK CALLAGHAN4 Jun
    • Re: Profiling a storage engineSlava Akhmechet5 Jun
      • Re: Profiling a storage engineMARK CALLAGHAN5 Jun
    • Re: Profiling a storage engineMichael Widenius5 Jun
      • Re: Profiling a storage engineMARK CALLAGHAN5 Jun
        • Re: Profiling a storage engineMichael Widenius5 Jun
  • Re: Profiling a storage engineAntony Dovgal5 Jun
  • Re: Profiling a storage engineMarc Alff5 Jun
    • Re: Profiling a storage engineSlava Akhmechet8 Jun