Fine-grained energy-efficient consolidation in SDN networks and devices