Workload prediction is the necessary factor in the cloud data center for maintaining the elasticity and scalability of resources. However, the accuracy of workload prediction is very low, because of redundancy, noise, and low accuracy for workload prediction in cloud data center. Therefore, in this article, a tree hierarchical deep convolutional neural network (T-CNN) optimized with sheep flock optimization algorithm based work load prediction is proposed for sustainable cloud data centers. Initially, the historical data from the cloud data center is preprocessed using kernel correlation method. The proposed T-CNN approach is used for workload prediction in dynamic cloud environment. The weight parameters of the T-CNN model are optimized by sheep flock optimization algorithm. The proposed COSCO2 method has accurately predicts the upcoming workload and reduces extravagant power consumption at cloud data centers. The proposed approach is evaluated utilizing two benchmark datasets:(i) NASA, (ii) Saskatchewan HTTP traces. The simulation of this model is implemented in java tool and the parameters are calculated. From the simulation, the proposed method attains 20.