Introduction. Ukrainian agricultural sector has faced the conflict between private business and public interests of society. This situation has led to the necessity to optimize production and to study the conditions for sustainable development in agricultural sector involving the enhancement of economic, social, and ecological performance.Problem Statement. Under the transformational changes of the domestic economy, risks of the war and the lack of funding, there is a need to ensure a high level of agricultural production efficiency. The achievement of this primarily depends on the rational use of available production resources.Purpose. The purpose of the research is to focus on the ways of raising the production efficiency in order to provide the world food safety under the conditions of the war in Ukraine and the decreasing profit ability of agricultural production.Material and Methods. The methodology is based on the theoretical discussion, including the overview of scholarly research literature and public sources using analysis, synthesis, as well as system, logical, structural-functional, comparative, and other methods.Results. The developed optimization models allow raising the efficiency of the crop and livestock production in test agricultural enterprises A and B through reducing the production costs and increasing the profit. In addition, the chosen models take into account the risk factor, which helps to ensure with 95% probability that both enterprises remain profitable even under unfavorable circumstances.Conclusions. Production optimization means to identify the quantitative and qualitative parameters of production process indicators and to bring this process, including the economic, social, and environmental production aspects to optimal conditions. The synergy of such approach is taking into account the interests of private business, society, and environment