Emulator
To perform stress test on our pCDN server within our Lab, we develop an emulator that sends client-to-server request on behalf of many clients. We configure the emulator's NIC in promiscuous mode. The emulator is connected to the pCDN server using a dedicated GigE subnet. The emulator takes a few parameters, such as number of clients, frequency of publishing new podcasts, and average download speed on P2P networks. Using empirically derived traffic models, the emulator maps these parameters to individual requests and sends these parameters to the pCDN server. To recreate highly-stressed loads, the emulator should be scalable in the sense that multiple of them can be run in parallel.
We build the traffic models by performing and analyzing smaller-scaled Planetlab experiments. Assume we have <math>p</math> pCDN clients. Every client joins the pCDN network for a random time <math>t_j</math> seconds, it then leave the network for another random time <math>t_l</math> seconds. We assume that the content provider produces a 30 MB podcast every hour, and the online clients download each podcast whenever it becomes available. Individual downloads are completed within a random time (determined by a random download rate). The pCDN server is configured to record all messages. We try several <math>p</math> values, such as 50, 100, 150, 200, 250, 300.
To accelerate the experiments, we may scale dow the time and file sizes by a factor of 60. As a result, we can cover a 10-day experiment in a 4-hr run.
Messages Exchanged between Clients and Servers
- Join/JoinAck
- Leave/LeaveAck
- Query/Response
- Stat/StatAck
- Session Stat: One message is sent when a session is completed
- Host Stat: One message is sent for ping packet stats.
- Path Stat: One message is sent for each sender.
- Update: A update message is sent when (i) download starts, (ii) download ends, and (iii) every 10-min during downloads.
- Heartbeat: One message is sent every 30-min.
Additional Statistics for the pCDN server
Periodical Logs (Say, every 10 mins)
- Current message queue length
- Number of dropped messages
- Current CPU load and memory usage
- Mean/Max processing time for each message (from received to freed)
- Number of files, number of peers, average number of files per peer, and average peers per file.
Real-Time Logged Events (When dbg_leve == MESSAGE or finer-grained)
- JoinMsg: Peer (IP:Port)
- LeaveMsg: Peer (IP:Port)
- QueryMsg: Receiver (IP:Port), FileID (MD5 hash), # of senders, Sender IDs (IPs:Ports)
- InsertPeer: Peer (IP:Port)
- RemovePeer: Peer(IP:Port), ReasonCode (1: leave; 2: heartbeat timer expiers)