methods are provided for maximizing the throughput of a computer system in the presence of one or more power constraints . throughput is maximized by repeatedly or continuously or periodically optimizing task scheduling and assignment for each of a plurality of components of a computer system . the components include a plurality of central processing units each operating at a corresponding operating frequency . the components also include a plurality of disk drives . the corresponding operating frequencies of one or more cpus of the plurality of cpus are adjusted to maximize computer system throughput under one or more power constraints . optimizing task scheduling and assignment , as well as adjusting the corresponding operating frequencies of one or more cpus , are performed by solving a mathematical optimization problem using a first methodology over a first time interval and a second methodology over a second time interval longer than the first time interval . the first methodology comprises a short term heuristic solver for adapting to computer system changes that occur on a short time scale , and the second methodology comprises a long term solver having greater accuracy and greater computational complexity than the first methodology .