Specializing an OS to optimize the performance of a particular application is typically a manual process that requires great expertise. Specialization through configuration lends itself well to automation; however, it is challenging due to the sheer size of the configuration space of modern OSes, the difficulty to quantify that space, the long time it takes to evaluate a configuration, and the large number of invalid configurations. Hence, existing attempts at specializing OSes automatically are limited to switching features on and off to minimize memory consumption or attack surface, and cannot target metrics such as performance. We present Wayfinder, a framework specializing the configuration of OSes completely automatically and without expert knowledge. It can specialize all aspects of an OS configuration (compile-/boot-/run-time) towards any quantifiable performance, resource consumption, or security metric, for an application processing a given workload on a given hardware setup. Wayfinder consists of an automated OS benchmarking platform, and a neural network-based search algorithm driving the specialization process. This is achieved by learning on the fly which configuration parameters and values impact performance the most, and which ones lead to runtime failures. Optionally, a model pre-trained on one application can be reused to accelerate the specialization of related applications. We evaluate Wayfinder on two OSes, four applications, and two target metrics: Wayfinder fully automatically identifies specialized configurations with up to 24% application performance improvement and 8.5% memory usage reduction compared to default configurations. We highlight the benefits of our neural network, reaching good solutions faster than competing approaches (random and Bayesian), and successfully transferring knowledge between related applications.
翻译:操作系统定制以优化特定应用程序性能通常是需要高度专业知识的手动过程。通过配置实现定制化易于自动化,但受限于现代操作系统配置空间的庞大规模、量化难度、配置评估所需的长耗时以及大量无效配置。因此,现有自动操作系统定制尝试仅限于通过开关功能以最小化内存消耗或攻击面,无法针对性能等指标优化。我们提出导航者框架,完全自动化操作系统配置定制且无需专家知识。该框架可针对任何可量化的性能、资源消耗或安全指标,对操作系统配置的编译/启动/运行时全方面进行定制,适用于在特定硬件环境下处理指定工作负载的应用程序。导航者包含自动化操作系统基准测试平台与驱动定制过程的神经网络搜索算法,通过实时学习哪些配置参数与值对性能影响最大、哪些会导致运行时故障实现定制。可选地,预训练于某一应用程序的模型可复用于加速相关应用程序的定制。我们在两个操作系统、四个应用程序及两个目标指标上评估导航者:与默认配置相比,导航者全自动识别出的定制配置可实现高达24%的应用程序性能提升与8.5%的内存占用减少。我们验证了神经网络的优势——其比对比方法(随机搜索与贝叶斯优化)更快地达成优质解,并成功实现了相关应用程序间的知识迁移。