In order to improve the performance of Hadoop, the paper proposed a new scheduling algorithm based on particle swarm optimization. In this paper, the position of particles represent feasible resource scheduling scheme, the cloud computing task completion time and resource load balancing were taken as the objective function, the optimal resource scheduling scheme was obtained by the particle swarm optimization algorithm. The experimental results show that this algorithm can well balanced resource load and reduce the task completion time and effectively improve the performance of the Hadoop platform.