Imagery in Crime and Punishment
In addition to the general smells of Saint Petersburg in the summer, the man also notices the strong smells coming from the pot-houses, or taverns. Considering how numerous these are, and the intoxicated men in the area, Dostoevsky paints a vivid image of a very seedy neighborhood.
Dostoevsky uses this simile to show how Porfiry Petrovitch awkwardly behaves in the room; he appears to be stalling or waiting for something, merely going back and forth around the room until something he wants to happen will happen. The simile also helps reinforce the image of Porfiry--a short, round man who can't quite sit still.