We study the effect of varying sound speed on clustering dark energy in the Dirac–Born–Infeld (DBI) scenario. The DBI action is included in the class of -essence models, and it has an important role in describing the effective degrees of freedom of D-branes in the string theory. In the DBI setup, we take the anti-de Sitter (AdS) warp factor , and investigate the self-interacting quartic potential . We calculate the full expression of the effective sound speed for our model, and show that it can evolve with time during the cosmological evolution. Besides, the adiabatic sound speed evolves with time here, and this influences the background dynamics to some extent. We show that the effective sound speed is very close to the adiabatic sound speed. We examine the effect of the variable sound speed on growth of the perturbations in both the linear and non-linear regimes. In the linear regime, we apply the Pseudo-Newtonian formalism, and show that dark energy suppresses the growth of perturbations at low redshifts. From study of the Integrated Sachs–Wolfe (ISW) effect in our setup, we see that the model manifests some deviation from the concordance CDM model. In the non-linear regime, we follow the approach of spherical collapse model, and calculate the linear overdensity , the virial overdensity , overdensity at the turn around and the rate of expansion of collapsed region . Our results imply that the provided values of , , and in our clustering DBI dark energy model approach the fiducial value in the EdS universe at high enough redshifts. We further compute relative number density of halo objects above a given mass in our setting, and show that the number of structures with respect to the CDM model is reduced more in the high mass tail at high redshifts.