I think 5 years....but how you even GET permanent residency is a whole different question....that I dont know the exact answer to!
For the US - to get a green card - you either marry a citizen, or file thru the lottery, or file a green card application (either family work national interest exceptional ability etc)
I suppose the process may be similar in Canada also - but I dont know for sure...