Two or three years seems to work best. However, I've seen several long and happy marriages between people eleven years apart. It's partly to do with shared history. When you think of key events, it's a little distancing if one of you has been there, witnessed, felt something, and the other wasn't even born.
If you've both suffered a period of austerity, a political change, that sort of thing, it gives you something in common, something you both understand about each other's thinking. Also your bodily changes will be in sync. No fun if one is baggy and wrinkly, the other smooth and toned.