aboutsummaryrefslogtreecommitdiffstats
path: root/client/go/internal
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2024-05-14 22:30:01 +0200
committerjonmv <venstad@gmail.com>2024-05-14 22:30:01 +0200
commit34a1fe4950a6860d913a2c410f4d88109eced077 (patch)
tree69044a445074a0d5f1dd2a02272b3ae01e4d1bb6 /client/go/internal
parent830440b6978bf1c8ecef6c702e84734feb1c9a80 (diff)
Less aggressive smoothing, and readjust a bit less often
Diffstat (limited to 'client/go/internal')
-rw-r--r--client/go/internal/vespa/document/throttler.go4
-rw-r--r--client/go/internal/vespa/document/throttler_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/client/go/internal/vespa/document/throttler.go b/client/go/internal/vespa/document/throttler.go
index 3eb0ccd17f6..e7031e9892d 100644
--- a/client/go/internal/vespa/document/throttler.go
+++ b/client/go/internal/vespa/document/throttler.go
@@ -59,7 +59,7 @@ func NewThrottler(connections int) Throttler { return newThrottler(connections,
func (t *dynamicThrottler) Sent() {
currentInflight := t.TargetInflight()
t.sent++
- if t.sent*t.sent*t.sent < 100*currentInflight*currentInflight {
+ if t.sent*t.sent*t.sent < 1000*currentInflight*currentInflight {
return
}
t.sent = 0
@@ -94,7 +94,7 @@ func (t *dynamicThrottler) Sent() {
if j != -1 {
u := t.throughputs[j]
if k != -1 {
- t.throughputs[j] = (2*u + t.throughputs[i] + s) / 4
+ t.throughputs[j] = (18*u + t.throughputs[i] + s) / 20
}
s = u
}
diff --git a/client/go/internal/vespa/document/throttler_test.go b/client/go/internal/vespa/document/throttler_test.go
index b386e0d5105..eba8cbd2972 100644
--- a/client/go/internal/vespa/document/throttler_test.go
+++ b/client/go/internal/vespa/document/throttler_test.go
@@ -13,7 +13,7 @@ func TestThrottler(t *testing.T) {
if got, want := tr.TargetInflight(), int64(16); got != want {
t.Errorf("got TargetInflight() = %d, but want %d", got, want)
}
- for i := 0; i < 30; i++ {
+ for i := 0; i < 65; i++ {
tr.Sent()
tr.Success()
}