Tuning and Predicting Consistency in Distributed Storage Systems