Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Mar 2016 18:20:06 -0800
From:      Scott Long <scottl@samsco.org>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: kernel: mps0: Out of chain frames, consider increasing hw.mps.max_chains.
Message-ID:  <DFC3C4CF-89D4-417C-AEBA-67F49F3EA1DE@samsco.org>
In-Reply-To: <20160306212733.GJ11654@zxy.spb.ru>
References:  <20160306194555.GC94639@zxy.spb.ru> <0F0C78F4-6FE2-43BA-B503-AA04A79F2E70@samsco.org> <20160306212733.GJ11654@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Mar 6, 2016, at 1:27 PM, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
>=20
> On Sun, Mar 06, 2016 at 01:10:42PM -0800, Scott Long wrote:
>=20
>> Hi,
>>=20
>> The message is harmless, it's a reminder that you should tune the =
kernel for your workload.  When the message is triggered, it means that =
a potential command was deferred, likely for only a few microseconds, =
and then everything moved on as normal. =20
>>=20
>> A command uses anywhere from 0 to a few dozen chain frames per I/o, =
depending on the size of the io.  The chain frame memory is allocated at =
boot so that it's always available, not allocated on the fly.  When I =
wrote this driver, I felt that it would be wasteful to reserve memory =
for a worst case scenario of all large io's by default, so I put in this =
deferral system with a console reminder to for tuning. =20
>>=20
>> Yes, you actually do have 900 io's outstanding.  The controller =
buffers the io requests and allows the system to queue up much more than =
what sata disks might allow on their own.  It's debatable if this is =
good or bad, but it's tunable as well.
>>=20
>> Anyways, the messages should not cause alarm.  Either tune up the =
chain frame count, or tune down the max io count.
>=20
> I am don't know depends or not, but I see dramaticaly performance drop
> at time of this messages.
>=20

Good to know.  Part of the performance drop might be because of the =
slowness of printing to the console.

> How I can calculate buffers numbers?

If your system is new enough to have mpsutil, please run it =E2=80=98mpsut=
il show iocfacts=E2=80=99.  If not, then boot your system with =
bootverbose and send me the output.

> I am have very heavy I/O.

Out of curiosity, do you redefine MAXPHYS/DFLTPHYS in your kernel =
config?

> This allocated one for all controllers, or allocated for every =
controller?

It=E2=80=99s per-controller.

I=E2=80=99ve thought about making the tuning be dynamic at runtime.  I  =
implemented similar dynamic tuning for other drivers, but it seemed =
overly complex for low benefit.  Implementing it for this driver would =
be possible but require some significant code changes.

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DFC3C4CF-89D4-417C-AEBA-67F49F3EA1DE>