EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: profiling an IOC
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sat, 18 Jul 2020 18:41:31 -0700
On 7/18/20 4:56 PM, Mark Rivers wrote:
> Hi Michael,
> 
>  
> 
> Thanks for the tip, that is very nice.  This is perf looking at the ADSimDetector.
> 
>  
> 
>  
> 
> 49.4% is in unknown, which is not too helpful.

This TUI is interactive.  Press '?' for a list of hot keys.
Especially note 'f' to pause/resume sampling so things don't
change while you're moving around.

The leading '+' indicates that you can dig down (press '+').
Note the different between the Children and Self column shows that
all of the time is being spent further down the call tree.

I also forgot that you will want to to pass '--call-graph dwarf'.  eg.

$ perf top -g --call-graph dwarf -p <pid>

>  But it shows where the statistics plugin is spending its time.  It shows a lot of time in the tcp routines, which is because pvAccess  is transmitting 200 images per second, and each image is 1024x1024 Float64, which is 8 MB per image,  for a total of 1600MB/s.

This tracks with what I recall from past investigations.
The places where pixel by pixel iteration are the hot spots.
I'm a little surprised that convertTypeSwitch() isn't at least
equal to the others.


>  
> 
> Mark
> 
>  
> 
> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Michael Davidsaver via Tech-talk
> Sent: Saturday, July 18, 2020 6:18 PM
> To: Siddons, David <siddons at bnl.gov>
> Cc: tech-talk at aps.anl.gov
> Subject: Re: profiling an IOC
> 
>  
> 
> On 7/17/20 1:19 PM, Siddons, David via Tech-talk wrote:
> 
>> I'd like to understand where my IOC code is taking its time, and gprof seems like the right tool for this, is that right? Where would I add the compile flags (-pg)?
> 
>  
> 
> You might also investigate the Linux 'perf' utility.
> 
> It doesn't need any special compiler flags, though it's hard to find much sense without debug symbols.
> 
>  
> 
> I especially like the 'top' mode, which can inspect an already running process.  eg.
> 
>  
> 
> $ perf top -g -p <pid>
> 
>  
> 
>  
> 
> https://perf.wiki.kernel.org/index.php/Main_Page
> 


References:
profiling an IOC Siddons, David via Tech-talk
Re: profiling an IOC Michael Davidsaver via Tech-talk
RE: profiling an IOC Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: profiling an IOC Mark Rivers via Tech-talk
Next: two IOC run as a time Vishnu Patel via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: profiling an IOC Mark Rivers via Tech-talk
Next: archiver viewer plug in with archiver appliance in Linux astrid morreale via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 18 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·