A dynamic deficit round-robin (DDRR) scheduling scheme for variable-length Packets is proposed, It can resolve the drawback of the conventional deficit round-robin (DRR) scheduler that short-packet delay performance and high throughput cannot be satisfied simultaneously. DDRR uses an adaptive granularity for the deficit counter, where the granularity is dynamically changed according to packet lengths in queues. The algorithm, along with the simulation results showing the efficiency, are presented. The DDRR scheduler was implemented for 5Tbit/s switching system.