A federal judge's threat last week to hold Mayor Marion Barry in contempt of court for conditions at the D.C. Jail has again focused attention on serious overcrowding in the city's central correctional facility.

The overcrowding, a variety of officials agree, is the inevitable result of actions that city officials, with public support, have taken to crack down on crime. Police are arresting more narcotics offenders than ever; the City Council has amended the bail law, making it easier for judges and prosecutors to detain defendants awaiting trial, and judges are giving offenders stricter sentences. In addition, the city's parole board is releasing fewer prisoners on parole.

Yet, while the public supports the crackdown on criminals, it is reluctant to increase taxes to pay for the additional burden on correctional facilities, city officials said.

More than 2,400 inmates, for example, are stacked two each in 7-by 10-foot cells in a city jail that was built to house 1,355 prisoners in single cells. Scores of others are on bunk beds, squeezed into any available corner because there is no room despite the doubling up in cells.

The prisoners are let out into the prison yard for an hour and a half each week. They come out of their cells three times a day for two hours at a time to walk around the cellblock.

"It ain't right, we're practically stepping on each others' feet," one inmate said in a recent interview.

"We don't do nothin' but sit around doin' nothin' ," said the inmate, Nathan Kebe, a 20-year-old maintenance worker from Southeast Washington, held for the last 17 months because he could not post bond while waiting to be tried on robbery charges.

U.S. District Court Senior Judge William B. Bryant, who has been presiding over a 12-year-long suit on jail conditions, said last week that city officials are in violation of the strict conditions he set last year when, in response to severe overcrowding, he "reluctantly" allowed putting two inmates in a cell, or "double-celling."

Bryant at that time ordered that no one be double-celled for more than 12 hours in any day and for no more than 30 days. He said last week that "obviously neither thing has happened."

But the problem that Bryant and the city face is one that defies an easy solution. Any solution, whether to build new jail space or use halfway houses and other punishments short of jail, will cost the city millions of dollars.

With the recent mandatory-minimum sentencing initiative passed overwhelmingly by D.C. voters, the situation is bound to get worse, officials said.

Corrections director James Palmer recently summarized his predicament: "I've got some judges sending me a lot of people and telling me that if I don't put them in jail I'll join them. I've got other judges saying I've got too many people in jail and if I don't stop putting them in, I'll join them."

The Mayor's Commission on Crime and Justice has called projections of further increases in the inmate population here "frightening."

The city, which spends nearly $100 million a year to house inmates at the jail, in Lorton, and in federal institutions, last year opened a 450-bed facility on the grounds of the Lorton Reformatory to relieve overcrowding. It barely made a dent in the situation.

City officials have proposed refurbishing other Lorton facilities to handle another 900 inmates, but the $12 million for that reconstruction has not been budgeted and, even if the money is forthcoming, the facilities will not be completed until 1986, Bryant pointed out.

And even those facilities, he added, "would not even provide spaces for the present excess population at the jail, much less the excess population which can be reasonably anticipated 2 1/2 years from now."

Bryant threatened last week to take matters into his own hands by setting a limit on the number of prisoners who could be housed in the jail. He ordered corrections officials to submit suggestions next week on whether there should be a cap, and what the ceiling should be.

Corrections officials said after the ruling that they probably would propose a ceiling of 1,500 to 1,600 inmates. They said that they had no idea where the other 900 inmates would be housed.

The District, according to corrections department figures, incarcerates more people compared to its crime rate than any other U.S. city of similar size: twice as many as such cities as Buffalo, San Francisco and Detroit and more than four times Denver and Boston.

Two years ago, police began sweeping drug offenders off the streets. So far, the police narcotics task force has netted more than 6,000 arrests, in addition to massive numbers of random drug arrests made each year by other officers. The percentage of inmates facing drug charges jumped from about 12 percent in 1981 to about 20 percent in 1982.

Last year, the council amended the city's bail law, making it easier for judges and prosecutors to hold defendants pending trial. The result, law enforcement officials said, is an increase of more than 200 defendants in the jail awaiting trial.

At the same time, statistics show that judicial patience with repeat offenders and perpetrators of violent crimes has grown exceedingly thin.

D.C. Superior Court judges last year ordered nearly 5,000 defendants held in jail to await trial on high money bonds or without bond, 25 percent more than in 1981. They also revoked three times as many probations as in 1978, meaning that hundreds of convicted offenders who earlier had been released under court conditions were sent back to jail or prison.

Meanwhile, the city's parole board is releasing fewer offenders from prison. Corrections figures show that 73 percent of inmates interviewed by the parole board were released at their first hearing in 1980. The percentage being released dropped to 65 percent in 1981. Parole revocations increased by 20 percent in the same period.

The increased sentences and tougher parole measures mean that fewer people get out of Lorton. And that simply increases the backup of sentenced felons waiting in the jail to go to Lorton.

Among the 2,400 inmates in the jail are some 700 sentenced felons (up from 150 in January 1980) who cannot be sent to Lorton because corrections officials are under another court order limiting the inmate population at Lorton to avoid overcrowding there.

Corrections officials say Bryant recognizes that police, prosecutors and judges control the jail population. They say that this is why Bryant called on Barry to reduce overcrowding, calling him the "best person in a situation to . . . coordinate emergency remedial efforts."

But Barry is dealing with a badly splintered system in which each element jealously guards its prerogatives.

Police officials acknowledge that their arrests have contributed to overcrowding, but say they have no choice in the face of public pressure to make the streets safe.

"We've got to clean these streets," said assistant police chief Marty Tapscott, head of police operations. "We can't back off. The public won't let us back off."

Prosecutors using the new bail laws have become more aggressive than ever in putting defendants behind bars, both before trial and after conviction, and have toughened plea bargaining. They recognize that their efforts increase the burden on prison facilities, but insist that they, too, must enforce the law.

"Corrections problems can't affect our decisions," said U.S. Attorney Stanley S. Harris. "We don't generate our cases, they come to us."

Judges, aware that their decisions are increasing the jail population, say that they must treat each case on its merits and cannot tailor their decisions to prison conditions.

"We can't control the police bringing criminals in off the street," says D.C. Superior Court Chief Judge H. Carl Moultrie I. "If crimes are committed, it's their job to bring them in. Our job is to dispense justice when they come in. And if that means overcrowding at the jail, that's overcrowding at the jail. That is the City Council and the jail's problem, not ours."

City Council members and administration officials said in recent interviews they believe that too many non-dangerous offenders are being locked up. A recent corrections department report estimated that more than 500 of those detained at the jail could be released without endangering the community. But judges point out that they are sentencing record numbers of defendants to probation.

"If we sent everybody to jail that came in here on a drug situation," Moultrie said, "you talk about being overcrowded--there'd be no word for it."

Every branch of the criminal justice system contends that it is doing what the public demands.

"Somehow the responsible leaders in the community have got to make the community understand that to do all the things you want in the best fashion, it's going to cost more money," said D.C. Superior Court Judge Fred B. Ugast. "Are you willing to pay more taxes? Are you willing to have some other facet of the city budget cut back? That is the dilemma that the city faces and it's the dilemma that the taxpayer has to face. You can't have it all."