Please note that the "5 koku pet farmer" thing was an idea that I was putting forward to show that there were ways to make the books balance if we had to fudge things. It is NOT yet a confirmed part of the worldbuilding. I'm talking to the others about it.
It all depends how big you want to make Leaf itself. Assuming Hidden Leaf has a population of 28,500 Civilians (@2 koku food consumption per civ / year, Leaf civilians are reasonably well-fed) and 1500 ninja (@10 koku food consumption per ninja / year, ninjas have near-peak human physiques and consume pro-athlete levels of food during missions), and that Hidden Leaf is mostly but not completely self-sufficient (say 80%, 60,000 koku supply vs 72,000 of demand), the walls of Leaf would have to encompass:
@10 koku (Baseline medieval productivity) per hectare per year: 6000 hectares, 60 sq. kilometers or a circle of radius 4.3 km (8.6km diameter, so walking across Leaf takes ~1 hr 45 min for civs)
@25 koku (2.5x medieval, 5 koku / farmer) per hectare per year: 2400 hectares, 24 sq. kilometers or a circle of radius 2.8 km (5.6km diameter, walk takes ~1 hr 10 mins)
@50 koku (5x medieval) per hectare per year: 1200 hectares, 12 sq. kilometers or a circle of radius 2 km (4km diameter, walk takes ~45 min)
Add 20-40% to the values to account for non-farmland. There was a lot of variation in medieval city sizes, I think anything above 15 koku per hectare could be defensible.