Motivated by applications in production and computer-communication systems, we study an N -queue polling system, consisting of an inner part and an outer part, and where products receive service in batches. Type-i products arrive at the outer system according to a renewal process and accumulate into a type-i batch. As soon as D i products have accumulated, the batch is forwarded to the inner system where the batch is processed. The service requirement of a type-i batch is independent of its size D i . For this model, we study the problem of determining the combination of batch sizes D (opt) that minimizes a weighted sum of the mean waiting times. This model does not allow for an exact analysis. Therefore, we propose a simple closed-form approximation for D (opt) , and present a numerical approach, based on the recently proposed mean waiting-time approximation in Boon et al. (Perform Eval 68, 290-306, 2011). Extensive numerical experimentation shows that the numerical approach is slightly more accurate than the closed-form solution, while the latter provides explicit insights into the dependence of the optimal batch sizes on the system parameters and into the behavior of the system. As a by-product, we observe near-insensitivity properties of D (opt) , e.g. to higher moments of the interarrival and switch-over time distributions.