To solve the difficulties in allocating buffers for unreliable large production lines, this paper investigated a model combining the genetic algorithm with the discrete event system simulation method. In the simulation method, times-to-failure of an unreliable large production line is assumed to follow exponential distribution, whereas times-to-repair and times-to-processing are set to follow an Erlang-k distribution. Using a genetic algorithm based on special position-based mapping means and elitist protection strategy, the buffer configuration of an auto-body welding line is optimized. The simulation of the optimized configuration shows that the performance of the production line, such as productivity and the main average utilization of the workstations, is much improved. This model can optimize the allocation of buffers for unreliable large production lines effectively.