Let G be a permutation group, acting on a set varOmega of size n. A subset {mathcal {B}} of varOmega is a base for G if the pointwise stabilizer G_{({mathcal {B}})} is trivial. Let b(G) be the minimal size of a base for G. A subgroup G of mathrm {Sym}(n) is large base if there exist integers m and r ge 1 such that {{,mathrm{Alt},}}(m)^r unlhd G le {{,mathrm{Sym},}}(m)wr {{,mathrm{Sym},}}(r), where the action of {{,mathrm{Sym},}}(m) is on k-element subsets of {1,dots ,m} and the wreath product acts with product action. In this paper we prove that if G is primitive and not large base, then either G is the Mathieu group mathrm {M}_{24} in its natural action on 24 points, or b(G)le lceil log nrceil +1. Furthermore, we show that there are infinitely many primitive groups G that are not large base for which b(G) > log n + 1, so our bound is optimal.