The conventional wisdom is, I think, to sign long term in the 4th season (second arb cycle). If you take guys to their last arb year before offering a long term contract some will refuse the extension.
As for length, all will sign five years if you want, just make the annual average the same as they initially requested. But they will not sign for a shorter term than requested.