This paper presents a simple and computationally tractable method which recursively computes the stationary probabilities of the queue size in an M/G/1 queueing system with variable service rate. For each service two possible service types are available and the service rule is characterized by two switch-over levels. The computational approach discussed in this paper can be applied to a variety of queueing problems.