You'll have to clear US customs and immigration when you land in SFO. There is no such thing as 'transiting' the USA.
You can check past wait times to clear immigration
here. Look up the airport and terminal where you will deplane at, and the hour you land and you'll see the min/max wait times for the date interval you choose. Add to this say 30 mins to claim your bag and go through customs. At a
minimum allow 2.5 hours (remembering that you need to be at the departure gate at least 30 mins before your onwards flight) if you get AA or WS onward flight. If it was me, I'd allow at least 3 hours to allow for a delay in arrival of the Qantas flight.
The best airlines for SFO-YVR would be either American Airlines (AA), or Westjet (WS), if you can get a QF code share on the latter; they probably all go via LAX or SEA. Then your bags will be tagged all the way through and you just need to give them to the operatives after clearing customs and walk through to the next departure gate, as you will get your onwards BP when you checked in in Australia. Any other airline you'll need to check in at the airlines' counter after picking up your bags, which will add maybe an hour, allowing for queues, which can be bad.
BTW, if you are flying back home from Canada via the US, remember that you will clear US customs & immigration
in Canada, so allow an extra hour when you check in at your Canadian departure point.