Bryan Boreham
Bryan Boreham
Sadly the unit tests say that the race is not avoided. I will look some more.
I have updated this PR to take a copy of the last byte in `bstreamReader`. Also added comments to clarify that concurrent Iterator and Appender are allowed, but the chunk...
@ilixiaocui could you post the pprof file please? There may be some details in there that help to understand.
That looks like a CPU profile; please upload the heap profile you were showing extracts from in this issue.
Thanks. `heap1.txt` shows 73.15GB used by `txRing.add()` in 2,396,902 objects; that is exactly 32,768 bytes each. Since each element is a `uint64` at 8 bytes, that gives 4,096 entries in...
I notice from your profile that it seems to be calling `scrapeLoop.append()` way more than the Prometheus where I work. What scrape frequency are you using?
Perhaps I confused things: what I wanted is defined by `scrape_interval` in your [config file](https://prometheus.io/docs/prometheus/latest/configuration/configuration).
Thanks for that. 2.4 million series scraped every 3 seconds gives 1.25 microseconds per series; I wonder if Prometheus just can't keep up at times, so the append transactions pile...
@marquis-wang if you have strong evidence that it's the same, please post that evidence, and all the additional detail requested in this issue. Otherwise, please open a different issue and...
Note there is no code to shrink `tsdb.txRing`; once it goes up for a series it will stay that size.