Optimization of oil or petroleum products pumping modes by changing hydraulic characteristics of pumping stations achieved by changing the number of revolutions of pumping units with the help of frequency-controlled drive is considered. The problem is formulated, a method of its analytical solution is proposed, and computer methods, which give a solution of the problem in case of a large number of intermediate stations, are discussed. An example of numerical calculation is given. The problems of regulating at the pumping stations are discussed. Changes in oil pumping conditions or its characteristics may lead to a disturbance of the normal mode of oil pipeline operation: appearance of cavitation at some pumping stations and excessive back-ups at other stations. Prevention of such phenomena and selection of optimal modes of pumping operation are achieved by pump operation regulation.