SAN FRANCISCO — The maddening quest for street parking is not just a tribulation for drivers, but a trial for cities. As much as a third of the traffic in some areas has been attributed to drivers circling as they hunt for spaces. The wearying tradition takes a toll in lost time, polluted air and, when drivers despair, double-parked cars that clog traffic even more.

But San Francisco is trying to shorten the hunt with an ambitious experiment that aims to make sure that there is always at least one empty parking spot available on every block that has meters. The program, which uses new technology and the law of supply and demand, raises the price of parking on the city’s most crowded blocks and lowers it on its emptiest blocks. While the new prices are still being phased in — the most expensive spots have risen to $4.50 an hour, but could reach $6 — preliminary data suggests that the change may be having a positive effect in some areas.

Change can already be seen on a stretch of Drumm Street downtown near the Embarcadero and the popular restaurants at the Ferry Building. Last summer it was nearly impossible to find spots there. But after the city gradually raised the price of parking to $4.50 an hour from $3.50, high-tech sensors embedded in the street showed that spots were available a little more often — leaving a welcome space the other day for the silver Toyota Corolla driven by Victor Chew, a salesman for a commercial dishwasher company who frequently parks in the area.