whenever you feel ready;
most people start GT two years before the desired admission year
do not take T this early, unless you have plenty of money and are willing to take it multiple times. it's not only about VISA, but more a requirement of some schools during application.
And do not assume that ibt is easier than GRE, esp. if you're bad at listening & speaking.
so i suggest you take G first