The best thing is to cut out the knotty bits and work with the clear wood (o rwood having only smaller knots). That, of course, might not be possible, depending on how much stock you have, and how knotty it is. If it's old rafters and purlins, chances are it wasn't the best grade even when new...