Can you please advise how long is a good margin 2 months, 3 months or more?
I cannot offer advice. I can offer some observations about things to consider in making the decision about when-to-apply.
There is little consensus about how many days over the minimum physical presence is a "good" margin, although comments about this by forum participants tend to emphasize that even very confident applicants should have at least a week to ten days.
My view is that a month is the prudent applicant's minimum margin. But what is a "good" margin will vary considerably depending on the individual person's situation and history.
The biggest factor, which should be obvious, is how certain the prospective applicant is about getting the travel history right, meaning both complete and accurate. Those who have kept a travel journal, recording each and every cross-border trip when it happens, which is what IRCC has long suggested, and who are thus highly confident in their travel history, can typically feel confident applying with a smaller margin than, say, someone who reconstructs their travel history for the application (relying on passport stamps is particularly prone to error, for example). But other factors, like the strength and stability of the PR's work and address history, can be big factors.
There is no guaranteed way to for-sure avoid any RQ-related non-routine processing requests, so it is not as if a really big margin will for sure eliminate the risk of RQ. But, in contrast, the more there might be reasons-to-question-presence (such as for an applicant who has continued to have extensive work or residential or family ties abroad for a significant part of the eligibility period), the more a bigger margin might make the difference between a routinely processed application versus encountering RQ-related non-routine processing.
I added a FULL YEAR, which involved waiting well over another year, before applying . . . but that was largely because I was self-employed operating the same business as I did before immigrating to Canada, exporting the same services to the same clientele outside Canada, a very strong ongoing tie outside Canada. Moreover, I already carried a passport which allowed me visa-free international travel almost as much as a Canadian passport would, so there was no rush for me. Few will need to wait nearly so long as I did. I mention my experience to illustrate just how personal this decision is, the when-to-apply decision.
Thus, the short answer would have been "
a good margin ranges from 30 to 300 days, depending on the individual's situation and history."