Yes, you will have to collect your luggage and exit customs and immigration. LIM is not a big airport, international and domestic are very close, similar to MEL.
Usually international arrivals is quite quick, unless you are arriving late evening (9pm onwards till past midnight). Luggage usually is very quick in my experience. I have arrived in LIM more than 30 occasions. I would say 2 hours is the minimum. Comfortable with 2.5 to 3 hours. Most of that due to checking in again on domestic. Its mostly manual check in. And the queues can be overwhelming at times.
If you have One World status, you can cut a good 45 minutes off that time.