The gills can be swept back and fro to mix water, and thereby alleviate the problem of local oxygen depletion. This arrangement is the source of the tracheal gill theory in arguments over the evolution of insect flight. Gills extract oxygen from surrounding water. Due to its low diffusion rate in water, oxygen can be depleted from water immediately local to respiratory surfaces. Moving water for this purpose is called ventilation of the gills.
Some insect ventilate their gills by selecting a microhabitat where water is flowing.
Still others ventilate by muscular action. This can require considerable energy expenditure because water has greater density and viscosity than does air. The oxygen costs of ventilation must be more than offset by oxygen gains. Work on caddis fly larvae illustrates the point. In the experiments, metabolic rates of caddis fly larvae increased when water current velocities decreased.