In this paper we consider a k-out-of-n: G system with repair under D-policy. According to this policy whenever the workload exceeds a threshold D a server is called for repair and starts repair one at a time. He is sent back as soon as all the failed units are repaired. The repaired units are assumed to be as good as new. The repair time and failure time distributions are assumed to be exponential. We obtain the system state distribution, system reliability, expected length of time the server is continuously available, expected number of times the system is down in a cycle and several other measures of performance. We compute the optimal D value which maximizes a suitably defined cost function.