Optimization Theory for Large Systems