2 # work out the expected throughput of a network filesystem without overlapped
4 # tridge@samba.org January 2008
6 # Note: to get network latency, try ping -s 64 <DEST>
12 Usage: expected_throughput.pl <server_throughput> <network_throughput> <network_latency> <io_size>
13 Latencies in Microseconds
14 Throughputs in MByte/sec
20 my $server_throughput = shift;
21 my $network_throughput = shift;
22 my $network_latency = shift;
25 # scale to seconds and bytes
26 $server_throughput *= 1.0e6;
27 $network_throughput *= 1.0e6;
28 $network_latency *= 1.0e-6;
30 my $total_latency = $network_latency;
32 $total_latency += (1.0/$server_throughput) * $io_size;
33 $total_latency += (1.0/$network_throughput) * $io_size;
35 my $expected_throughput = $io_size/$total_latency;
37 printf "With server throughput : %7.1f MByte/s\n", $server_throughput * 1.0e-6;
38 printf "With network throughput : %7.1f MByte/s\n", $network_throughput * 1.0e-6;
39 printf "With network latency : %7.1f usec\n", $network_latency * 1.0e6;
40 printf "With network IO size : %7.0f bytes\n", $io_size;
41 printf ">> Expected throughput is %.2f MByte/sec\n", $expected_throughput * 1.0e-6;