Maximum achievable population inversion in finite volumes