Suppose you take a fraction S of city's residential surface area and build it up by H times average residential height. Housing volume increases by S * H. Most housing in SF is merely 2 stories high. Let's assume average is 3 stories. Now, pick 1% of city's residential area and build it up by adding 30 stories, say from 3 to 33. Note that 33 stories is actually smaller than a few existing tall residential structures in SF [1]. This would give relative increase in housing volume by S * H = 1% * 10 = 10% which given SF's population of >880k [2] amounts to >88k increase in housing capacity. This is more than the entire global workforce of Google [3].
It's a lot of construction work, of course, but it looks feasible. Many cities build a lot higher and on a wider area than the figures above.
[1] https://en.wikipedia.org/wiki/Category:Residential_skyscrape...
[2] 884,363 (2017), https://en.wikipedia.org/wiki/San_Francisco
[3] 85,050 (Q1 2018), https://en.wikipedia.org/wiki/Google
Edit: formatting and correction