This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Controlling probe overhead


Here's a simple patch to put a upper-bound on how much system time is
consumed by SystemTap.  It keeps a cumulative sum of time spent in
probes on each cpu, and if that exceeds the threshold within an
interval, the session is aborted.

Advantages:
* Accounting is maintained per-cpu.
* The frequency of get_cycles() is irrelevant to calculations, even if
it changes.
* The code is very simple. :)

Disadvantages:
* Doesn't account for overhead in firing the probe (e.g., the cost of a
debug trap).
* Doesn't detect excessive overhead from multiple scripts (e.g., ten
scripts that individually run under the threshold could together bear
down the system).

TODO:
* Share some code with STP_TIMING (which also tracks probe duration).
* Make the threshold tunable (by gurus only?).
* Account for other runtime overhead (transport, timer sync, etc.).
* Make exceptions for some probes (begin, end)

Comments and suggestions are welcome...


Josh

Attachment: stp_accounting.patch
Description: stp_accounting.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]