Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Revert "Revert "Revert "[experiments] Enable memory_pressure_controll…
Browse files Browse the repository at this point in the history
…er for debug builds (grpc#31811)" (grpc#31824)" (grpc#31832)" (grpc#31846)

This reverts commit 322e852.
  • Loading branch information
ctiller authored Dec 9, 2022
1 parent f32701f commit 1f15f21
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions bazel/experiments.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ EXPERIMENTS = {
"hpack_test": [
"new_hpack_huffman_decoder",
],
"resource_quota_test": [
"memory_pressure_controller",
],
},
"off": {
"core_end2end_test": [
Expand All @@ -48,6 +45,7 @@ EXPERIMENTS = {
"promise_based_client_call",
],
"resource_quota_test": [
"memory_pressure_controller",
"unconstrained_max_quota_buffer_size",
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/experiments/experiments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const ExperimentMetadata g_experiment_metadata[] = {
{"peer_state_based_framing", description_peer_state_based_framing, false},
{"flow_control_fixes", description_flow_control_fixes, true},
{"memory_pressure_controller", description_memory_pressure_controller,
kDefaultForDebugOnly},
false},
{"unconstrained_max_quota_buffer_size",
description_unconstrained_max_quota_buffer_size, false},
{"new_hpack_huffman_decoder", description_new_hpack_huffman_decoder,
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/experiments/experiments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
- name: memory_pressure_controller
description:
New memory pressure controller
default: debug
default: false
expiry: 2023/01/01
owner: ctiller@google.com
test_tags: [resource_quota_test]
Expand Down
7 changes: 3 additions & 4 deletions src/core/lib/resource_quota/memory_quota.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ class BasicMemoryQuota final
// Data about current memory pressure.
struct PressureInfo {
// The current instantaneously measured memory pressure.
double instantaneous_pressure = 0.0;
double instantaneous_pressure;
// A control value that can be used to scale buffer sizes up or down to
// adjust memory pressure to our target set point.
double pressure_control_value = 0.0;
double pressure_control_value;
// Maximum recommended individual allocation size.
size_t max_recommended_allocation_size = 0;
size_t max_recommended_allocation_size;
};

explicit BasicMemoryQuota(std::string name) : name_(std::move(name)) {}
Expand Down Expand Up @@ -460,7 +460,6 @@ class MemoryOwner final : public MemoryAllocator {

// Instantaneous memory pressure in the underlying quota.
BasicMemoryQuota::PressureInfo GetPressureInfo() const {
if (!is_valid()) return BasicMemoryQuota::PressureInfo{};
return impl()->GetPressureInfo();
}

Expand Down

0 comments on commit 1f15f21

Please sign in to comment.