Optimizing Memory and Storage Disaggregation for Data-intensive Systems