We consider an M/G/1 queue with the special feature that the speed of the server alternates between two constant values sL and sH > sL. The high-speed periods are exponentially distributed, and the low-speed periods have a general distribution. Our main results are: (i) for the case that the distribution of the low-speed periods has a rational Laplace–Stieltjes transform, we obtain the joint distribution of the buffer content and the state of the server speed; (ii) for the case that the distribution of the low-speed periods and/or the service request distribution is regularly varying at infinity, we obtain explicit asymptotics for the tail of the buffer content distribution. The two cases in which the offered traffic load is smaller or larger than the low service speed are shown to result in completely different asymptotics.