You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Walt Karas <wk...@verizonmedia.com.INVALID> on 2021/04/20 23:55:50 UTC

Re: [E] Re: Is there a performance issue with --enable-debug binaries?

--enable-debug means that the code will be compiled without the -O3 option,
that is to say, no optimization.  It's not related to whether trace/debug
output is configured on or off.  You can enable trace/debug output even if
you did not specify --enable-debug when you run configure.

On Tue, Apr 20, 2021 at 4:54 PM SUSAN HINRICHS <sh...@ieee.org> wrote:

> Hmm.  In my experience running binaries compiled with ---enable-debug do
> have a noticeable performance degradation.  Not nearly as bad as turning on
> debug tags, but quite noticeably when looking at peers running
> non-debug-enabled binaries.
>
> So might be adequate to run on a few machines to catch problems (like ASAN
> builds), but probably not how you want to build your standard
> production binaries.
>
> On Tue, Apr 20, 2021 at 4:19 PM Sudheer Vinukonda
> <su...@yahoo.com.invalid> wrote:
>
> >  Hmm, I have not really stress tested in particular with the binary
> > compiled using '-enable-debug', but have definitely used such a binary in
> > production with not much of a noticeable degradation (if any). The one
> > benefit in using such a binary is that it enables debug asserts
> > (ink_assert) and allows to catch potential bugs that only crash in non
> > release builds. Of course, the risk in deploying such a binary in all of
> > your production is a potential systematic crash across the entire set of
> > ATS boxes, but, I've definitely used and deployed such build in a small
> > number of hosts in the past.
> > Thanks,
> > Sudheer
> >     On Tuesday, April 20, 2021, 02:12:57 PM PDT, Chou, Peter <
> > pbchou@labs.att.com> wrote:
> >
> >  Hi,
> >
> > I know there was some discussion on the bug scrub (last week I think)
> that
> > enabling debug output in the records.config on any debug tags will
> greatly
> > reduce performance.
> >
> > Is it also the case that using a binary compiled with '-enable-debug'
> will
> > also cause performance issues?
> >
> > Thanks,
> > Peter
> >
>

Re: [E] Is there a performance issue with --enable-debug binaries?

Posted by Leif Hedstrom <zw...@apache.org>.

> On Apr 20, 2021, at 5:55 PM, Walt Karas <wk...@verizonmedia.com.INVALID> wrote:
> 
> --enable-debug means that the code will be compiled without the -O3 option,
> that is to say, no optimization.  It's not related to whether trace/debug
> output is configured on or off.  You can enable trace/debug output even if
> you did not specify --enable-debug when you run configure.


In addition to what Walt say, —enable-debug also enables some expensive operations within the code to make debugging easier, such as tagging released memory with a recognizable patterns. And various other “checks” as well, I’m sure.

— Leif

E.g.

#ifdef DEBUG
#define SANITY
#define DEADBEEF
#endif


> 
> On Tue, Apr 20, 2021 at 4:54 PM SUSAN HINRICHS <sh...@ieee.org> wrote:
> 
>> Hmm.  In my experience running binaries compiled with ---enable-debug do
>> have a noticeable performance degradation.  Not nearly as bad as turning on
>> debug tags, but quite noticeably when looking at peers running
>> non-debug-enabled binaries.
>> 
>> So might be adequate to run on a few machines to catch problems (like ASAN
>> builds), but probably not how you want to build your standard
>> production binaries.
>> 
>> On Tue, Apr 20, 2021 at 4:19 PM Sudheer Vinukonda
>> <su...@yahoo.com.invalid> wrote:
>> 
>>> Hmm, I have not really stress tested in particular with the binary
>>> compiled using '-enable-debug', but have definitely used such a binary in
>>> production with not much of a noticeable degradation (if any). The one
>>> benefit in using such a binary is that it enables debug asserts
>>> (ink_assert) and allows to catch potential bugs that only crash in non
>>> release builds. Of course, the risk in deploying such a binary in all of
>>> your production is a potential systematic crash across the entire set of
>>> ATS boxes, but, I've definitely used and deployed such build in a small
>>> number of hosts in the past.
>>> Thanks,
>>> Sudheer
>>>    On Tuesday, April 20, 2021, 02:12:57 PM PDT, Chou, Peter <
>>> pbchou@labs.att.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I know there was some discussion on the bug scrub (last week I think)
>> that
>>> enabling debug output in the records.config on any debug tags will
>> greatly
>>> reduce performance.
>>> 
>>> Is it also the case that using a binary compiled with '-enable-debug'
>> will
>>> also cause performance issues?
>>> 
>>> Thanks,
>>> Peter
>>> 
>>