Repository navigation
Conversation
…in FinishEstimate()
|
|
|
/release-note none |
|
@pawbhard pls check this PR, i have no rights to change labels to pass Mergeable |
|
@murgatroid99 gentle ping |
|
@murgatroid99 i fixed import that caused tests failure |
|
There are some formatting errors, see this log for details. Please either run |
|
used tools/distrib/clang_format_code.sh |
|
@murgatroid99 InvalidDottedVersionException: got 'None' Command used: bazel test Result: This suggests the Kokoro failure may be flaky and just rerun is needed |
|
@murgatroid99 thx for approve, do i need to do something for merge? |
|
I don't think we want to do this change. It limits the total number of bytes read per Endpoint read to be bounded by the max chunk size which can have a severe performance impact if the max chunk size is not tuned correctly and further there's no easy way to define a default for all workloads. Currently we maintain target_ as a moving average of bytes read during each previous TCP Endpoint read on the connection. So its not expected to grow unbounded. Eventually the plan is to use min_progress_size to decide how much to allocate and not rely on the target_ estimates. I think it might be better to tie the slice sizes: https://github.com/grpc/grpc/blob/master/src/core/lib/event_engine/posix_engine/posix_endpoint.cc#L539 to the min and max chunk size respectively to control how much bytes are read per socket read rather than per endpoint read. We can change the default min and max chunk sizes to 8KB and 64KB respectively: https://github.com/grpc/grpc/blob/master/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h#L48 |
|
@Vignesh2208 thanks, that makes sense. I agree that using I think the issue here is slightly different though. The memory growth we are seeing comes from the total read buffer size allocated by Also, I don’t think For example, after 99 Endpoint reads of 100KB and then one Endpoint read of 10MB, a simple average would be around 201KB, and a 1% EMA update from ~138KB would move to ~239KB. But the current logic sets What do you think about adding a separate opt-in setting for this instead, e.g. It would be unset by default, so existing users keep the same behavior. When explicitly set, it would cap the adaptive read target / preallocated read buffer size, similar to what this PR currently does, but without changing the meaning of This would give memory-sensitive deployments a simple way to avoid large high-watermark read buffers after occasional big reads, without changing defaults for everyone else. In our production workload, this kind of cap gives a noticeable reduction in resource usage. |
|
@murgatroid99 for me it looks like a flaky tests problem again, but maybe i'm missing smth, can you please recheck/rerun? |
|
@murgatroid99 @Vignesh2208 gentle ping |
* upstream/master: [PSM Interop] : add cleanup for the orphaned resources left for SPIFFE cluster. (grpc#43038) [PH2][Trivial] Build (grpc#43069) [PH2][Bug][Client] Bug fix [Security] Plumb SSL key exchange group to auth context. (grpc#42917) [CI] Update debian-based docker images to use cmake 3.25. (grpc#42795) [xDS e2e tests] clean up API for verifying server status notification changes (grpc#43052) Clamp PosixEndpointImpl adaptive read target to max read chunk size (grpc#42234) [tls] Move to grpc_core::PemKeyCertPair and grpc_core::KeyCertPairsOrSelector (grpc#42992) [build] Add grpc-proto submodule (grpc#43035) fix detecting the number of online CPU (grpc#41585) [core][promise-based-filter] Fix for metadata nullptr crash on repoll (grpc#43037) skip tls1.3 and <1.1.1 in telemetry test (grpc#43042)
…rpc#42234) Solution for grpc#42194 In our production environment, applying this patch locally significantly reduced memory usage in services with many long-lived active gRPC connections. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes grpc#42234 COPYBARA_INTEGRATE_REVIEW=grpc#42234 from SaidKec:buffer-limit-fix fc924e0 PiperOrigin-RevId: 953004629
…thon_apic_clients * upstream/master: [PSM Interop] : add cleanup for the orphaned resources left for SPIFFE cluster. (grpc#43038) [PH2][Trivial] Build (grpc#43069) [PH2][Bug][Client] Bug fix [Security] Plumb SSL key exchange group to auth context. (grpc#42917) [CI] Update debian-based docker images to use cmake 3.25. (grpc#42795) [xDS e2e tests] clean up API for verifying server status notification changes (grpc#43052) Clamp PosixEndpointImpl adaptive read target to max read chunk size (grpc#42234) [tls] Move to grpc_core::PemKeyCertPair and grpc_core::KeyCertPairsOrSelector (grpc#42992)
…rpc#42234) Solution for grpc#42194 In our production environment, applying this patch locally significantly reduced memory usage in services with many long-lived active gRPC connections. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes grpc#42234 COPYBARA_INTEGRATE_REVIEW=grpc#42234 from SaidKec:buffer-limit-fix fc924e0 PiperOrigin-RevId: 953004629
Solution for #42194
In our production environment, applying this patch locally significantly reduced memory usage in services with many long-lived active gRPC connections.