Here is a benchmark demonstrating the performance improvement with (proto=2 and -n2).
The code benchmarked against PP-1.5.7 on 100MB local LAN
(tasks were executed exclusively on a remote ppserver):
import sys
import pp
N = 1000001
def reverse(l):
"""Calculates a sum"""
l.reverse()
return l
ppservers = ("192.168.10.101", )
proto = 0 # choose 2 for faster network transfers
job_server = pp.Server(0, ppservers=ppservers, proto=proto)
job1 = job_server.submit(reverse, (range(N), ))
result = job1()
print result[:10]
job_server.print_stats()
With proto=0 on local client and -n0 on remote server (default):
> python test-proto0.py
[1000000, 999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991]
Job execution statistics:
job count | % of all jobs | job time sum | time per job | job server
1 | 100.00 | 1.5756 | 1.575559 | 192.168.10.101:60000
Time elapsed since server creation 3.76052188873
With proto=2 on local client and -n2 on remote server:
> python test-proto2.py
[1000000, 999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991]
Job execution statistics:
job count | % of all jobs | job time sum | time per job | job server
1 | 100.00 | 0.3642 | 0.364187 | 192.168.10.101:60000
Time elapsed since server creation 1.48450303078
The speedup is 3.76/1.48 = 2.54 times