mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Update duration to be kept in watchcache
This commit is contained in:
parent
4ccfeb18d9
commit
d1de6295bb
@ -52,7 +52,9 @@ const (
|
|||||||
// initial and resync watch lists to storage.
|
// initial and resync watch lists to storage.
|
||||||
storageWatchListPageSize = int64(10000)
|
storageWatchListPageSize = int64(10000)
|
||||||
// defaultBookmarkFrequency defines how frequently watch bookmarks should be send
|
// defaultBookmarkFrequency defines how frequently watch bookmarks should be send
|
||||||
// in addition to sending a bookmark right before watch deadline
|
// in addition to sending a bookmark right before watch deadline.
|
||||||
|
//
|
||||||
|
// NOTE: Update `eventFreshDuration` when changing this value.
|
||||||
defaultBookmarkFrequency = time.Minute
|
defaultBookmarkFrequency = time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -47,7 +47,10 @@ const (
|
|||||||
resourceVersionTooHighRetrySeconds = 1
|
resourceVersionTooHighRetrySeconds = 1
|
||||||
|
|
||||||
// eventFreshDuration is time duration of events we want to keep.
|
// eventFreshDuration is time duration of events we want to keep.
|
||||||
eventFreshDuration = 5 * time.Minute
|
// We set it to `defaultBookmarkFrequency` plus epsilon to maximize
|
||||||
|
// chances that last bookmark was sent within kept history, at the
|
||||||
|
// same time, minimizing the needed memory usage.
|
||||||
|
eventFreshDuration = 75 * time.Second
|
||||||
|
|
||||||
// defaultLowerBoundCapacity is a default value for event cache capacity's lower bound.
|
// defaultLowerBoundCapacity is a default value for event cache capacity's lower bound.
|
||||||
// 100 is minimum in NewHeuristicWatchCacheSizes.
|
// 100 is minimum in NewHeuristicWatchCacheSizes.
|
||||||
@ -55,9 +58,6 @@ const (
|
|||||||
defaultLowerBoundCapacity = 100
|
defaultLowerBoundCapacity = 100
|
||||||
|
|
||||||
// defaultUpperBoundCapacity should be able to keep eventFreshDuration of history.
|
// defaultUpperBoundCapacity should be able to keep eventFreshDuration of history.
|
||||||
// With the current 102400 value though, it's not enough for leases in 5k-node cluster,
|
|
||||||
// but that is conscious decision.
|
|
||||||
// TODO: Validate if the current value is high enough for large scale clusters.
|
|
||||||
defaultUpperBoundCapacity = 100 * 1024
|
defaultUpperBoundCapacity = 100 * 1024
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user