-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
(This is used to request new product features, please visit https://discuss.istio.io for questions on using Istio)
Describe the feature request
When the size of envoy metrics is big, every stats scraping will create a big temporary bytes slice. This puts pressure on the golang gc.
see allocate_space
profiler graph:
file: profile (2).pb.gz
One alternative solution:
Using a global stats bytes buffer. And reseting buffer on beginning of the pilot-agent scrap requests. If the size of metrics becomes smaller, we truncate the buffer on the end of scrap requests. Protect global stats bytes buffer access by a mutex.
Pros:
1. Avoids frequent object creation.
Cons:
1. No concurrent data access.
2. Not release buffer if never be scraped.
Describe alternatives you've considered
Affected product area (please put an X in all that apply)
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context