Added batch sizes for controlling flushing behavior.