Resource scheduling in cloud computing has always been the focus of research, thus the cuckoo algorithm is introduced in this paper to solve the problem of resource allocation. The resource model of cloud computing is described at first. Then, aiming at the problem that this algorithm is easy to cause local optimal value with fast local convergence speed, this model is improved from the following three aspects. Firstly, the variable-length factor is adopted to make the adjustment and reduce difference between the quality of solutions. Secondly, differential mutation strategy is used to update the bird nest's location. Thirdly, chaotic global search and local search are used based on Coelho to avoid the random disturbance of Levy. It is shown through the test functions that the algorithm proposed in this paper has superior performance than the basic cuckoo algorithm, and the Cloudsim simulation platform shows that algorithm in this paper has obvious advantages in the consumption of time, costs and users' satisfaction.