The development and solution of an optimization model of real-time control of pyrolysis of straight-run naphtha are considered. The model takes into account the constraints imposed by downstream units of a high-capacity production plant on the pyrolysis process, among which are the primary pyrolysis-gas fractionation unit, pyrolysis-gas compression unit, pyrolysis-gas separation unit, ethylene and propylene refrigeration cycles, reactors of hydrogenation of acetylenic compounds, and separation columns. Optimization is performed using a mathematical model comprising three parts: calculation of the physicochemical characteristics of straight-run naphtha from data of density measurements and Engler distillation, calculation of the kinetic parameters of the process, and determination of the yields of 14 main products of the pyrolysis. The errors of modeling the yields of various pyrolysis products are as follows (rel %): ethylene ±1.5, propylene ±2.8, butadiene ±3.3, and benzene ±3.1. In the optimization, “light” (density 0.706 kg/L) and “heavy” (0.72 kg/L) straight-run naphthas were studied. For both types of feedstock at a target ethylene yield of 10.45 t/(h furnace) under the target constraints, the profit was maximized and the standard naphtha consumption was minimized. The results were compared with the requirements for the pyrolysis according to the standard operating procedures, according to which the ethylene yield did not reach the target value for either type of feedstock and was 10.32 and 9.68 t/(h furnace), respectively. After optimization, the maximum profit was 1143 and 935 cu/(h furnace), respectively. The minimization of the standard consumption gave 1.79 t/t for light naphtha and 1.84 t/t for heavy naphtha. The constraints were met, and the target ethylene yield was reached. It was concluded that the pyrolysis of straight-run naphtha taken directly from a supplier’s pipe is inefficient and that the feedstock should be prepared in stirred intermediate tanks, with naphtha density measurements and Engler distillation performed according to the standard operating procedures, the data of which should then be used in the optimization.