-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
container/common: Replace readUInt64 with optimized version
This patch replaces the `readUint64` function with one that optimizes for reading uint64s from files only. It prevents unnecessary calls to `.Stat` because a valid uint64 can be 20 characters at most anyway. It also avoids a few allocations. Overall, benchmarking has shown to reduce the total CPU time by ~15%, which given a total usage of roughly 3% in the entire kubelet, this means we're reducing the kubelet baseline CPU by about ~0.45%.
- Loading branch information
Showing
1 changed file
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters