Performance Modeling and Resource Management for Mapreduce Applications