Dynamic Data Layout Optimization with Worst-case Guarantees