It's one of those good habits to get into - always renewing passports well ahead of expiration.
That way you avoid getting into a situation where you might need to travel on short-notice only to realize the passport is about to expire (or has expired).