All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Gardner <rob.gardner@hp.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com,
	Mark Williamson <mark.williamson@cl.cam.ac.uk>
Subject: Re: unconditionally enable the trace buffer
Date: Fri, 28 Oct 2005 00:45:37 -0600	[thread overview]
Message-ID: <4361C911.4070301@hp.com> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D32E62B@liverpoolst.ad.cl.cam.ac.uk>

Ian Pratt wrote:

>>>>* ability to turn on/off via hypercall
>>>>        
>>>>
>>>Not currently implemented, but would not be difficult to add.
>>>      
>>>
>>Just as an aside I'm not sure this matters: From what Rob's 
>>told me, having the (inline) trace() calls in there produces 
>>the same overhead whether tracing is active or not.  I guess 
>>it makes sense; once you've incurred the overhead of having 
>>the function there and evaluating the "is tracing on" 
>>conditional, you might as well have stored a few values also ;-)
>>    
>>
>We could cache miss on reading the tracebuffer producer counter and
>tracebuffer base address, so its not totally a done deal.
>
>I don't have a big worry about performance, but I'd feel more
>comfortable to see a more realistic assesment of overhead. Comparing
>results from ttcp in a domU with 128k sock buf and the MTU set to 552
>bytes should do it.
>  
>

I just completed some benchmarks using ttcp as Ian suggests. I was 
surprised by the results, but essentially, Ian's intuition n this case 
may be right on the money. I tested three cases:
  1. trace buffers turned off, that is not compiled in
  2. trace buffers compiled in and turned on
  3. trace buffers compiled in but disabled
Cases 1 and 3 show no performance difference at all, but case 2 does 
show a non-trivial degradation.

Details of the benchmarking: ttcp using 128k buffers to send data to a 
domU from another machine using a gigabit network. 2gb were transferred 
in each run, and 10 runs were performed for each case. Dom0 and domU 
together used up just about all of a cpu, and experienced 2000-2500 
context switches per second to handle 40-50,000 I/O's per second. Please 
note that the additional trace events for XenMon were enabled in this 
system (case 2) so each of those 50,000 I/O's each second generates a 
trace record!

I conclude the following from this:
 - there is no penalty for simply having the trace buffer code compiled 
into xen
 - there is a penalty for enabling tracing
 - therefore, the ability to turn tracing on/off via a hypercall is 
definitely important

Rob

  reply	other threads:[~2005-10-28  6:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28  0:24 unconditionally enable the trace buffer Ian Pratt
2005-10-28  6:45 ` Rob Gardner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-27 19:45 Ian Pratt
2005-10-27 22:08 ` Rob Gardner
2005-10-27 23:21   ` Mark Williamson
2005-10-25 16:40 Rob Gardner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4361C911.4070301@hp.com \
    --to=rob.gardner@hp.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=mark.williamson@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.