Towards efficiently supporting database as a service with QoS guarantees
Abstract Quality of Service (QoS) is at the core of the vision of Database as a Service (DBaaS), which provides guarantees to database users on the usability of database services, even when the underlying database infrastructure is shared by multiple users. When QoS guarantees are necessitated, traditional approaches in DBaaS often have to reserve computation resources (e.g. CPU and memory) for tenants according to their performance Service Level Objectives (SLOs), so that the database engine always possesses sufficient resources to accomplish the expected workloads under any circumstance. Such resource reservation schemes inevitably result in poor resource utilization, as the actual workloads of tenants are usually below their maximal workload expectation described in their SLOs. In this paper, we propose a novel scheme called FrugalDB to further improve resource utilization and thus reduce operational cost for DBaaS systems with QoS guarantees. FrugalDB accommodates two independent database engines, an in-memory engine for heavy workloads with tight SLOs, and a disk-based engine for light workloads with loose SLOs. The in-memory database is leveraged to migrate temporary heavy workloads from the disk-based database, when the latter itself does not suffice to handle all active tenants’ workloads, and thus it could be relieved of the tremendous data serving pressure yielded by those heavy workloads, and focus on processing massive numbers of light workloads. When the heavy workloads fade out, FrugalDB reversely migrates a tenant’s workload from the in-memory database into the disk-based database, so that the occupied memory resources could be recollected for subsequent workload migrations. By an effective workload estimation method and an efficient migration schedule algorithm, FrugalDB tries to minimize workload migration cost incurred in moving workloads between the two engines. By allocating each tenant’s workload to an appropriate engine via workload migration, this dual-engine scheme can substantially save computation resources, and thus consolidate more tenants on a single database server. We evaluate FrugalDB with extensive experiments, which show that it has a higher tenant consolidation rate with performance SLO guarantees and fewer performance SLO violations than the existing systems, as well as with acceptable response latency.