We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While profiling linkerd-tcp using linux perf, I uncovered that a large chunk of our CPU usage is stats reporting.
linkerd-tcp
perf
CPU usage without stats reporting is 36% at 10k qps. CPU usage with stats reporting is 150% at 10k qps.
Attached is a zipfile with the SVG flame graph. Use a Mac App like Gapplin to view it. flame.zip
When we turned off stats, the exact patch we wrote against tacho master was this
diff --git a/src/recorder.rs b/src/recorder.rs index 123850f..7d361a6 100644 --- a/src/recorder.rs +++ b/src/recorder.rs @@ -36,7 +36,7 @@ impl Recorder { *curr += n; return; } - self.sample.counters.insert(k.clone(), n); + //self.sample.counters.insert(k.clone(), n); } pub fn set(&mut self, k: &GaugeKey, n: u64) { @@ -44,7 +44,7 @@ impl Recorder { *curr = n; return; } - self.sample.gauges.insert(k.clone(), n); + //self.sample.gauges.insert(k.clone(), n); } pub fn add(&mut self, k: &StatKey, n: u64) { @@ -55,17 +55,17 @@ impl Recorder { let mut vals = VecDeque::new(); vals.push_back(n); - self.sample.stats.insert(k.clone(), vals); + //self.sample.stats.insert(k.clone(), vals); } } impl Drop for Recorder { fn drop(&mut self) { // Steal the sample from the recorder so we can give it to the channel without // copying. - let sample = mem::replace(&mut self.sample, Sample::default()); + /*let sample = mem::replace(&mut self.sample, Sample::default()); if mpsc::UnboundedSender::send(&self.tx, sample).is_err() { info!("dropping metrics"); - } + }*/ } }
The text was updated successfully, but these errors were encountered:
Closing this due to the tacho fixes we made.
Sorry, something went wrong.
No branches or pull requests
While profiling
linkerd-tcp
using linuxperf
, I uncovered that a large chunk of our CPU usage is stats reporting.CPU usage without stats reporting is 36% at 10k qps.
CPU usage with stats reporting is 150% at 10k qps.
Attached is a zipfile with the SVG flame graph. Use a Mac App like Gapplin to view it.
flame.zip
When we turned off stats, the exact patch we wrote against tacho master was this
The text was updated successfully, but these errors were encountered: