Skip to content
New issue

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

Various CPU usage gains from profiling #742

Merged
merged 5 commits into from
Dec 11, 2015
Merged

Various CPU usage gains from profiling #742

merged 5 commits into from
Dec 11, 2015

Conversation

tomwilkie
Copy link
Contributor

Buildings on #741. Will rebase when #737 is merged.

Fixes #284. Saves another 1-2% CPU on my VM, down to about 7.5% CPU usage for the probe.

  • Use Readdirnames to reduce number of stat systcalls we're doing.
  • Cache the contents of some files in /proc that aren't expected to change.
  • Don't decode the certificates everytime we create an AppClient.
  • Don't read tcp6 file (we don't deal with ipv6 anywhere else).

if err != nil {
// Process is be gone by now, or we don't have access.
return
}

This comment was marked as abuse.

This comment was marked as abuse.

paulbellamy added a commit that referenced this pull request Dec 11, 2015
Various CPU usage gains from profiling
@paulbellamy paulbellamy merged commit 1b39659 into master Dec 11, 2015
@paulbellamy paulbellamy deleted the 284-profiling branch December 11, 2015 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants