Commit cefbdf6
Fix performance regression with
## Related
* Closes #12626
## What
0.29 changed the size of the channel for the gRPC proxy channel to be
dependent on the `--server-memory-limit`.
The thinking was to better heed the total memory limit.
However, using a `server_memory_limit` of exactly `0` is common, and
even encouraged in our docs. Having zero bytes buffer on the incoming
channel leads to a lot of early backpressure, making the sender block,
degrading performance.
This PR changes the channel to always have a fixed 256 MiB of buffer
space. This trades performance for (potential) latency.
In future versions of Rerun we should consider making this value
configurable, but doing so now would be a breaking change, and I would
like to get this PR into a patch release.
Previous to 0.29, we also had a fixed size input buffer, but measured in
number of messages instead of number of bytes. This meant the server
could easily balloon in memory use when logging large things. I believe
having it defined in terms of bytes makes more sense, but there is
_also_ a fixed upper-bound on the number of messages in the new code
(4096).
Source-Ref: be1671f8c672ccf5d743b21baf8984aa20eec150--server-memory-limit 0
1 parent 7fd794e commit cefbdf6
File tree
2 files changed
+28
-16
lines changed- crates
- store/re_grpc_server/src
- utils/re_quota_channel/src
2 files changed
+28
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
49 | | - | |
50 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| |||
871 | 880 | | |
872 | 881 | | |
873 | 882 | | |
874 | | - | |
| 883 | + | |
875 | 884 | | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | 885 | | |
881 | 886 | | |
882 | | - | |
883 | | - | |
| 887 | + | |
| 888 | + | |
884 | 889 | | |
885 | 890 | | |
886 | 891 | | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | 892 | | |
893 | | - | |
| 893 | + | |
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
407 | 408 | | |
408 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
409 | 421 | | |
410 | 422 | | |
411 | 423 | | |
412 | | - | |
| 424 | + | |
413 | 425 | | |
414 | 426 | | |
415 | 427 | | |
| |||
0 commit comments