A top Reagan administration official testified on Capitol Hill yesterday that the president wants to cut down on government personnel costs, which he said are amounting to $100 billion a year.

"Certainly people don't feel good about having their pay frozen or their retirement system changed, but we think it's necessary," said Donald J. Devine, director of the Office of Personnel Management. "We can't get the government under control unless we get its personnel under control."

But a phalanx of federal employe unions and members of Congress who represent large numbers of government employes here and elsewhere lined up to attack Reagan's proposals, which are included in the administration's budget package now under scrutiny by several House committees. They warned that economizing at the expense of federal workers is slowly driving the best people from government service.

Testifying before a House task force studying the cost of fixed government "entitlement" programs, including civil service costs, Rep. Steny H. Hoyer (D-Md.) said the Reagan proposals are not meant to tighten the belt.

"They propose to tighten the noose" around the necks of federal workers, Hoyer argued.

Devine outlined proposals to freeze federal pay later this year, increase employe retirement contributions from 7 percent to 11 percent, eliminate cost-of-living adjustments due retirees in 1984 and index government contributions to employe health insurance coverage to the cost of living rather than the actual cost of health care.

He noted that the federal retirement program is more generous than Social Security and most private sector retirement plans and said that making government worker benefits "more defensible" would help improve morale and change the public's negative perception of government employes.

Rep. Michael D. Barnes (D-Md.) called Devine's argument "absolutely remarkable and absolutely ridiculous." Barnes warned that Reagan personnel actions are threatening the ability of federal agencies and the people who staff them to contribute to the nation's economic recovery.

Others who testified argued that the federal retirement system, to which government employes contribute, was set up to be a comprehensive pension system while Social Security was only intended to be a supplemental system.

Rep. Geraldine Ferraro (D-N.Y.), challenging Devine's contention that federal workers are not held in great esteem by the public, blamed their poor image on "the great communicator" in the White House.

"The president gets on television and says time after time that government is bloated," Ferraro said. "Our biggest problem is the president selling that line."

Backing up Devine's call for pension reform was former Rep. Hastings Keith, cochairman of the National Committee on Public Employee Pensions Systems and whose pension from three periods of government employment totals about $65,000 a year. He wants to stop cost-of-living adjustments for those who work after their government retirement and for retirees who receive an annuity above $9,600 a year.

Rep. Brian J. Donnelly (D-Mass.), who chairs the entitlements task force, expressed concern for lower paid government employes, who he said might be hurt by pay freezes, retirement adjustments and other civil service changes. He urged Devine to consider the personnel as well as the fiscal impact of government management.