Repository navigation
Store counter keys raw and convert them on read - #45
Conversation
Write cost, single process (measured in-process, 3M calls)
Concurrent writes (18 schedulers)
Scrape time is unchanged (within run-to-run noise at 100, 1,000 and 10,000 series, on 1, 4 and 18 schedulers). |
Yeah I did make that simplifying tradeoff. The bad key will get dropped on scrape, but it will be in the table nonetheless. Maybe the right call is to delete it from ets at scrape time? (cc @weaversam8 ) |
|
This is a smart idea to improve performance, nice find! I don't love the idea of scrapes having side effects (deleting keys) but it's probably better than leaving them there to slowly bloat memory otherwise. I'm OK with that approach. Another idea could be to log (or set a gauge) on scrape indicating how many bad series exist in ETS and were scraped, so it's something we can monitor and address manually? |
|
I opted for discarding on scrape and setting a counter+exemplar. |
add/*: buys about +20% throughput gain on benchmarks.