I think half hour is good, maybe a little less for 2.5 year old if it's a one in one. As much as they want I would do it. DS swims twice a week now and we would do more if time allowed. In the summer he does intensive which is 4x a week for half hour. There are usually one or two other kids so he does get breaks on the wall.
We have always done small group lessons of 3 kids per instructor. They are 40 minutes and meet for 2 weeks, 5 days a week. Last year DS1 did really well and I wished I had signed up for the session right after but it was full. I think doing it everyday is best for repetitive ness.
DD1 did a swim camp last summer that was 1/2 hour, 4 times a week for 2 weeks. She was 6 at the time. I will say, having those 2 weeks was really beneficial in building on the concepts from the previous lesson. It was a good starting point for her. I think that would be a lot all summer long, but for those 2 weeks in worked. She is in lessons now that is 1/2 hour once a week. I think 2 or 3 times a week would ideal.