Contraction of the muscles associated with the abdomen can result in collapse and expansion of the air sacs. This forces relatively large volumes of air in and out of the insect through the spiracles, promoting ventilation. This is called active ventilation, in contrast with the more normal gas exchange mechanism of insects, diffusion or passive ventilation. To a small degree, abdominal pumping also promotes gas exchange through the trachea, but the trachea is quite resistant to change in shape.
Abdominal pumping is more important for larger insects such as locusts, which display abdominal pumping almost continuously, but especially when active. In these insects air is sucked in through some spiracles and pumped out through others.