[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL8zT=jyzV6BwB6Lce0CCi+Z3MuwNsWLw2DQu8HBdm_J8kvArA@mail.gmail.com>
Date: Thu, 5 Jan 2012 10:48:25 +0100
From: Jean-Michel Hautbois <jhautbois@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Rick Jones <rick.jones2@...com>, netdev@...r.kernel.org
Subject: Re: TCP communication for raw image transmission
2012/1/5 Eric Dumazet <eric.dumazet@...il.com>:
> Le jeudi 05 janvier 2012 à 10:13 +0100, Jean-Michel Hautbois a écrit :
>> 2012/1/3 Rick Jones <rick.jones2@...com>:
>> > On 01/02/2012 08:52 AM, Eric Dumazet wrote:
>> >>
>> >> Le lundi 02 janvier 2012 à 17:40 +0100, Jean-Michel Hautbois a écrit :
>> >>
>> >>> Mmmh, using netperf you would like to know what the client (my ARM
>> >>> board) can do ?
>> >>> How would you test it ? I can have an ARM board on one side, and the
>> >>> x86 on the other...
>> >>>
>> >>
>> >> x86> netserver&
>> >> arm> netperf -H<arm_ip_address> -l 60 -t TCP_STREAM
>> >>
>> >> 1) check cpu usage on<arm> while test is running
>> >> (for example : vmstat 1 )
>> >> 2) check bandwith of test run
>> >
>> >
>> > The "&" at the end of the netserver command is (should be) redundant -
>> > netserver will by default daemonize itself.
>> >
>> > I would suggest amending the netperf command line to something more like:
>> >
>> > netperf -H <x86IP> -c -l 60 -t TCP_STREAM -- -m <dataofoneline> -D
>>
>> I did it, and here are the results (when plugged directly between x86
>> and arm, and not throught the switch, as before) :
>> / # netperf -H 192.168.0.1 -c -l 60 -t TCP_STREAM -- -m 1344 -D
>> MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
>> 192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
>> Recv Send Send Utilization Service Demand
>> Socket Socket Message Elapsed Send Recv Send Recv
>> Size Size Size Time Throughput local remote local remote
>> bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
>>
>> 87380 16384 1344 60.01 45.43 100.00 -1.00 180.325 -1.000
>>
>> And without specifying the data size :
>> / # netperf -H 192.168.0.1 -c -l 60 -t TCP_STREAM
>> MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
>> 192.168.0.1 (192.168.0.1) port 0 AF_INET
>> Recv Send Send Utilization Service Demand
>> Socket Socket Message Elapsed Send Recv Send Recv
>> Size Size Size Time Throughput local remote local remote
>> bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
>>
>> 87380 16384 16384 60.01 61.94 99.98 -1.00 132.230 -1.000
>>
>> This is far better than the first tests, but this means my best bet is
>> to send as much data as possible (here, 16384)...
>> I will do a benchmark with a little script which will test several
>> frame sizes (or is there a way to know the theorical better value ?).
>>
Here is the result of this little benchmark :
m=1024
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 1024 60.01 36.44 99.97 -1.00 224.722 -1.000
m=1344
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 1344 60.01 45.95 100.00 -1.00 178.279 -1.000
m=1460
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 1460 60.01 27.92 99.98 -1.00 293.382 -1.000
m=2048
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 2048 60.01 38.15 99.98 -1.00 214.705 -1.000
m=4096
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 4096 60.01 55.32 99.98 -1.00 148.070 -1.000
m=8192
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 8192 60.01 62.06 100.00 -1.00 132.000 -1.000
m=16384
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 16384 60.01 63.07 99.98 -1.00 129.865 -1.000
m=32768
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET : nodelay
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB
87380 16384 32768 60.01 67.46 100.00 -1.00 121.428 -1.000
m is the size of the message, and there is clearly an effect of this value...
> Could you test UDP_STREAM as well ?
>
> $ netperf -H 192.168.0.1 -l 10 -t UDP_STREAM
> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
> 192.168.0.1 (192.168.0.1) port 0 AF_INET
> Socket Message Elapsed Messages
> Size Size Time Okay Errors Throughput
> bytes bytes secs # # 10^6bits/sec
>
> 1000000 65507 10.00 13398 0 702.12
> 110592 10.00 13398 702.12
It does not seem to work :
netperf -H 192.168.0.1 -l 10 -t UDP_STREAM
MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
106496 65507 10.01 1836 0 0.00
419227124 0.00 536870912 0.00
Adding a "-c" gives the same :
netperf -H 192.168.0.1 -c -l 10 -t UDP_STREAM
MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.0.1 (192.168.0.1) port 0 AF_INET
Socket Message Elapsed Messages CPU Service
Size Size Time Okay Errors Throughput Util Demand
bytes bytes secs # # 10^6bits/sec % SU us/KB
106496 65507 10.01 1835 0 0.0 96.10 50.250
536870912 2.25 1073741824 0.0 96.10 -1.000
Using ifconfig before and after and comparing the TX values I get 98Mbps...
> Then, a pktgen test (this sends UDP frames, but from kernel land) might
> give you the limit of the NIC...
I need to recompile my kernel, as I don't have the CONFIG_NET_PKTGEN
in this one...
JM
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists