lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Jun 2013 13:42:00 -0700
From:	Jerry Chu <hkchu@...gle.com>
To:	Rick Jones <rick.jones2@...com>
Cc:	Jason Wang <jasowang@...hat.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Michael S. Tsirkin" <mst@...hat.com>
Subject: Re: qlen check in tun.c

On Wed, Jun 19, 2013 at 12:49 PM, Rick Jones <rick.jones2@...com> wrote:
> On 06/19/2013 12:39 PM, Jerry Chu wrote:
>>
>> Hi Jason,
>>
>> On Tue, Jun 18, 2013 at 8:29 PM, Jason Wang <jasowang@...hat.com> wrote:
>>>
>>> On 06/19/2013 10:31 AM, Jerry Chu wrote:
>>>>
>>>> In tun_net_xmit() the max qlen is computed as
>>>> dev->tx_queue_len / tun->numqueues. For multi-queue configuration the
>>>> latter may be way too small, forcing one to adjust txqueuelen based
>>>> on number of queues created. (Well the default txqueuelen of
>>>> 500/TUN_READQ_SIZE already seems too small even for single queue.)
>>>
>>>
>>> Hi Jerry:
>>>
>>> Do you have some test result of this? Anyway, tun allows userspace to
>>> adjust this value based on its requirement.
>>
>>
>> Sure, but the default size of 500 is just way too small. queue overflows
>> even
>> with a simple single-stream throughput test through Openvswitch due to CPU
>> scheduler anomaly. On our loaded multi-stream test even 8192 can't prevent
>> queue overflow. But then with 8192 we'll be deep into the "buffer
>> bloat" territory.
>
>
> Assuming this single-stream is a netperf test, what happens when you cap the
> socket buffers to 724000 bytes?  Put another way, is this simply a situation
> where the autotuning of the socket buffers/window is taking a connection
> somewhere it shouldn't go?

You have a good point - for single netperf streaming the TCP window seems to
grow much larger than necessary. Manually capping socket buffer seems to make
the problem go away without hurting throughput - but only to some extent.
Unfortunately manual setting is undesirable, and the autotuning code
is difficult
to "tune".

>
>
>> We haven't figured out an optimal strategy for thruput vs latency, but
>> suffice to say 500 is too small.
>
>
> Just what is the bandwidthXdelay product through the openvswitch?

Unlike the traditional NIC, for tuntap it'd be CPU b/w times scheduling delay.
Both can have a large variance. I haven't figured out how to right size the
qlen in this scenario.

Jerry

>
> happy benchmarking,
>
> rick
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ