We consider a Markov-modulated fluid flow queueing model under D-policy. As soon as the fluid level reaches zero, the server becomes idle. During the idle period, fluid arrives from outside according to an underlying continuous time Markov chain (UMC) and the idle server does not process the fluid. We consider two increase patterns of fluid during the idle period: vertical increase (Type-V) and linear increase (Type-L). The idle server is reactivated only when the cumulative fluid level in the system exceeds a predetermined threshold value D. We derive the distributions of fluid level and mean performance measures for both types. We also present cost optimization model to minimize average operating cost per unit time. Copyright © 2011 John Wiley & Sons, Ltd.