Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for NewOOMAdjuster (0.43 sec)

  1. pkg/util/oom/oom_unsupported.go

    limitations under the License.
    */
    
    package oom
    
    import (
    	"errors"
    )
    
    var unsupportedErr = errors.New("setting OOM scores is unsupported in this build")
    
    func NewOOMAdjuster() *OOMAdjuster {
    	return &OOMAdjuster{
    		ApplyOOMScoreAdj:          unsupportedApplyOOMScoreAdj,
    		ApplyOOMScoreAdjContainer: unsupportedApplyOOMScoreAdjContainer,
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  2. pkg/util/oom/oom_linux_test.go

    func applyOOMScoreAdjContainerTester(pidListSequence [][]int, maxTries int, appliedPids []int, expectedError bool, t *testing.T) {
    	pidOOMs := make(map[int]bool)
    
    	// Mock ApplyOOMScoreAdj and pidLister.
    	oomAdjuster := NewOOMAdjuster()
    	oomAdjuster.ApplyOOMScoreAdj = func(pid int, oomScoreAdj int) error {
    		pidOOMs[pid] = true
    		return nil
    	}
    	oomAdjuster.pidLister = sequenceToPidLister(pidListSequence)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  3. pkg/util/oom/oom_linux.go

    */
    
    package oom
    
    import (
    	"fmt"
    	"os"
    	"path"
    	"path/filepath"
    	"strconv"
    	"time"
    
    	cmutil "k8s.io/kubernetes/pkg/kubelet/cm/util"
    
    	"k8s.io/klog/v2"
    )
    
    func NewOOMAdjuster() *OOMAdjuster {
    	oomAdjuster := &OOMAdjuster{
    		pidLister:        getPids,
    		ApplyOOMScoreAdj: applyOOMScoreAdj,
    	}
    	oomAdjuster.ApplyOOMScoreAdjContainer = oomAdjuster.applyOOMScoreAdjContainer
    	return oomAdjuster
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 07:13:28 UTC 2022
    - 4K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/container_manager_linux.go

    			if err != nil {
    				errs = append(errs, fmt.Errorf("failed to move PID %d (in %q) to %q: %v", pid, cont, name, err))
    			}
    		}
    	}
    
    	// Also apply oom-score-adj to processes
    	oomAdjuster := oom.NewOOMAdjuster()
    	klog.V(5).InfoS("Attempting to apply oom_score_adj to process", "oomScoreAdj", oomScoreAdj, "pid", pid)
    	if err := oomAdjuster.ApplyOOMScoreAdj(pid, oomScoreAdj); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  5. cmd/kubelet/app/server.go

    		HeartbeatClient:     nil,
    		EventClient:         nil,
    		TracerProvider:      tp,
    		HostUtil:            hu,
    		Mounter:             mounter,
    		Subpather:           subpather,
    		OOMAdjuster:         oom.NewOOMAdjuster(),
    		OSInterface:         kubecontainer.RealOS{},
    		VolumePlugins:       plugins,
    		DynamicPluginProber: GetDynamicPluginProber(s.VolumePluginDir, pluginRunner),
    		TLSOptions:          tlsOptions}, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:34 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  6. cmd/kube-proxy/app/server.go

    	proxymetrics.RegisterMetrics(s.Config.Mode)
    
    	// TODO(vmarmol): Use container config for this.
    	var oomAdjuster *oom.OOMAdjuster
    	if s.Config.OOMScoreAdj != nil {
    		oomAdjuster = oom.NewOOMAdjuster()
    		if err := oomAdjuster.ApplyOOMScoreAdj(0, int(*s.Config.OOMScoreAdj)); err != nil {
    			logger.V(2).Info("Failed to apply OOMScore", "err", err)
    		}
    	}
    
    	if s.Broadcaster != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 13:27:41 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet_test.go

    		Recorder:             fakeRecorder,
    		RemoteRuntimeService: rtSvc,
    		RemoteImageService:   fakeRuntime.ImageService,
    		Subpather:            &subpath.FakeSubpath{},
    		OOMAdjuster:          oom.NewOOMAdjuster(),
    		OSInterface:          kubecontainer.RealOS{},
    		DynamicPluginProber:  prober,
    		TLSOptions:           tlsOptions,
    	}
    	crOptions := &config.ContainerRuntimeOptions{}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 106.9K bytes
    - Viewed (0)
Back to top