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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: How to profile an EPICS application on Linux
From: Mark Rivers <[email protected]>
To: "'J. Lewis Muir'" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 10 Sep 2012 22:21:03 +0000
Here is the output of "time" when running it in a mode where "top" showed the application using about 95% of a single CPU (on a 16 core system).  This is with my calculations enabled.

23.547u 16.516s 0:52.39 76.4%   0+0k 0+24io 0pf+0w

This is the output of time when the calculations are disabled and top shows about 80% CPU in my application.

Disabling my calculations:
11.401u 8.008s 0:27.60 70.2%    0+0k 0+8io 0pf+0w

So it spends a substantial amount of CPU time in both User Mode and Kernel Mode.

Mark


-----Original Message-----
From: J. Lewis Muir [mailto:[email protected]] 
Sent: Monday, September 10, 2012 5:03 PM
To: Mark Rivers
Cc: [email protected]
Subject: Re: How to profile an EPICS application on Linux

On 9/10/12 4:58 PM, Mark Rivers wrote:
> Hi Lewis,
> 
> Thanks for the reply. 
> 
> I don't think that could be it, because I can reduce the CPU time of my application from 20% to 14% by changing a PV to eliminate calculations that are definitely done in my code.  I collected the profile with those calculations enabled, so at least (20-14)/20 = 30% of the CPU time should be in my calculation function.  It's spending the rest of its time reading short TCP messages which are coming in at 6.5 kHz, and I think that will result in a non-trivial amount of time in drvAsynIPPort.  Some of it will be in the system Ethernet driver, network stack, etc.

Hi, Mark.

What does the "time" command show?

Lewis


Replies:
Re: How to profile an EPICS application on Linux J. Lewis Muir
References:
How to profile an EPICS application on Linux Mark Rivers
Re: How to profile an EPICS application on Linux J. Lewis Muir
RE: How to profile an EPICS application on Linux Mark Rivers
Re: How to profile an EPICS application on Linux J. Lewis Muir

Navigate by Date:
Prev: Re: How to profile an EPICS application on Linux J. Lewis Muir
Next: Re: camonitor bug for string as array of chars Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How to profile an EPICS application on Linux J. Lewis Muir
Next: Re: How to profile an EPICS application on Linux J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·