The essential dimension is a numerical invariant of an algebraic group G
which may be thought of as a measure of complexity of G-torsors over fields. A
recent theorem of N. Karpenko and A. Merkurjev gives a simple formula for the
essential dimension of a finite p-group. We obtain similar formulas for the
essential p-dimension of a broader class of groups, which includes all
algebraic tori.