SAN JOSE — U.S. District Judge Lucy Koh expressed serious doubts Thursday as to whether $324.5 million is fair compensation for Silicon Valley workers who claim their wages were suppressed by anticompetitive hiring practices.

She grilled plaintiffs attorney Kelly Dermody, a partner with Lieff Cabraser Heimann & Bernstein, who said her firm accepted the settlement after weighing the significant risks of trial.