Spanwise heterogeneous surfaces have been found to modulate local turbulent entrainment by inducing large-scale secondary flows (SFs). This work aims to clarify the variations of the local and total entrainment fluxes with the intensity of SF. The SF intensity is controlled by the spanwise spacing between adjacent ridge-type roughness elements s. It is found that, for the two components of turbulent entrainment (nibbling and engulfment), their local fluxes grow rapidly with the SF intensity in the downwash regions; asymmetrically, both fluxes decline slowly and then become relatively stable in the upwash regions. In other words, the downwash flow is more effective in modulating the local entrainment flux than the upwash flow. Therefore, the largest total entrainment flux would be induced at s≈δ, where the SF intensity is the largest (δ is the boundary layer thickness). Moreover, the emergence of the tertiary flow when s≳2δ would lower the local entrainment flux, and reduce the total flux to the same level of the homogeneous roughness. Therefore, it is deduced that a heterogeneous surface with a large roughness-element spacing could not enhance the total entrainment flux.