Companies are laying off employees and cutting production to counter falling orders and rising inventories.