In this paper, we study ruin in a perturbed compound Poisson risk process under stochastic interest force and constant interest force. By using the technique of stochastic control, we show that the ruin probability in the perturbed risk model is always twice continuously differentiable provided that claim sizes have continuous density functions. In the perturbed risk model, ruin may be caused by a claim or by oscillation. We decompose the ruin probability into the sum of two ruin probabilities; one is the probability that ruin is caused by a claim and the other is the probability that ruin is caused by oscillation. Integrodifferential equations for these ruin probabilities are derived when the interest force is constant. When the claim sizes are exponentially distributed, explicit solutions of the ruin probabilities are derived from the integrodifferential equations. Numerical examples are given to illustrate the effects of diffusion volatility and interest force on the ruin probabilities.