a stretching window algorithm to suit the tit-for-tat mech-
anism. Youmna Borghol et al. [18] presented an adaptive
window-based piece selection policy, with each peer
dynamically computing its window size. In addition to
the probabilistic and window-based approaches, LiveBT
[20] used a Most-wanted-Block-Download-First (MBDF)
scheme and a fast rescheduling scheme to enable BitTor-
rent to support VoD streaming service. Our previous work
[21] tried to solve this problem at the swarm level, rather
than at the peer level. Unlike most of the abovementioned
work that simply modifies the piece selection policy to al-
low BitTorrent to support streaming service, we modified
not only the piece selection policy but also the peer selec-
tion policy to provide better streaming service in hybrid
BitTorrent systems with both downloading and streaming
peers. As for piece selection policy, which is different from
existing window-based piece selection policies, we use dif-
ferent policies in and out of the window. The sequential
policy is used in the buffer window, and the rarest-first pol-
icy is used outside it.
Lucia D’Acunto et al. [25] extended a BitTorrent-like peer
selection mechanism with techniques that allow peers to
relax their reciprocity-based peer selection and upload
pieces to more random nodes. Zhenhua Li et al. [24]
designed an ‘‘Urgent Line’’ mechanism for every node to pre-
dict which pieces are likely to be missed and prefetch them.
However, these two mechanisms were not designed for
BitTorrent-based streaming service in hybrid swarms with
both downloading and streaming peers. Yang et al. [16] pro-
posed using LLP-P as a peer selection policy to better utilize
peers’ upload capacity and a DAS scheduling approach for
the service scheduling problem in a BitTorrent-like VoD sys-
tem. DAS changes peers’ policy of deciding which request to
serve, while our work changes the piece selection policy to
decide which piece to request next. For the peer selection
approach, contrary to LLP-P [16] and iPass [17], our ap-
proach is simple and easy to implement. We also make some
changes to consider hybrid swarms with both downloading
and streaming peers. Our work concentrates on providing
VoD service in BitTorrent systems with both downloading
and streaming peers coexisting, while Yang et al. [16]’s pro-
posal failed to solve this problem.
Although great efforts have been made to develop a Bit-
Torrent-based VoD system, until now, little progress has
been made in the area of hybrid BitTorrent swarms that
accommodate downloading peers and streaming peers
simultaneously. Further, most of these works have not
been evaluated with a real, large-scale BitTorrent system
measurement. Considering the complexity of P2P systems,
it is insufficient to evaluate P2P strategies with simulations
alone. In this paper, a comparison of policy performances is
conducted using measurement results from PlanetLab. Bi-
ToS [10] is chosen as a reference policy due to its easiness
and clearness of implementation. The results of the evalu-
ation presented in Section 6 show that our method
performs better than BiToS.
3. Measurement
This section aims to investigate the demands and
potential problems of the BitTorrent-based VoD system.
We analyze the content properties of a BitTorrent system
in Section 3.1, exploring the potential and challenges of
the BitTorrent-based streaming service. In Section 3.2,we
run real P2P file transference on PlanetLab using a modi-
fied Ctorrent, and compare the performances of the
Ctorrent with different piece selection policies.
3.1. BitTorrent video file measurement
In this subsection, we focus on exploring the content
properties of the BitTorrent system, as well as the poten-
tial and challenges of the BitTorrent-based streaming ser-
vice. Although measurement work on BitTorrent [8]
already exists, we believe that new measurement results
will be more precise because the network environment
changes rapidly. Our measurement results indicate that
video files are popular in BitTorrent swarms, and video
files now shared using BitTorrent are much larger than
those shared in other VoD applications, such as YouTube
[13] and PPVA [14]. This offers more opportunities and
challenges for a BitTorrent-based VoD system.
This study analyzes ByrBT,
3
the most popular BitTor-
rent site in CERNET2
4
(The Second Generation China Educa-
tion and Research Network). ByrBT has more than 48,000
registered users, contains 17,831 torrent files and uses a
customized uTorrent
5
as the BitTorrent client. The torrent
files and system logs were traced from its website on July
2nd, 2010.
Among the 17,831 torrent files, 12,600 video torrents
comprise 70% of the total. As we can see, video files are
the most popular files shared in the BitTorrent system.
Fig. 1(a) shows the cumulative distribution of the torrents’
sharing file sizes. Video files are larger than non-video files
on average (1405 MB median file size for video files and
549 MB for non-video files). The size of a BitTorrent shared
video file is also larger than it was in 2008 [21] (696 MB
median file size). The file distribution in BitTorrent swarms
is shown in Fig. 1(b), providing evidence that multi-file
content is very popular in both types of BitTorrent swarms
and that fewer than 30% of torrents consist of a single file.
Fig. 1(c) depicts the cumulative distribution of file sizes.
The size of single non-video content files is relatively small,
with a mean size of 32 MB; only 3.5% of non-video content
files are larger than 100 MB. The median object size of vi-
deo files is approximately 162 MB, and 65% of video con-
tent files are larger than 100 MB. Moreover, 6.6% of the
video files have sizes larger than 1 GB, and the size of some
Blu-ray videos reaches nearly 23 GB. In contrast, YouTube’s
median content size is just 8 MB [13]; that of PPVA is
15 MB [14]. YouTube
6
has a small median video size be-
cause most videos are user-generated short videos and be-
cause videos uploaded by standard account holders are
limited to 15 min in duration. Furthermore, YouTube videos
3
http://bt.byr.cn.
4
CERNET2 (http://www.cernet2.edu.cn/) is the largest next-generation
Internet backbone. It is the core network of the China next-generation
Internet demonstration project CNGI and is the only nationwide academic
network. To date, it is the world’s largest native IPv6 backbone.
5
http://www.utorrent.com.
6
http://www.youtube.com.
Z. Ma et al. / Computer Networks 56 (2012) 1103–1117
1105