...

Source file src/github.com/Microsoft/hcsshim/internal/vm/remotevm/storage.go

Documentation: github.com/Microsoft/hcsshim/internal/vm/remotevm

     1  //go:build windows
     2  
     3  package remotevm
     4  
     5  import (
     6  	"github.com/pkg/errors"
     7  )
     8  
     9  func (uvmb *utilityVMBuilder) SetStorageQos(iopsMaximum int64, bandwidthMaximum int64) error {
    10  	// The way that HCS handles these options is a bit odd. They launch the vmworker process in a job object and
    11  	// set the bandwidth and iops limits on the worker process' job object. To keep parity with what we expose today
    12  	// in HCS we can do the same here as we launch the server process in a job object.
    13  	if uvmb.job != nil {
    14  		if err := uvmb.job.SetIOLimit(bandwidthMaximum, iopsMaximum); err != nil {
    15  			return errors.Wrap(err, "failed to set storage qos values on remotevm process")
    16  		}
    17  	}
    18  
    19  	return nil
    20  }
    21  

View as plain text