Mandatory rationing of water will begin Sunday for 2.1 million residents of the San Francisco area after two consecutive dry winters and a failure of voluntary efforts.

The rationing, approved Thursday evening by the San Francisco Public Utilities Commission, is intended to reduce the consumption of water by 25 percent in San Francisco and 30 municipalities and water districts that buy water from the Hetch Hetchy water system, which is controlled by the city of San Francisco.

The system provides nearly 85 percent of the water used by San Francisco and communities along San Francisco Bay to the south. The system is dependent on runoffs of melted snow from the Sierra Nevada mountains.

The commission is the second agency in the San Francisco area to announce plans this week to impose rationing. The East Bay Municipal Utility District, which serves 1.1 million customers in Berkeley, Contra Costa County and other areas, begins rationing June 1.

San Francisco residents will be notified in the next few weeks of their water allocations, based on use figures in their 1987 water bills, according to Robert Vasconcellos, the resource manager for the San Francisco Water Department. Residents who wish to appeal their allotments may do so through the Water Department.

After a dry winter in 1986, San Franciscans were asked to curb consumption of water voluntarily by 10 percent in 1987. Instead, Vasconcellos said, consumption increased by 6 percent.

"We have to conserve if there is a third dry winter," he said. "If we knew it was going to rain next winter, we wouldn't have to go through this."

The Water Department has issued a list of conservation regulations for residential and business customers in the city and county of San Francisco. Under the plan, all decorative fountains must be turned off, restaurants cannot serve water to patrons unless requested to do so, and hoses cannot be used to clean sidewalks, patios or other paved areas.

The restrictions also call for the recycling of water in air-conditioning units. New buildings must have devices to save water, and new landscaping should require a minimum of water.

The Water Department plans to charge more for water, and penalties will be imposed for exceeding the allotments. The Public Utilities Commission will decide those amounts at a meeting on May 24.

The rationing plan is intended to cut outdoor water use by 60 percent and indoor use by 10 percent.

San Francisco had a similar mandatory program for water rationing in 1977. Water Department officials say rationing will continue until the water emergency passes.