Controlling CPU allocations in UNIX systems
Abstract
Employing UNIX systems in production environments requires controlling resource allocations so as to achieve service level objectives. For engineering and scientific workloads, these objectives are often expressed as service rates, such as application A should receive 50% of the central processing unit. In most UNIX systems, the only way to control CPU usage is by adjusting nice-values, a perprocess (task) tuning knob; unfortunately, the relationship between nice-values and process service rates has been poorly understood. This paper develops an analytic model that relates service rate objectives for compute-bound processes to nice-values and three scheduler parameters: R (the rate at which priority increases for each quantum of CPU consumed), D (the decay factor), and T (the number of quanta that expire before CPU usages are decayed); the model is evaluated using measurements of a workstation running IBM's Advanced Interactive Executive (AIX) 3.I Operating System. Based on the model, we develop an algorithm for calculating nice-values that achieve service rate objectives for compute-bound processes. Experiments conducted on a production AIX 3.1 system suggest that our algorithm works well in practice.