Fluids often display dissipative properties. We explore dissipation in theform of bulk viscosity in the cold dark matter fluid. We constrain this modelusing current data from supernovae, baryon acoustic oscillations and the cosmicmicrowave background. Considering the isotropic and homogeneous backgroundonly, viscous dark matter is allowed to have a bulk viscosity $\lesssim 10^7$Pa$\cdot$s, also consistent with the expected integrated Sachs-Wolfe effect(which plagues some models with bulk viscosity). We also investigate thesmall-scale formation of viscous dark matter halos. This analysis placessignificantly stronger constraints on the dark matter viscosity. The existenceof dwarf galaxies is guaranteed only for very small values of the dark matterviscosity, $\lesssim 10^{-3}$ Pa$\cdot$s.