Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2014 18:06:53 +0200
From:      =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   Re: svn commit: r265498 - stable/10/sys/dev/iscsi
Message-ID:  <E32675BF-D16C-4AA6-B3CF-E435718726CA@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.1405071247490.20912@fledge.watson.org>
References:  <201405070638.s476cK2J092699@svn.freebsd.org> <alpine.BSF.2.00.1405071247490.20912@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Wiadomo=B6=E6 napisana przez Robert Watson w dniu 7 maj 2014, o godz. =
13:49:
> On Wed, 7 May 2014, Edward Tomasz Napierala wrote:
>=20
>> Author: trasz
>> Date: Wed May  7 06:38:19 2014
>> New Revision: 265498
>> URL: http://svnweb.freebsd.org/changeset/base/265498
>>=20
>> Log:
>> MFC r264025:
>>=20
>> Get rid of the "autoscaling", instead just set socket buffer sizes
>> in the usual way.  The only thing the old code did was making things
>> less predictable.
>=20
> Does this mean that the autoscaling algorithm needs refining?  The =
problem with disabling autoscaling is that the code may, in the future, =
fail to benefit from further global refinements, as old code that =
hard-coded sizes now fails to do -- and that if we don't refine the =
autoscaling model, other applications may fail to benefit.

The commit message here was misleading - what got replaced was
setting the socket buffer size "by hand" to a value  computed from
negotiated maximum PDU size.  Now it's set to constant size.

The reason we do not use autoscaling here is not performance.
It's because iSCSI code can't transmit a part of PDU; it always waits
until there is room for the whole thing (PDUs can be up to about 128kB
in size). If the socket buffer size somehow got autoscaled below
that amount, the transmit would stop indefinitely.  There is a somewhat
similar situation on the receive side.

So, the right solution would be to either use autoscaling, but with
a guarantee that the socket buffer won't shrink below some specified
value, or have a way to determine that the socket buffer won't get any
bigger anytime soon and so the iSCSI should transmit or receive a part
of PDU.  Current setting "by hand" is just a workaround, albeit pretty
well working one.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E32675BF-D16C-4AA6-B3CF-E435718726CA>