The optimum plasma density for achieving the largest wakefield accelerating gradient in a plasma wakefield accelerator (PWFA) for a given electron beam driver parameters (fixed charge, spot size and duration) is analyzed. It is found that the peak beam current Ip (charge per unit time) plays an important role in determining the optimum density. We show that for narrow beams of low peak current (Ip≪IA≈17 kA and σr≪σz), the prediction from linear theory (Lu et al 2005 Phys. Plasma12 063101) that or np(cm−3)≈5.6×1019/σz2 (μm) for a bi-Gaussian bunch of length σz and spot size σr, works well for obtaining the maximum accelerating gradient. However, for narrow beams of high peak current (Ip≳IA and σr≪σz), the optimum density can be an order of magnitude larger than that predicted by linear theory. In this regime, we show that a new condition np∼nb0 should be used for 1≲σz/σr≲10, where nb0 is the peak beam density. Theoretical arguments for this new condition are given and the predictions are confirmed by particle-in-cell (PIC) simulations.