Determine max block size automatically.