Under Civil Code Section 827 (b) the landlord raising residential rent no more than 10% of that charged the tenant in the rprevious 12 months must give at least 30 days notice regardless of whether the tenancy is month to month or any period of less than a month. If the increase of rent is more than 10% than the minimum notice required is 60 days. Written notice raising the rent can be given by personal service or mail service.
Note that rent cannot be increased in retaliation against the exercise of a protected tenant right.
Also, note if this is in a rent control district it may affect the issue.
The landlord may be able to evict her. Further consult with a local attorney in the San Francisco area would be prudent.
It is likely the landlord will be able to raise rent to market rate, provided he gives proper written notice. The landlord should, if he hasn't already, sent a 6.14 notice to the subtenant pursuant to San Francisco Rules & Regulations - that basically states that the roommate is an unauthorized subtenant.
Disclaimer: You should discuss your situation with a local attorney, as the above statement is a general overview and does not take into account all of the factual considerations in your case. Nothing in this statement creates an attorney-client relationship.