In machining metals, surface roughness is due to