MLOps is a rapidly growing field in which optimizing resource allocation has become a key challenge. Despite the growing popularity of MLOps in production environments, there is a lack of articles in the literature that propose formal mathematical models for MLOps processes. This gap limits the development of analytical tools that support effective resource management in such systems. This study presents a mathematical model of an MLOps system and formulates a corresponding optimization problem. The model consists of three layers — processes, components, and servers — which serve as input parameters for the system, allowing for a flexible yet comprehensive representation of real-world MLOps architectures. Using this structure as a foundation, constraints and optimization criteria were established to enhance resource management. Finally, an objective function was proposed, whose minimization leads to improved system performance, reduced operational costs, and increased process reliability.