HOUSTON -- Matt Barnes took over for starter Rick Porcello with one out in the seventh inning and runners at first and second base here Sunday.

With Boston leading by three runs, he induced two groundball outs to escape the jam. He then pitched a perfect eighth inning to help the Red Sox win 9-3 over the Astros at Minute Maid Park.

This is a different Matt Barnes in 2018. Just look at the home/road splits.

He has a 1.76 ERA (three earned runs, 15 1/3 innings) on the road after he posted a 5.28 ERA (18 earned runs, 30 2/3 innings) in away games during 2017.

He averaged 4.2 walked per nine innings in 2016, 3.6 walks in 2017 and has averaged 4.2 walks this season.

But he hasn't walked anyone while striking out 12 over his past eight outings (nine innings).

He's throwing strikes. He's getting ahead in counts.

This Matt Barnes can sustain his dominance throughout an entire season after he failed to do so both in 2016 and '17. Then-manager John Farrell used Barnes as his eighth inning setup man during the first half last year. But Barnes' season did such a 180 -- he posted a 5.59 ERA during September -- that Farrell and Dave Dombrowski kept him off the ALDS roster.

Similarly, he posted a 2.93 ERA in 43 innings during the first half in 2016, then recorded a 6.08 ERA in 23 2/3 innings during the second half.

"One of the things is obviously trying to be more aggressive, trying to make guys hit the ball, but at the same time trying to execute pitches," Barnes said about his success on the road this year.

But it's not just approach. He tweaked his mechanics during the first month. That's leading to better results home and away.

"So you saw the first three weeks. I was still walking guys at a really high rate," he said. "And part of that was because mechanically I wasn't really in sync and wasn't feeling great for the first two weeks. And then the next two weeks, we knew where we needed to get to. But it was that two-week process where you actually need to be able to make the adjustment and get to where you want to be."

Why is it sustainable this season? He understands the feel of his mechanics well. He can easily get back in sync if he gets out of sync.

"We finally got to the point where it's the best position for me to maximize my stuff," he said. "And I finally feel I can repeat it consistently. And when I get out of it, I know exactly how to get back to it."

He and the pitching coaches watched a couple outings from 2016.

"Specifically one against the Yankees where I thought it was the best I've ever had," Barnes said. "And we kind of compared that to video this year and last year; and what were my mechanics like then? I thought in '16 I had really good stuff. But I wasn't necessarily completely sure how to pitch in the big leagues and pitch as a reliever.

"I think I'm kind of to the point where I have stuff that I think it's better than it was then," Barnes said. "But velocity is back to where it was then combined with having a better idea of how to pitch in the big leagues and knowing how to pitch to guys in situations."