github.com/singularityware/singularity@v3.1.1+incompatible/internal/pkg/cgroups/example/cgroups.toml (about)

     1  #
     2  # Cgroups configuration file example
     3  #
     4  
     5  # CPU resource restriction configuration
     6  # - shares: CPU shares (relative weight (ratio) vs. other cgroups with cpu shares).
     7  # - quotas: CPU hardcap limit (in usecs). Allowed cpu time in a given period.
     8  # - period: CPU period to be used for hardcapping (in usecs).
     9  # - realtimeRuntime: how much time realtime scheduling may use (in usecs).
    10  # - realtimePeriod: CPU period to be used for realtime scheduling (in usecs).
    11  # - cpus: CPUs to use within the cpuset. Default is to use any CPU available.
    12  # - mems: list of memory nodes in the cpuset. Default is to use any available memory node
    13  [cpu]
    14  #  shares = 512
    15  #  quotas = 0
    16  #  period = 0
    17  #  realtimeRuntime = 0
    18  #  realtimePeriod = 0
    19    cpus = "0"
    20    mems = "0"
    21  
    22  
    23  # Memory restriction configuration
    24  # - limit: memory limit (in bytes).
    25  # - reservation: memory reservation or soft_limit (in bytes).
    26  # - swap: total memory limit (memory + swap).
    27  # - kernel: kernel memory limit (in bytes).
    28  # - kernelTCP: kernel memory limit for tcp (in bytes)
    29  # - swappiness: how aggressive the kernel will swap memory pages.
    30  # - disableOOMKiller: disableOOMKiller disables the OOM killer for out of memory conditions
    31  # [memory]
    32  #   limit = 1073741824
    33  #   reservation = 2147483648
    34  #   swap = 1073741824
    35  #   kernel = 268435456
    36  #   kernelTCP = 268435456
    37  #   swappiness = 0
    38  #   disableOOMKiller = false
    39  
    40  
    41  # Devices configures the device whitelist.
    42  # - allow:  allow or deny.
    43  # - type:   device type, block, char, etc.
    44  # - major:  device's major number.
    45  # - minor:  device's minor number.
    46  # - access: cgroup access permissions format, rwm.
    47  [[devices]]
    48    access = "rwm"
    49    allow = true
    50    major = 0
    51    minor = 0
    52    type = "a"
    53  
    54  
    55  # BlockIO restriction configuration
    56  [blockIO]
    57    # Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only
    58    leafWeight = 10
    59  
    60    # Specifies per cgroup weight
    61    weight = 10
    62  
    63    # Weight per cgroup per device, can override BlkioWeight
    64    # - major is the device's major number.
    65    # - minor is the device's minor number.
    66    # - weight is the bandwidth rate for the device.
    67  	# - leafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only
    68    # [[blockIO.weightDevice]]
    69    #   major = 7
    70    #   minor = 0
    71    #   weight = 10
    72    #   leafWeight = 10
    73  
    74    # IO read rate limit per cgroup per device, bytes per second
    75  	# - major is the device's major number.
    76  	# - minor is the device's minor number.
    77  	# - rate is the IO rate limit per cgroup per device
    78    # [[blockIO.throttleReadBpsDevice]]
    79    #   major = 7
    80    #   minor = 0
    81    #   rate = 100
    82  
    83    # IO write rate limit per cgroup per device, bytes per second
    84    # [[blockIO.throttleWriteBpsDevice]]
    85    #   major = 7
    86    #   minor = 0
    87    #   rate = 100
    88  
    89    # IO read rate limit per cgroup per device, IO per second
    90    # [[blockIO.throttleReadIOPSDevice]]
    91    #   major = 7
    92    #   minor = 0
    93    #   rate = 100
    94  
    95    # IO write rate limit per cgroup per device, IO per second
    96    # [[blockIO.throttleWriteIOPSDevice]]
    97    #   major = 7
    98    #   minor = 0
    99    #   rate = 100
   100  
   101  
   102  # Hugetlb limit (in bytes)
   103  # - pagesize: the hugepage size
   104  # - limit: the limit of "hugepagesize" hugetlb usage
   105  [[hugepageLimits]]
   106    limit = 9223372036854771712
   107    pageSize = "2MB"
   108  
   109  
   110  # Network restriction configuration
   111  # [network]
   112  #   classID = 
   113  #   [[network.priorities]]
   114  #     name = "eth0"
   115  #     priority = 1
   116  
   117  
   118  # Task resource restriction configuration.
   119  [pids]
   120    limit = 1024
   121  
   122  
   123  # Rdma resource restriction configuration.
   124  # Limits are a set of key value pairs that define RDMA resource limits,
   125  # where the key is device name and value is resource limits.
   126  # [rdma]
   127  #   [[rdma.resOne]]
   128  #     hcaHandles = 0
   129  #     hcaObjects = 0