Both the Sutro Library of the California State Library and the San Francisco Public Library's Magazines and Newspapers Center have excellent resources for doing genealogical research. So how do you chose when and where to go for what you need?
The Sutro Library specializes in genealogical resources for areas outside of California. The library "has one of the largest genealogical collections west of Salt Lake City with extensive resources for states other than California and basic resources for California. The California Section of the California State Library, Sacramento, has more materials for California history and genealogy."
If you are looking for information that is based in California, especially in San Francisco itself, then it's best to come to the San Francisco Public Library!