In how many years Indian can get permanent residence after his MS in Canada?

There are many ways to get PR.

You can see most of them at http://www.cic.gc.ca/english/immigrate/index.asp

After studying in Canada for a year, you qualify to apply for a one year post-grad work permit.

To qualify for CEC, you would have needed to take 2 years of studies and work for a year or work for 2 years so if you could find an employer while you are on your post-grad work permit and get your work permit changed to a regular permit to stay at least another year, you could apply under CEC.

If you qualify for FSW, that is having at least 1 year work experience in a skilled job and at least 67 points on the self-assessment, you could apply for that once you have been in Canada for one year or if you don’t have the 1 year skilled work experience, you could get that in Canada on your post-grad work permit and then apply.

You also have a chance to apply under PNP graduate class depending on the province, in some cases it is enough to have studied in that province for one year and have a job offer, in others the rules are different, would need two years and work for a while.  Once you are working, you may be able to apply under PNP with employer support and then it doesn’t matter with the studies because you are not under graduate class anymore.