Ahmed, coming off a Gold Glove season that included greatly improved offensive numbers, gets $3,662,500, a hefty increase from last year's $1,275,000. Peralta receives an even bigger raise to $7 million, up from $3.3 million last season
Ray gets $6.05 million, a raise of $2.1 million, and Lamb receives $4,825,000, a raise of $550,000.
Also reaching one-year agreements were outfielder Steven Souza Jr., ($4,125,000), right-handed starter Taijuan Walker ($5,025,000), right-handed relievers Archie Bradley ($1.83 million) and Matt Andriesen ($920,000) and lefty reliever Andrew Chafin ($1,945,000).
McFarland asked for a raise from $1.1 million to $1,675,000, while the club proposed $1,275,000.
Ahmed hit .234 in 153 games for Arizona last season with 16 homers and 70 RBI, both career highs. Peralta hit .293 with 30 home runs and 87 RBI, also both career bests.
Ray was a 15-game winner two seasons ago but went just 6-2 in 24 starts last season. He has 739 strikeouts in four-plus major league seasons, including 218 in 2016 and 2017. He struck out 165 last season.
Lamb was an All-Star in 2017 with 30 home runs and 105 RBI but was sidelined with season-ending shoulder surgery last August. He appeared in just 56 games, hitting .222 with six homers and 31 RBI.
Souza, acquired in a trade with Tampa Bay last offseason, was slowed by injuries and played in only 72 games, batting .220 with five homers and 29 RBI, down from his 30 homers and 78 RBI the previous season. He receives a raise from $3.55 million.
The hard-throwing Bradley was the team's go-to late-inning setup man and is a leading candidate to be the closer this season. He was 3-5 with a 3.64 ERA last season, down from a 1.73 ERA in 2017.
Chafin was the primarily left-hander out of the bullpen for Arizona, compiling a 3.10 ERA last year. He was 1-6 last season, appearing in 77 games. In four full seasons with the Diamondbacks, Chafin is 7-9 with a 3.52 ERA. He has 210 strikeouts in 249 appearances.
Walker opened the year in the rotation but underwent season-ending Tommy John surgery in April. Despite the injury, he receives a hike from $4,825,000.
Andriese, who came in a midseason trade with Miami, was 0-3 with a 9.00 in 14 appearances with Arizona. Murphy hit .202 in 87 games last season.