Is it a good idea to rent out individual rooms? Nope. Sure if all goes well, you are making collecting more in rent than by renting out the rental unit as a single rental, but the potential problems are usually not worth it. Especially in a city in San Francisco where tenant protections are strong. Can you imagine having to do multiple evictions of non-rent paying tenants? Paying thousands of dollars in attorney fees (not to mention the lost rent) over a room rental that is $1,000-$1,800/month? Do you remember your old roommate days? I hated living with roommates. When unpleasant situations arises, the landlord does not hear the end of it. So and so is too loud, too dirty, parties, brings home guests, ate my food, etc. Who wants to be the mother hen to grown people? Not me.
The only situation I would say renting out individual rooms can be ok is if the landlord also lives in the unit. If the landlord and renter shares a kitchen or bathroom, then the San Francisco just cause ordinance does not apply. In that situation, the tenant is less likely to fight a lease termination.