fix(probe): Loosen ebpf parameters to reduce restarts

Delay kernel events by up to 0.2ms, to reduce the chance the ebpf
reporter sends them out-of-order, and allow out-of-order events to
happen up to once a minute without giving up on the ebpf reporter.
This commit is contained in:
Bryan Boreham
2019-08-13 16:16:16 +00:00
parent c8c8dacbc9
commit 6e715d2697
2 changed files with 3 additions and 2 deletions

View File

@@ -87,8 +87,8 @@ func (t *connectionTracker) ReportConnections(rpt *report.Report) {
ebpfLastFailureTime := t.ebpfLastFailureTime
t.ebpfLastFailureTime = time.Now()
if ebpfLastFailureTime.After(time.Now().Add(-5 * time.Minute)) {
// Multiple failures in the last 5 minutes, fall back to proc parsing
if ebpfLastFailureTime.After(time.Now().Add(-1 * time.Minute)) {
// Multiple failures in the last minute, fall back to proc parsing
log.Warnf("ebpf tracker died again, gently falling back to proc scanning")
t.useProcfs()
} else {

View File

@@ -129,6 +129,7 @@ func newEbpfTracker() (*EbpfTracker, error) {
debugBPF = true
}
tracer.TimestampOffset = 200000 // Delay events by 0.2ms to avoid out-of-order reporting
tracker := &EbpfTracker{
debugBPF: debugBPF,
}