Performance-related Configuration Patterns in Infrastructure as Code
Authors:
- Pemsith MendisPMPemsith Mendis
- Victor ProkhorenkoVPVictor Prokhorenko
- Navaneeth SivakumarNSNavaneeth Sivakumar
- Wilson ReevesWRWilson Reeves
- Muhammad Ali BabarMBMuhammad Ali Babar
- Akond RahmanARAkond Rahman
Preprint
- 20 May 2026
- preprint
- Published by Elsevier in SSRN Electronic Journal
Abstract
Context: Infrastructure as code (IaC) is the practice of automatically configuring, managing, and provisioning an organization's infrastructure using configuration scripts, e.g., Ansible scripts. While IaC is beneficial for automated software deployment and configuration management, the relationship between certain configuration patterns and performance attributes, such as execution time remain unknown. Configuration patterns are recurring coding patterns in configuration scripts that are used in IaC. A systematic evaluation can quantify the relationship between configuration patterns and performance attributes, which in turn can aid practitioners in their configuration script development process.Objective: The objective of the paper is to help practitioners in obtaining desired performance for IaC-based infrastructure management by deriving a set of configuration patterns that correlate with execution time, CPU consumption, and memory consumption.Methods: We conduct an empirical study with 4,523 and 64 Ansible configuration scripts, collected from open source software (OSS) and proprietary repositories, respectively. We first derive potential configuration patterns related to performance from peer-reviewed publications and grey literature. We execute the collected configuration scripts, collect performance data, and perform statistical analysis to identify the patterns related to performance. Additionally, we develop a linter called PERFector to detect these patterns in configuration scripts.Results: We derive a list of 5 performance-related patterns. Using PERFector we identify 1,873 instances of performance related patterns, where the pattern `needless facts' is the most frequent category. We obtain practitioner feedback for 48 instances of patterns, of which 19 instances have been confirmed as valid.Conclusion: Our paper provides a list of performance-related configuration patterns that practitioners can detect using PERFector and avoid. This provides a solid foundation for future research on techniques to automatically repair performance-related configuration patterns.Keywords
This publication has 30 references indexed in Scilit:
- An empirical study of task infections in Ansible scriptsEmpirical Software Engineering, 2023
- Toward a catalog of software quality metrics for infrastructure codeJournal of Systems and Software, 2020
- Benefitting from the Grey Literature in Software Engineering Research2020
- The ‘as code’ activities: development anti-patterns for infrastructure as codeEmpirical Software Engineering, 2020
- Source code properties of defective infrastructure as code scriptsInformation and Software Technology, 2019
- A systematic mapping study of infrastructure as code researchInformation and Software Technology, 2019
- Exploiting load testing and profiling for Performance Antipattern DetectionInformation and Software Technology, 2018
- Curating GitHub for engineered software projectsEmpirical Software Engineering, 2017
- An in-depth study of the promises and perils of mining GitHubEmpirical Software Engineering, 2015
- Green mining: a methodology of relating software change and configuration to power consumptionEmpirical Software Engineering, 2013