A two-layer model for improving the energy efficiency of file sharing peer-to-peer networks