Научная статья КРАТКОСРОЧНОЕ ПРОГНОЗИРОВАНИЕ ЗАПОЛНЕНИЯ ДИСКА СЕРВЕРА ДЛЯ ПЛАНИРОВАНИЯ ЕМКОСТИ: СРАВНЕНИЕ ПРОСТЫХ МЕТОДОВ НА СИНТЕТИЧЕСКИХ ДАННЫХ Кирилл Д. Уваренко, Анна К. Мажарцева Российский технологический университет МИРЭА, 119454, Москва, пр - т Вернадского, д. 78 e - mail: nas98989play@mail.ru Аннотация . Нехватка свободного места на диске приводит к отказам баз данных и сервисов, поэтому планирование ёмкости требует заблаговременной оценки момента заполнения диска. Цель работы — сравнить по точности простые методы краткосрочного прогноза на горизонте 14 су ток и оценить, как они реагируют на изменение скорости роста. Сравниваются наивный прогноз, линейная регрессия по последним 30 суткам, прогноз по среднему приросту за 14 суток и метод Хольта (экспоненциальное сглаживание с трендом) с параметрами α = 0,3 и β = 0,1. Эксперимент выполнен на 50 синтетических рядах ежедневной заполненности диска длиной 150 суток с недельной сезонностью, шумом и увеличением скорости роста с 0,3 до 0,5 процентных пункта (п.п.) в сутки на 75 - е сутки (имитация запуска нового сервиса ). Прогнозы строились методом скользящей точки отсчёта (rolling origin): 13 точек на ряд, всего 650 прогнозов на метод. Качество оценивалось по средней абсолютной ошибке (MAE) в процентных пунктах. Наивный прогноз показал MAE 3,54 п.п., остальные методы — от 0,92 до 1,08 п.п.; наименьшую общую ошибку (0,92 п.п.) и наименьшую ошибку на 14 - е сутки (1,08 п.п.) дал метод Хольта. Линейная регрессия точнее при стабильном росте (0,69 п.п.), а методы с более короткой памятью быстрее реагируют на смену скорости рост а. Для планирования ёмкости достаточно простых методов с трендом, выбор между ними зависит от частоты изменения скорости роста. Выводы получены на синтетических данных и требуют проверки на реальных метриках мониторинга. Ключевые слова: планирование ёмкости, прогнозирование, временные ряды, метод Хольта, линейная регрессия, заполнение диска, мониторинг Research article Short - term forecasting of server disk usage for capacity planning: a comparison of simple methods on synthetic data Kirill D. Uvarenko, Anna K. Mazhartseva MIREA – Russian Technological University, 78 Vernadsky Avenue, Moscow, 119454, Russia e - mail: nas98989play@mail.ru Abstract. Lack of free disk space causes failures of databases and services, so capacity planning requires an early estimate of the moment when a disk becomes full. The aim is to compare simple methods of short - term forecasting by accuracy on a 14 - day hori zon and to evaluate how they react to a change of the growth rate. Four methods are compared: the naive forecast, linear regression over the last 30 days, a forecast based on the mean growth over 14 days, and Holt's method (exponential smoothing with a tre nd). The experiment used 50 synthetic series of daily disk usage, 150 days long, with weekly seasonality, noise, and an increase of the growth rate fr om 0.3 to 0.5 percentage points (p.p.) per day on day 75 (a model of a new service launch). Forecasts were made with a rolling origin, 13 origins per series. Quality was measured by the mean absolute error (MAE). The naive forecast gave an MAE of 3.54 p.p., and the other methods from 0.92 to 1.08 p.p.; Holt's method had the lowest overall error (0.92 p.p.) and the lowest error on day 14 (1.08 p.p.). Linear regression was more accurate at stable growth (0.69 p.p.), while methods with a shorter memory reacted faster to the change of the growth rate. Simple methods with a trend are enough for capacity planning. Th e conclusions are based on synthetic data and should be checked on real monitoring metrics. Keywords: capacity planning, forecasting, time series, Holt's method, linear regression, disk usage, monitoring 1. INTRODUCTION One of the typical problems of IT operations is a server that runs out of disk space. When a disk becomes full, a database or a service can stop working, so engineers try to know in advance when it will happen. This is a task of capacity planning, i.e. for ecasting the use of resources and adding them in time [1, 2]. Forecasting of resource usage is also a part of failure management in modern AIOps (artificial intelligence for IT operations) systems [3]. There are many forecasting methods. Classical exponential smoothing methods with a trend were proposed long ago [4, 5], and now there are ready tools for business and monitoring data [6, 7]. In recent years deep learning models for time series appeared [8, 9]. However, large forecasting competitions show that simple methods are often as good as complex ones [10 – 12]. For a monitoring specialist it is important to know how big the difference is for a typical task. The purpose of this work is to compare four simple methods for forecasting of daily disk usage on a 14 - day horizon and to see how they react to a change of the growth rate. We use synthetic data, because in this case the true future values are known and th e situation can be controlled. 2. METHODS Let y t be the disk usage (in percent) at day t, and h the forecast horizon in days. We consider four methods. Naive forecast. The last observed value is used for all future days: ŷ t+h = y t . It is a baseline that does not take growth into account. Linear regression. A straight line is fitted by least squares to the last 30 days, and then it is extended into the future: ŷ t+h = a + b·(t + h), (1) wh ere a and b are the coefficients of the line. Drift. The mean daily growth is calculated for the last 14 days and added to the last value: ŷ t+h = y t + h·(y t − y t−14 ) / 14. (2) The window of 14 days contains two full weeks, so the weekly seasonality does not influence the growth estimate. Holt's method. The level l t and the trend b t are updated by exponential smoothing [4]: l t = α ·y t + (1 − α )·(l t−1 + b t−1 ), (3) b t = β ·(l t − l t−1 ) + (1 − β )·b t−1 , (4) ŷ t+h = l t + h·b t . (5) We took α = 0.3 and β = 0.1 without tuning. As the quality measure we use the mean absolute error (MAE) over the horizon H = 14 days [13]: MAE = (1 / H)· Σ |ŷ t+h − y t+h |, h = 1…H. (6) MAE is measured in percentage points (p.p.) of disk capacity. The forecasts were evaluated with a rolling origin, i.e. the forecast is made many times fr om different days, using only the data before the origin [14]. 3. EXPERIMENT Synthetic series were generated in Python 3 with NumPy [15]. Each series has 150 daily values: y t = 10 + Σ g k + 0.8·sin(2 π t / 7) + ε t , k = 0…t, (7) wh ere g k is the daily growth (0.3 p.p. for k < 75 and 0.5 p.p. for k ≥ 75), the sine term models weekly seasonality (less data is written at weekends), and ε t ~ N(0, 0.5 2 ) is noise. The growth change on day 75 models the launch of a new service that writes more data. We generated 50 series (random seeds 0 – 49). Forecasts with the horizon of 14 days were made from 13 origins for each series: from day 40 to day 68 with a step of 7 days (5 origins, before the change of growth) and from day 77 to day 126 (8 origins, after the change). In total there were 650 forecast s for every method. 4. RESULTS AND DISCUSSION The results are given in Table 1. The last column shows the error of the forecast on the 14th day only, which is important for planning, because it is the farthest day. Table 1. Forecast error (MAE, p.p.) of the methods, average over 50 series Таблица 1. Ошибка прогноза ( MAE , п.п.) методов, среднее по 50 рядам Method Before change After change All origins Day 14, all Naive 3.18 3.76 3.54 6.08 Linear regression (30 d) 0.69 1.10 0.94 1.19 Drift (14 d) 1.20 1.00 1.08 1.19 Holt 0.79 1.00 0.92 1.08 The naive forecast is much worse than the other methods (3.54 p.p. in total and 6.08 p.p. on day 14), which is expected: the disk grows all the time, and a constant forecast cannot follow it. All three methods with a trend gave an error of about 1 p.p. For a disk of 1 TB it is approximately 10 GB, so for planning purposes the difference between them is small. Still, some differences can be seen. When the growth was stable, linear regression had the smallest error (0.69 p.p.), because it uses 30 points and averages the noise. The drift method was the worst of the three here (1.20 p.p.): it uses only two points, y t and y t−14 , so the noise of these two days goes directly to the growth estimate. After the change of the growth rate, the methods with shorter memory were better: drift and Holt gave 1.00 p.p., while linear regression gave 1.10 p.p., since its window of 30 days contains old data with the smaller slope. Holt's method had the lowest total error (0.92 p.p.) and the lowest error on day 14 (1.08 p.p.), but its advantage over linear regression (0.94 p.p.) is so small that we cannot say that it is really better. The study has limitations. The data are synthetic and the growth is almost linear. Real disks have sudden drops after deleting logs or backups, and the growth can be irregular, which was not modelled. The parameters of the methods were not tuned, and only the point forecast was studied, without prediction intervals, which are useful for choosing a safe moment to add disk space. In the future we plan to check these methods on real monitoring data and to compare them with the Prophet model [6] and with a neur al network [8]. 5. CONCLUSION In this work four simple methods of forecasting disk usage were compared on synthetic data with weekly seasonality and a change of the growth rate. The naive forecast was not suitable (MAE 3.54 p.p.), while linear regression, the drift method and Holt's me thod gave errors of about 1 p.p. on a 14 - day horizon. Linear regression was better at stable growth, and the methods with shorter memory reacted faster to the change of the growth rate. Holt's method gave the best total result (0.92 p.p.), but the differen ce from linear regression is small. So, for capacity planning a simple method with a trend is enough, and the choice can depend on how often the growth rate changes. The conclusions must be checked on real data. СПИСОК ЛИТЕРАТУРЫ / REFERENCES 1. Lorido - Botran T., Miguel - Alonso J., Lozano J.A. A review of auto - scaling techniques for elastic applications in cloud environments. Journal of Grid Computing. 2014. Vol. 12. P. 559 – 592. DOI: 10.1007/s10723 - 014 - 9314 - 7. 2. Cortez E., Bonde A., Muzio A., Russinovich M., Fontoura M., Bianchini R. Resource Central: understanding and predicting workloads for improved resource management in large cloud platforms. Proc. 26th ACM Symposium on Operating Systems Principles (SOSP). 2017. DOI: 10.1145/3132747.3132772. 3. Notaro P., Cardoso J., Gerndt M. A survey of AIOps methods for failure management. ACM Transactions on Intelligent Systems and Technology. 2021. Vol. 12, No. 6. Art. 81. DOI: 10.1145/3483424. 4. Holt C.C. Forecasting seasonals and trends by exponentially weighted moving averages. International Journal of Forecasting. 2004. Vol. 20, No. 1. P. 5 – 10. DOI: 10.1016/j.ijforecast.2003.09.015. 5. Gardner E.S. Exponential smoothing: the state of the art — Part II. International Journal of Forecasting. 2006. Vol. 22, No. 4. P. 637 – 666. DOI: 10.1016/j.ijforecast.2006.03.005. 6. Taylor S.J., Letham B. Forecasting at scale. The American Statistician. 2018. Vol. 72, No. 1. P. 37 – 45. DOI: 10.1080/00031305.2017.1380080. 7. Hyndman R.J., Khandakar Y. Automatic time series forecasting: the forecast package for R. Journal of Statistical Software. 2008. Vol. 27, No. 3. DOI: 10.18637/jss.v027.i03. 8. Lim B., Zohren S. Time - series forecasting with deep learning: a survey. Philosophical Transactions of the Royal Society A. 2021. Vol. 379, No. 2194. Art. 20200209. DOI: 10.1098/rsta.2020.0209. 9. Benidis K., Rangapuram S.S., Flunkert V., Wang Y., Maddix D., Turkmen C., et al. Deep learning for time series forecasting: tutorial and literature survey. ACM Computing Surveys. 2022. Vol. 55, No. 6. Art. 121. DOI: 10.1145/3533382. 10. Makridakis S., Spiliotis E., Assimakopoulos V. The M4 Competition: 100,000 time series and 61 forecasting methods. International Journal of Forecasting. 2020. Vol. 36, No. 1. P. 54 – 74. DOI: 10.1016/j.ijforecast.2019.04.014. 11. Makridakis S., Spiliotis E., Assimakopoulos V. Statistical and machine learning forecasting methods: concerns and ways forward. PLoS ONE. 2018. Vol. 13, No. 3. Art. e0194889. DOI: 10.1371/journal.pone.0194889. 12. Petropoulos F., Apiletti D., Assimakopoulos V., et al. Forecasting: theory and practice. International Journal of Forecasting. 2022. Vol. 38, No. 3. P. 705 – 871. DOI: 10.1016/j.ijforecast.2021.11.001. 13. Hyndman R.J., Koehler A.B. Another look at measures of forecast accuracy. International Journal of Forecasting. 2006. Vol. 22, No. 4. P. 679 – 688. DOI: 10.1016/j.ijforecast.2006.03.001. 14. Bergmeir C., Hyndman R.J., Koo B. A note on the validity of cross - validation for evaluating autoregressive time series prediction. Computational Statistics & Data Analysis. 2018. Vol. 120. P. 70 – 83. DOI: 10.1016/j.csda.2017.11.003. 15. Harris C.R., Millman K.J., van der Walt S.J., et al. Array programming with NumPy. Nature. 2020. Vol. 585. P. 357 – 362. DOI: 10.1038/s41586 - 020 - 2649 - 2. Конфликт интересов. Авторы заявляют об отсутствии конфликта интересов. Conflict of interest. The authors declare no conflict of interest. Вклад авторов. К. Д. Уваренко — Conceptualization, Methodology, Software, Investigation, Formal Analysis, Visualization, Writing – Original Draft; А. К. Мажарцева — Supervision, Validation, Writing – Review & Editing. Author contributions. K. D. Uvarenko — Conceptualization, Methodology, Software, Investigation, Formal Analysis, Visualization, Writing – Original Draft; A. K. Mazhartseva — Supervision, Validation, Writing – Review & Editing. ИНФОРМАЦИЯ ОБ АВТОРАХ: INFORMATION ABOUT THE AUTHORS: Уваренко Кирилл Дмитриевич, студент, БИСО - 03 - 25 , Российский технологический университет МИРЭА e - mail: nas98989play@mail.ru ORCID ID: SPIN - код : Researcher ID: Scopus Author ID: Анна Константиновна Мажарцева, Российский технологический университет МИРЭА e - mail: marchenkomirea@yandex.ru ORCID ID: SPIN - код : Researcher ID: Scopus Author ID: Kirill D. Uvarenko, student, BISO - 03 - 25 , MIREA – Russian Technological University e - mail: nas98989play@mail.ru ORCID ID: SPIN: Researcher ID: Scopus Author ID: Anna K. Mazhartseva, MIREA – Russian Technological University e - mail: marchenkomirea@yandex.ru ORCID ID: SPIN: Researcher ID: Scopus Author ID: