A control device for controlling an engine provided with a fuel injector configured to inject fuel into a cylinder, a spark plug configured to ignite a mixture gas inside the cylinder, a fuel storage configured to store fuel to be introduced into the fuel injector, a fuel pump configured to pump fuel into the fuel storage, and a fuel passage through which fuel to be introduced into the fuel pump flows, the control device comprising: a processor configured to: switch a combustion mode of the mixture gas between a first combustion mode and a second combustion mode by controlling each component of the engine according to an operating state of the engine; and control the fuel pump, wherein in the first combustion mode, the mixture gas is combusted by spark ignition combustion where the spark plug ignites the mixture gas, and in the second combustion mode, a portion of the mixture gas is combusted by spark ignition combustion where the spark plug ignites the mixture gas, and then the remaining mixture gas is combusted by compression ignition combustion where the mixture gas is combusted by self-ignition, wherein the fuel pump includes: a pressurizing chamber having a suction port, and into which fuel is introduced from the low-pressure fuel passage via the suction port; a plunger inserted into the pressurizing chamber and configured to change a volume of the pressurizing chamber; an on-off valve configured to open and/or close the suction port; and a plunger driving part configured to drive the plunger and configured to interlock with the engine so that a suction stroke in which the volume of the pressurizing chamber is increased to allow fuel to be drawn into the pressurizing chamber, and a pressurizing stroke in which the volume of the pressurizing chamber is reduced to allow fuel inside the pressurizing chamber to be pressurized, are performed successively, wherein a period of time combining a period of the pressurizing stroke and a period of the suction stroke is a pressurizing cycle, and wherein the processor is configured to cyclically close the on-off valve, and control a closing cycle of the on-off valve so that a ratio of the closing cycle of the on-off valve to the pressurizing cycle becomes smaller in the second combustion mode than in the first combustion mode. a processor configured to: switch a combustion mode of the mixture gas between a first combustion mode and a second combustion mode by controlling each component of the engine according to an operating state of the engine; and control the fuel pump, switch a combustion mode of the mixture gas between a first combustion mode and a second combustion mode by controlling each component of the engine according to an operating state of the engine; and control the fuel pump, wherein in the first combustion mode, the mixture gas is combusted by spark ignition combustion where the spark plug ignites the mixture gas, and in the second combustion mode, a portion of the mixture gas is combusted by spark ignition combustion where the spark plug ignites the mixture gas, and then the remaining mixture gas is combusted by compression ignition combustion where the mixture gas is combusted by self-ignition, wherein the fuel pump includes: a pressurizing chamber having a suction port, and into which fuel is introduced from the low-pressure fuel passage via the suction port; a plunger inserted into the pressurizing chamber and configured to change a volume of the pressurizing chamber; an on-off valve configured to open and/or close the suction port; and a plunger driving part configured to drive the plunger and configured to interlock with the engine so that a suction stroke in which the volume of the pressurizing chamber is increased to allow fuel to be drawn into the pressurizing chamber, and a pressurizing stroke in which the volume of the pressurizing chamber is reduced to allow fuel inside the pressurizing chamber to be pressurized, are performed successively, a pressurizing chamber having a suction port, and into which fuel is introduced from the low-pressure fuel passage via the suction port; a plunger inserted into the pressurizing chamber and configured to change a volume of the pressurizing chamber; an on-off valve configured to open and/or close the suction port; and a plunger driving part configured to drive the plunger and configured to interlock with the engine so that a suction stroke in which the volume of the pressurizing chamber is increased to allow fuel to be drawn into the pressurizing chamber, and a pressurizing stroke in which the volume of the pressurizing chamber is reduced to allow fuel inside the pressurizing chamber to be pressurized, are performed successively, wherein a period of time combining a period of the pressurizing stroke and a period of the suction stroke is a pressurizing cycle, and wherein the processor is configured to cyclically close the on-off valve, and control a closing cycle of the on-off valve so that a ratio of the closing cycle of the on-off valve to the pressurizing cycle becomes smaller in the second combustion mode than in the first combustion mode.