File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
staging/src/k8s.io/apiserver/pkg/storage/cacher Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ const (
52
52
// initial and resync watch lists to storage.
53
53
storageWatchListPageSize = int64 (10000 )
54
54
// defaultBookmarkFrequency defines how frequently watch bookmarks should be send
55
- // in addition to sending a bookmark right before watch deadline
55
+ // in addition to sending a bookmark right before watch deadline.
56
+ //
57
+ // NOTE: Update `eventFreshDuration` when changing this value.
56
58
defaultBookmarkFrequency = time .Minute
57
59
)
58
60
Original file line number Diff line number Diff line change @@ -47,17 +47,17 @@ const (
47
47
resourceVersionTooHighRetrySeconds = 1
48
48
49
49
// eventFreshDuration is time duration of events we want to keep.
50
- eventFreshDuration = 5 * time .Minute
50
+ // We set it to `defaultBookmarkFrequency` plus epsilon to maximize
51
+ // chances that last bookmark was sent within kept history, at the
52
+ // same time, minimizing the needed memory usage.
53
+ eventFreshDuration = 75 * time .Second
51
54
52
55
// defaultLowerBoundCapacity is a default value for event cache capacity's lower bound.
53
56
// 100 is minimum in NewHeuristicWatchCacheSizes.
54
57
// TODO: Figure out, to what value we can decreased it.
55
58
defaultLowerBoundCapacity = 100
56
59
57
60
// defaultUpperBoundCapacity should be able to keep eventFreshDuration of history.
58
- // With the current 102400 value though, it's not enough for leases in 5k-node cluster,
59
- // but that is conscious decision.
60
- // TODO: Validate if the current value is high enough for large scale clusters.
61
61
defaultUpperBoundCapacity = 100 * 1024
62
62
)
63
63
You can’t perform that action at this time.
0 commit comments