10.1184/R1/6606188.v1 Bianca Schroeder Bianca Schroeder Mor Harchol-Balter Mor Harchol-Balter Adam Wierman Adam Wierman Arun Iyengar Arun Iyengar Erich Nahum Erich Nahum How to Determine a Good Multi-Programming Level for External Scheduling Carnegie Mellon University 1973 computer sciences 1973-01-01 00:00:00 Journal contribution https://kilthub.cmu.edu/articles/journal_contribution/How_to_Determine_a_Good_Multi-Programming_Level_for_External_Scheduling/6606188 Scheduling/prioritization of DBMS transactions is important for many applications that rely on database backends. A convenient way to achieve scheduling is to limit the number of transactions within the database, maintaining most of the transactions in an external queue, which can be ordered as desired by the application. While external scheduling has many advantages in that it doesn’t require changes to internal resources, it is also difficult to get right in that its performance depends critically on the particular multiprogramming limit used (the MPL), i.e. the number of transactions allowed into the database. If the MPL is too low, throughput will suffer, since not all DBMS resources will be utilized. On the other hand, if the MPL is too high, there is insufficient control on scheduling. The question of how to adjust theMPL to achieve both goals simultaneously is an open problem, not just for databases but in system design in general. Herein we study this problem in the context of transactional workloads, both via extensive experimentation and queueing theoretic analysis. We find that the two most critical factors in adjusting the MPL are the number of resources that the workload utilizes and the variability of the transactions’ service demands. We develop a feedback based controller, augmented by queueing theoretic models for automatically adjusting the MPL. Finally, we apply our methods to the specific problem of external prioritization of transactions. We find that external prioritization can be nearly as effective as internal prioritization, without any negative consequences, when the MPL is set appropriately.