An Asymptotically Optimal Scheme
for P2P File Sharing
Panayotis Antoniadis Costas Courcoubetis Richard Weber
Athens University of Economics and Business
Centre for Mathematical Sciences, Cambridge, UK Athens University of Economics and Business
Contents
• A public good model for p2p
• Simple contribution policies with exclusions • An application to file sharing
– heterogeneous file popularity – stability
– group formation – adaptation
A model for p2p file sharing
• Resource allocation in p2p file sharing is a
public good
problem
– all peers benefit from the contribution of any single peer
– downloading a file by one peer does not prevent another peer from downloading the same file (no congestion effects)
– but contribution is costly
– positive externality creates an incentive to free-ride on efforts of others
– a peer’s incentive is to offer a few files in the common pool and requests lots of downloads from others
H
Q
u
ii
(
),
θ
is
iid
with
distributi
on
θ
peer i: benefit =
cost = fi = payment in “kind”
Implications
• Implication: “free market” solution is inefficient
– each peer maximizes own net benefit – actions affect others
– hence private optimum differs from social optimum
• Need regulation: use prices or rules to influence behaviour
– incentives for each peer reflect the effect it has on others – example of a rule: downloads = uploads
• Problem: optimal design requires information on user types
– under full info: personalized price/rule for each peer – “first-best” policy
• Existing approaches based on heuristics
What to do?
• How can the system/planner/network manager get the required information to design optimal contribution rules?
– if lucky, can gather personalized data about users
– otherwise, users must be given incentives to reveal relevant information to planner
• Mechanism Design: set prices/rules to encourage users to act truthfully, maximize social welfare
– Well-developed economic theory; but solutions typically
• very complex, dependent on fine details
• require large amounts of info to be passed to centre • “second-best” policy
Large systems are simpler!
• Size helps!
– simplifies mechanism, limits per capita efficiency loss • Theorem: A very simple mechanism
“contribute f if join, 0 otherwise”
is nearly optimal when the network is large
• Why?
– in a large network it is hard to get people pay more than a minimum
• Other major benefits:
– Low informational requirements, easy to apply in a large class of examples
Some formulas for SW…
)
(
)
(
)
(
1 0yh
y
dy
u
Q
c
Q
n
SW
⎟
−
⎠
⎞
⎜
⎝
⎛
=
∫
No contributions, system of size
Q
Fixed contributions covering cost, system of size
Q
∑
] [ i Eθ
)
(
)
(
)
(
1Q
c
Q
u
dy
y
yh
n
SW
⎟
−
⎠
⎞
⎜
⎝
⎛
=
∫
θ0
)
(
)
(
)]
(
1
[
−
H
u
Q
−
c
Q
≥
n
θ
θ
expected number of participants feeθ
1 ) ( 1−H θh
0Theorem
)
(
)
(
)
(
max
1 0 ], 1 , 0 [n
yh
y
dy
u
Q
c
Q
P
Q⎟
⎠
−
⎞
⎜
⎝
⎛
=
∫
≥ ∈ θ θ0
)
(
)
(
)]
(
1
[
−
H
u
Q
−
c
Q
≥
n
θ
θ
subject to
Let maximize
Q
*,
θ
*Then, the policy:
each participating peer contributes
achieves
)
(
* *Q
u
f
=
θ
θ
1 ) ( 1−H θ)
(
n
o
P
P
P
≤
SB≤
+
SBExample
]
1
,
0
[
in
uniform
,
)
(
,
6
.
0
)
(
Q
Q
1/2c
Q
Q
iu
=
=
θ
Solution:
θ
*=
1
/
4
,
Q
*=
0
.
0126
n
2,
SW
=
0
.
006328
n
2• satisfaction of cost coverage constraint:
reduction of SW by 43%
6 . 0 max 1 2 0 ], 1 , 0 [ Q n ydy⎟⎠ Q −Q ⎞ ⎜ ⎝ ⎛∫
≥ ∈ θ θ 0 6 . 0 ] 1 [ . .t n − Q2 −Q ≥ s θ θFile sharing
•
Q
: expected number of distinct files• peer
i
: utility = , cost = = number of files provided to the system• randomly chosen from
N
files• Solve
)
(
Q
u
iθ
f
i if
∑
=
−
≈
−F N if
F
e
N
F
Q
(
)
(
1
/),
where
F
F
Q
u
dy
y
yh
n
F⎟
⎠
−
⎞
⎜
⎝
⎛
∫
≥ ∈max
(
))
(
(
))
1 0 ], 1 , 0 [ θ θ0
))
(
(
)]
(
1
[
−
H
u
Q
F
−
F
≥
n
θ
θ
subject to
The function
F(Q)
)
(
Q
F
Q
N
=10,000
Heterogeneous file popularity
• General case:
– specify contributions • Interesting case:
• Then, provide both types only if • Optimum contribution is a scalar
– a peer can provide any combination
– measuring rate of uploads is a good proxy
2 1 2 1
,
)
(
F
F
bF
F
c
=
+
),
(
aF
1F
2u
+
)
,
(
),
,
(
F
1F
2c
F
1F
2u
* 2 * 1,
f
f
* 2 1f
f
af
+
=
.
.
,
2, 1f
s
t
f
1 F 2 F : popular content: less popular content
b
a
=
*
Stability
• Assume contribution fixed
• Participation decision: based on prior expectation regarding total content availability
F
• Will be reached? * f *
F
rounds k k +1 k X Xk+1 content)
,
(
* 1b
X
f
X
k+=
k * 2 F F = 1 F0
)
(
=
−
b
y
y
stability ifX
0≥
F
1Group formation (1/5)
• Assume peers of different sub-types
• Type A: (e.g. ISDN users) • Type B: (e.g. DSL users) • Do they gain more by
– forming 2 distinct groups vs forming a larger group?
– being distinguished by the system in the larger group?
]
5
.
0
,
0
[
~
A iθ
]
1
,
5
.
0
[
~
B iθ
A B A+B• Group A: (e.g. ISDN users)
• Group B: (e.g. DSL users)
] 5 . 0 , 0 [ ~ A i
θ
] 1 , 5 . 0 [ ~ B iθ
Assume that the percentage of each group in the mix is 50% (n=1000)
62500 51768 38452 Total 31250 (-11%) 31249 (+ 848%) Distinguishable 44792 (+ 27%) 6976 (+ 111%) Indistinguishable 35156 3296 Distinct groups Group B Group A Welfare
Group formation (2/5)
Group formation (3/5)
Group formation (4/5)
200 400 600 800 0.8 1.2 1.4 1.6 1.8 2 2.2 200 400 600 800 1.05 1.1 1.15 Group A Group B N NGroup formation (5/5)
• How to provide better incentives for both types to combine and reveal their types?
– reduce cost of heavy users by limiting upload rates – reduce fees of heavy users
• Offer sets of tariffs (versioning)
– allow self-selection
• Model difference in cost for uploading
– higher-cost peers benefit in a larger group when types can be distinguished
Adaptation
• What if not known?
• In general incentive to shade declarations
• Repeated game formulation: in each round, peer
i
samples from
H
, declares – truth-telling equilibrium)
(⋅
H
iθ
θ
iConclusions
• Fixed contribution schemes can be efficient • Result to tractable optimization problems
• Provide useful insight to many interesting questions • Information regarding user types may be strategic • Open issues:
– more complex cost structures – adaptation
– multiple round games – practical application • Check also …
– Market Management of P2P Systems (MMAPPS)
• http://www.mmapps.org
– AUEB Network Economics and Services Group