When I started teaching in Boston in 1969 I never had a class with under 28 students my first couple of years, and most were over 30. After 3 years of this, I was part of a group of teachers working with BU, and we changed the structure of the how the school was structured and we were able to lower that number so it averaged 22/class.
I can't tell you what a difference it made, not only in how much easier it made for the teachers to do their jobs, but how the kids responded. Not only was discipline light years better, but we sent more kids to the 2 exam schools than any JHS in the city, and our sports teams suddenly were winning city championships.
It was more than just the class size difference, but that was a key part of it