This paper uses an overlapping generations model to investigate the urban public pension in China. It examines the effects of the replacement rates and population growth rate on the capital-labor ratio, pension benefits, consumption and utility, and finds the optimal replacement rate. It is shown that raising the individual account benefit replacement rate only increases the individual account benefits. Raising the social pool benefit replacement rate induces the increase in the social pool benefits and retirement-period consumption, while the decrease in the capital-labor ratio, individual account benefits, working-period consumption and utility. The fall in the population growth rate leads to the increase in the capital-labor ratio, social pool benefits, individual account benefits, working-period consumption and utility, while the decrease in the retirement-period consumption. The optimal social pool benefit replacement rate depends on the individual discount factor, social discount factor, capital share of income and population growth rate, and it decreases in the case of fallen population growth rate. It will do more good than harm to raise the individual account benefit replacement rate, reduce the social pool benefit replacement rate and strictly implement China's population policy.