As the data-rate of the optical fiber communication system evolves to 400 Gb/s or even 1 Tb/s, higher requirements are put forward for transmission rate and repeater distance. To meet the requirements, further decreasing the optical fiber attenuation coefficient is one of the effective methods. In this paper, we did research on the relationship between the distribution of elements and frozen-in stress in the core layer and the cladding. Subsequently, their effect on optical fiber attenuation is also investigated. The results show that the co-doping of germanium, fluorine, and chlorine in the core layer can improve the stress matching between the core layer and the optical cladding. In addition, based on our research, the outer cladding with a high softening point can restrain the stress mismatch between the core layer and the optical cladding. Furthermore, the thickness of the second cladding will also affect the stress mismatch. Eventually, ultra-low loss fibers with the optimal attenuation of 0.156 dB/km at 1550 nm were prepared successfully by analyzing the stress distribution inside the optical fiber and adjusting the doping amount of germanium, fluorine, chlorine and other elements in the core layer, optical cladding, and outer cladding to maintain that the core layer and the optical cladding share the same stress.