It depends on the city. Some cities, such as Beijing, require you to book an appointment online before going in person; others accept walk-ins. Check your city's exit-entry authority before you go.
Nationwide (all cities)
Depends on the city
Whether you need an appointment depends on the city you are renewing in.
Other cities
Other cities may not require an appointment, or may have their own online booking channel. The general rule is to confirm with your city's exit-entry authority before you go, since a walk-in that is not accepted wastes the trip.
What to do
So check your city's requirements. For an appointment-first city like Beijing, book online and bring the appointment form; for others, verify whether a walk-in is accepted.
Local variations
Beijing: appointment required
Beijing is a clear case of an appointment-first city. The Beijing municipal online service guide for foreigner residence permit issuance, change and renewal requires you to book online: log in to the Beijing Government Service Website, enter the 'one-stop' foreigner work service, select residence permit issuance, click 'online appointment', fill in the basic, extended and purpose information, choose the acceptance hall, date and time slot, and print an application form with an appointment barcode before going to the service window. The same can be done through the 'Beijing Public Security Exit-Entry' WeChat account.