Skip to content

Commit

Permalink
Do not generate XXX fields in protobufs (thanos-io#1725)
Browse files Browse the repository at this point in the history
* Do not generate XXX fields in protobufs

We don't need them. By gettig rid of them we achieve:

- smaller memory footprint
- smaller payloads on the wire
- same in-memory layout with core Prometheus structs opening path for all sorts of optimisations such as unsafe casts, leading to better memory use and faster :)
- see related issue: prometheus/prometheus#6029

The tests show SG memory allocations dropped 5% for query execution:
- Showing nodes accounting for -359.20MB, 6.19% of 5798.93MB total

Signed-off-by: Philip Panyukov <[email protected]>

* comment to explain why do don't generate XXX fields in protobufs

Signed-off-by: Philip Panyukov <[email protected]>
Signed-off-by: Aleksey Sin <[email protected]>
  • Loading branch information
ppanyukov authored and Aleksey Sin committed Nov 26, 2019
1 parent 0e8ae5f commit eb0cfe6
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 256 deletions.
Loading

0 comments on commit eb0cfe6

Please sign in to comment.