I don't ever leave them locked up and the run is 10x10. They only go in to roost and sleep. My math has worked for my personal case because they have yet to have a real issue between each other. I have no problem culling a bully. I didn't have to yet though. Which my vegetarian soft hearted husband is extremely happy about. Haha
That is still not enough space.
The generally-accepted space allotment for backyard chickens -- because we're aiming to provide them with significantly better conditions than commercial farm conditions -- is 4 square feet per bird in the coop PLUS 10 square feet per bird in the run.
For your 17 chickens you should have 68 square feet in the coop, that's about 7 x 10, PLUS 170 square feet in the run, that's about 12 x 15.
Overcrowding sets up for health and behavioral problems.
