University of South Florida, Computer Science and Engineering, Tampa, FL 33620
The current method used by content providers to distribute large media files is the client-server model where one or more server computers at a data center distribute files to multiple client computers via the Internet. The large number of servers required to support an ever increasing number of clients leads to energy hungry data centers. In 2005 data centers consumed about 1.2% of all electricity in the US at a cost of about $2.7 billion. Content providers are actively exploring the use of peer-to-peer (p2p) technologies, such as BitTorrent, to distribute legal content to homes as a means of reducing both file download times and the energy consumption of data centers. This approach pushes the energy use out of the data centers and into the homes of content consumers (who now act as both consumers and distributers). We envision a future where households have dedicated “file sharing units” owned by the content provider. These file sharing units might use BitTorrent, or a similar protocol. Our work focuses on how the BitTorrent protocol could be changed to enable clients to sleep, saving energy when not in active use. The current BitTorrent protocol does not allow clients to sleep. A BitTorrent network, or swarm, consists of peers which are clients interested in acquiring a particular file. Unlike traditional client-server file transfer, the primary unit of transfer in BitTorrent is not the file itself but pieces of which a file is composed. A peer that has all the pieces of a file is called a seed, while peers that do not yet have all pieces are leeches. A notable difference between BitTorrent and client-server is a leech’s ability to contribute to the swarm by uploading the pieces it does have to other leeches (even though it does not yet have a complete copy of the file). The BitTorrent protocol requires peers to maintain state information of the peers they are connected to in a peer list. Currently, when a peer goes to sleep, its TCP connection to other peers drop and the other peers remove its entry from their peer list essentially “forgetting” that the peer ever existed. In this first ever investigation of the feasibility of power management for BitTorrent clients, we show that simple changes to BitTorrent comprising the addition of long-lived knowledge of sleeping peers and a new wake-up semantic can enable clients to sleep when inactive yet remain responsive swarm members. In our new method, when a seed is not actively uploading to another peer it goes to sleep, first ensuring that a stable state is propagated throughout the swarm using standard BitTorrent protocol control messages. By modifying the behavior of the BitTorrent client to flag a disconnecting peer as asleep instead of removing its entry from the peer list, we maintain knowledge of sleeping peers throughout the swarm. If the resources of the sleeping peer are later needed, a peer can wake it up and restore the TCP connection; communications then continues as normal. In order to measure the energy savings of our method we created an ns2 simulation. Our simulation involved the distribution of a 10 MB file in a 51 peer swarm with each peer having a 10 Mb/s downlink and a 2 Mb/s uplink. An initial peer remained awake throughout the simulation. Several experiments were performed, each one varying the mean interarrival rate (exponentially distributed to model Poisson arrival of peers) of the remaining 50 peers as 0, 2, 4, 6, 8, 10, 20, 30, 60, 120, 180, or 240 seconds. For a swarm size of 51 clients, we showed that energy savings of 46% are achievable at a performance penalty of 36% in increased download time. We believe this initial result can be further improved. Assuming that half the households in the US were to host a file sharing unit running BitTorrent, implementing our proposed changes could reduce the energy costs for content distribution by over $1 billion a year (assuming 50 W per file sharing unit, 50 million households, 46% sleep time per day, and $0.10 per kWh).
This work has been partially supported by the National Science Foundation under grant No. 0754537, "An REU Site in Computer Science and Engineering".
[Abstract (PDF)]