i am still running into problems with the notion o...
# troubleshooting
t
i am still running into problems with the notion of "observed tpr" when it comes to scaling. aside from it being usually wrong in my experience (it generally is too quick to declare the busy-time-based tpr as impossible)... once a vertex goes into observed tpr state it seems to be stuck there. the capacity is basically never reevaluated, ie it shows as unchanging in the logs and graphs. is that intentional? reading through the source observed tpr should only be used if it's catching up, but i don't understand why it then goes on to use the observed tpr average (which is the one that seems stuck). is it saying "i saw you do this once, so i know you can do at least that much forever and ever"? it also seems to miss peak throughput often - maybe our observation frequency is too low. am i misunderstanding the intention of this completely? it seems to me that just because you could process at N records/sec yesterday doesn't mean you can today (maybe the box is busier today or something). are we the only ones where the observed tpr reporting seems much further off than reality? it always underestimates the capacity of our sources
g
Hey! Sorry I don’t fully understand the problem you are facing in practice. The logic behind the observed tpr is that it should be more accurate because we actually observe the peak throughput for the source. The busy time metrics are not always reliable for sources and sometimes it’s completely off. I think in most cases the observed tpr is a more conservative estimate of the source throughput.
t
> I think in most cases the observed tpr is a more conservative estimate of the source throughput. yes, that matches with what i've seen as well. it is often extremely conservative, actually. i retract my comment about it being stuck using observed tpr - it tends to revert to that during periods of high traffic, when its calculation of what the source ought to be capable of (based on busy time) increases beyond the default +15% threshold above "observed tpr". i just didn't wait long enough to see it flip between busy-time-based and observed-tpr. i guess what i find odd is this scenario: if recovery (after a deploy) peaked at, let's say 100k qps and then caught up, the observed tpr is really just locked in forever at 100k. maybe the source was really capable of 200k qps but it never actually needed to go that fast. now the observed tpr is locked in, forever, at 100k and it never gives the source a chance to "prove itself" for lack of a better word
g
The problem is that often sources look less busy that they actually are because many time spent in the source logic is not measured by the busytime. It’s extremely easy to create a synthetic test case where the source will measure 0% business and already run at max capacity. The logic may be overly conservative but in general why should we assume that a source can do more throughput than what it did at the peak time during catchup? In our experience this logic only improved stability, maybe at the expense of slightly higher than necessary source parallelism. If on your infra it’s consistently off by a large margin you can effectively disable it by changing the
job.autoscaler.observed-true-processing-rate.switch-threshold
config
t
in general why should we assume that a source can do more throughput than what it did at the peak time during catchup?
because of the example i showed above. but, perhaps that means some other config is off in our deployment such that the observed tpr gets undercounted.
you can effectively disable it by changing the
job.autoscaler.observed-true-processing-rate.switch-threshold
config
thanks for the confirmation, i had considered that! we may increase it then. in our experience we haven't seen the scenarios you mention, so maybe it's just different sources! ours are usually pretty simple kafka + deser, nothing fancy.
g
You can have very biased Kafka busy time metrics if something causes a fetch delay (broker is slow to respond even though there is data in the topic) not very common scenario but we wanted to guard against it