Document 7578868

Download Report

Transcript Document 7578868

Simulating Gnutella 0.6
Student Project Final Presentation
Wei Lu 02.2005
Communication Networks
Wei Lu, Sireen Malik
Gnutella
• Gnutella 0.6
• Gnutella 0.4
– Distributed Index Flooding
Architecture (DIFA)
– Signaling
– Two-layered hierarchy
• Attempt connection with
Bootstrap servers
• Once connected, flood PINGS
• Reverse routed PONGS from
known-hosts
• PONG-based connection to
known hosts
• Flood QUERIES to all knownhosts
• Reverse routed QUERYHITS
• Supernodes (called Ultrapeers)
• Client nodes (called Shielded
Leaves)
• Ultrapeers: faster,better networking
and CPU power act as proxies for
client(leaf) nodes connected to them
shield leaf nodes from almost all
ping and query traffic
– File download via HTTP-TCP
[Source:P2P Traffic Simulation, Sireen Malik, Prof. Ulrich Killat]
Communication Networks
Wei Lu, Sireen Malik
-2-
Gnutella 0.6, Anti-flooding
• Message Dispatching
– Leaf node doesn't relay Ping message
– Ultrapeer only dispatches Ping message to other
connected Ultrapeers.
• Query Routing
– Leaf node doesn't spread Query message.
– Ultrapeer only dispatches Query message to
other Ultrapeer and some of his leaf nodes
selectively (DIHA).
Communication Networks
Wei Lu, Sireen Malik
-3-
Gnutella 0.6, Ultrapeer Election
• New header fields for handshaking
– X-Ultrapeer, whether a host plans on acting as ultrapeer
– X-Ultrapeer-Needed, to balance the number of ultrapeers
• Handshaking
– Leaf to Ultrapeer, Leaf to Shielded Leaf, Leaf to Unshielded Leaf,
Ultrapeer to Ultrapeer
• Specification is quite open on details
– Max-number of leaves (Cluster Size): LimeWire 30, BearShare 45.
– Ultrapeer critera: “at least 15KB/s downstream and 10KB/s
upstream”, “have been running for few hours/sever minutes”,
“when (not) too many”…
• Ultrapeer : ?%, Leaf: ?%
Communication Networks
Wei Lu, Sireen Malik
-4-
Optimal Topology
• What’s the globally optimal topology?
(% of UltrapeerCluster size, Degree
distribution, etc.)
• How to locally approach the optimal
topology?
(Ultrapeer criteria, Routing protocol)
Communication Networks
Wei Lu, Sireen Malik
-5-
Optimal Topology, Q1
• Analytic model: not well established yet.
– Parameters
• Ultrapeer percentage, Cluster Size, Degree distribution Pd,
TTL, Query rate Rq, Replication rate Rr, …
– Objectives
• Load (Computation, Communication), Quality of result, …
– Random Graph, Load{QueryTraffic[QueryCoverage(Pd,
TTL)], QueryHitTraffic(Rr, Rq)}. Hard to calculate.[1]
– Var(load(p)/CHL(p)), recursive function, simulated
annealing to calculate.[2]
• Measurement: strongly related to software
configuration/ protocol implementation.
Communication Networks
Wei Lu, Sireen Malik
-6-
Optimal Topology, Q2
• [3] gives rules of thumb.
– But the model based on semi-p2p system
(superpeer (server) is at most 1 hop away) might not
be accurate enough.
• Cluster head selection in ad-hoc and sensor
network[4][5].
– Based on Node ID, Node degree. Optimize
power consumption (load), communication, etc.
Communication Networks
Wei Lu, Sireen Malik
-7-
Optimal Topology, dynamic network
• Most of above works are based on static
context.
• Peer availability matters.
Communication Networks
Wei Lu, Sireen Malik
-8-
Current Approach
• Related to
Implementation
[Daniel Stutzbach, Reza
Rejaie, “Characterizing
Today’s Gnutella Topology”,
Dec.2004]
• Our config:
5% Ultrapeer.
Communication Networks
Wei Lu, Sireen Malik
-9-
Implementation, NS-2
• Extending
Gnutella 0.4:
Ultrapeer
Election, DIHA,
Downloading, ...
• Facilities: control
of selected peers,
trace on link,
random seed, ...
TclObject
TcpAgent
-node_
1
-tcp_send,tcp_sink,dst_send,dst_sink
GnutellaGlobalRegistrationOffice
*
1
GnutellaConnection
*
Node
-app_
-node_
1
1
1
GnutellaApp
-connection_list_
Communication Networks
Wei Lu, Sireen Malik
-gnuProt_ -gnutella_appl_
1
GnutellaServent
*
-10-
Implementation, Ptolemy
• Ptolemy
– Adapting NS-2 code to Ptolemy.
– No modification, just re-compile.
Real World
NS-2
Ptolemy
Network Interface
Node
Adapter Star / Galaxy
TCP
Agent
Adapter Star / Galaxy
Gnutella
Application
Communication Networks
Wei Lu, Sireen Malik
Star / Galaxy
-11-
Configuration – User Model
• All MODEM & DSL users in ON/OFF process
– mean on 60 sec, log quadratic; mean off 105 sec, neg.
exp.
• Every 25s, drops oldest connections when many
• File size distribution:
– for < 10MB files (music) less than 15% bytes but more
than 88% request
– for >100MB files (movies) more than 65% bytes but
less than 5% request
• Number of files shared by peers
– 66% free-riders, 73% share 10 or less files, top 1%
share 35% files
Communication Networks
Wei Lu, Sireen Malik
-12-
Configuration – Network
• Germany Network, 17
core nodes.
• Power Law for 2nd level
node connectivity
(Pareto Distribution,
Shape 1.5)
• Bandwidth of 2nd level
nodes (70% MODEM,
Uniform Distribution)
Communication Networks
Wei Lu, Sireen Malik
-13-
Result – Average Signaling
Traffic MODEM (100Kbps)
Communication Networks
Wei Lu, Sireen Malik
-14-
Result – Average Singling Traffic
DSL (1~4Mbps)
Communication Networks
Wei Lu, Sireen Malik
-15-
Result – Average Signaling Traffic
Bootstrap (1000Mbps)
Communication Networks
Wei Lu, Sireen Malik
-16-
Result – Signaling Sum-up
• MODEM(100Kbps):
70%, DSL(1~4Mbps):
29.6% ,
Bootstrap(1000Mbps) :
0.4%.
• 35>1/5% (5% peers
behave as in 0.4)
– Less peers flood
message.
– Message flooded in
smaller scope
MsgRate0.4
Mean(
)  35
MsgRate0.6
Communication Networks
Wei Lu, Sireen Malik
-17-
Downloading
• Previous configurations, e.g. File size distribution:
• Each QueryHit triggers a HTTP session for
downloading.
• Result: QueryHit/Query = 34.73%
Communication Networks
Wei Lu, Sireen Malik
-18-
Result – Gnutella 0.6 Signaling and
Signaling+Downloading
• By single
MODEM(100Kbps) and
DSL(1Mbps) user
• Signaling is minor part.
• Log-Log scaled 
• MODEM:
– Synthesis ≈ 100 Signaling
• DSL:
– Synthesis ≈ 1000 Signaling
Communication Networks
Wei Lu, Sireen Malik
-19-
References
• [1] Ruediger Schollmeier, Gero Schollmeier, An analytic
model for the behavior of arbitary peer-to-peer networks.
• [2] Mudhakar Srivatsa, Bugra Gedik, Ling Liu, Improving
Peer to Peer Search With Multi-tier Capability-Aware
Overlay Topologies.
• [3] Beverly Yang, Hector Garcia-Molina, Designing a
Super-Peer Network
• [4] Mario Gerla,Jack Tzu-Chieh Tsai, Multicluster, mobile,
multimedia radio network
• [5] Ossama Younis, Sonia Fahmy, Distributed Clustering
in Ad-hoc Sensor Networks: A Hybrid, Energy-Efficient
Approach
Communication Networks
Wei Lu, Sireen Malik
-20-