I'm not a tax professional but it would seem to me that it would be better to pay off the home-loan rather than the investment property. Even if you're getting First Time Buyer tax relief on your home as a married couple, the ceiling for interest is €16,000. If you're not married or not a first time buyer, the ceiling is lower. You're paying BoS nearly €27,000 a year in interest so you're well above the ceiling. Reducing this loan by €20,000 will bring your annual interest down by around €1,000 per year so still well above the ceiling, therefore paying it off this loan won't affect your tax relief at all.
Anyway, in general the tax write-off against rent is more valuable than residential relief.