How to Optimize Cloud Stacking Structures