Hello, On Wed, Oct 20, 2021 at 04:14:25PM +0530, Pratik Sampat wrote: > As you have elucidated, it doesn't like an easy feat to > define metrics like ballpark numbers as there are many variables > involved. Yeah, it gets tricky and we want to get the basics right from the get go. > For the CPU example, cpusets control the resource space whereas > period-quota control resource time. These seem like two vectors on > different axes. > Conveying these restrictions in one metric doesn't seem easy. Some > container runtime convert the period-quota time dimension to X CPUs > worth of runtime space dimension. However, we need to carefully model > what a ballpark metric in this sense would be and provide clearer > constraints as both of these restrictions can be active at a given > point in time and can influence how something is run. So, for CPU, the important functional number is the number of threads needed to saturate available resources and that one is pretty easy. The other metric would be the maximum available fractions of CPUs available to the cgroup subtree if the cgroup stays saturating. This number is trickier as it has to consider how much others are using but would be determined by the smaller of what would be available through cpu.weight and cpu.max. IO likely is in a similar boat. We can calculate metrics showing the rbps/riops/wbps/wiops available to a given cgroup subtree. This would factor in the limits from io.max and the resulting distribution from io.weight in iocost's case (iocost will give a % number but we can translate that to bps/iops numbers). > Restrictions for memory are even more complicated to model as you have > pointed out as well. Yeah, this one is the most challenging. Thanks. -- tejun