mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-02 06:47:34 +00:00
Merge pull request #34000 from wojtek-t/set_cache_size
Automatic merge from submit-queue Set deserialization cache size based on target memory usage **Special notes for your reviewer**: This is the PR we talked about yesterday. **Release note**: ```release-note To reduce memory usage to reasonable levels in smaller clusters, kube-apiserver now sets the deserialization cache size based on the target memory usage. ```
This commit is contained in:
@@ -82,6 +82,10 @@ func Run(s *options.ServerRunOptions) error {
|
||||
// TODO: register cluster federation resources here.
|
||||
resourceConfig := genericapiserver.NewResourceConfig()
|
||||
|
||||
if s.StorageConfig.DeserializationCacheSize == 0 {
|
||||
// When size of cache is not explicitly set, set it to 50000
|
||||
s.StorageConfig.DeserializationCacheSize = 50000
|
||||
}
|
||||
storageGroupsToEncodingVersion, err := s.StorageGroupsToEncodingVersion()
|
||||
if err != nil {
|
||||
glog.Fatalf("error generating storage version map: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user