Back

Re: Use of flags (Z) NODELAY on GT.M

From:
Sam Habiel
Subject:
Re: Use of flags (Z) NODELAY on GT.M
Date:
18 Jun 2013 08:27:08 -0700



On Friday, June 7, 2013 10:50:00 PM UTC-7, Valeriu Gontia wrote:
> I have noticed that the use of the flag in NODELAY service xinetd,
>=20
> get a huge gain in speed during multiple calls
>=20
> (in the cycle) from the client application.
>=20
>=20
>=20
> service mactivate
>=20
> {
>=20
> =A0=A0=A0=A0 flags =3D NODELAY
>=20
> =A0=A0=A0=A0 disable =3D no
>=20
> =A0=A0=A0=A0 type =3D UNLISTED
>=20
> =A0=A0=A0=A0 port =3D 1959
>=20
> =A0=A0=A0=A0 socket_type =3D stream
>=20
> =A0=A0=A0=A0 wait =3D no
>=20
> =A0=A0=A0=A0 user =3D root
>=20
> =A0=A0=A0=A0 server =3D / usr/local/gtm60/zmactivate
>=20
> }
>=20
>=20
>=20
> For example (VB):
>=20
>=20
>=20
> Private Sub Command3_Click ()
>=20
> Dim Ret As String
>=20
> For i =3D 1 To 1000
>=20
> Ret =3D Ret & m.Xecute ("w $zv") & " "
>=20
> Next i
>=20
> MsgBox Ret
>=20
> End Sub
>=20
>=20
>=20
> I get a full response from the server in about 6 seconds
>=20
>=20
>=20
> If this method with the native socket GT.M:
>=20
>=20
>=20
> o tcpdev: (ZLISTEN =3D port_ ": TCP": NODELIMITER: ZNODELAY: ATTACH =3D "=
listener"): timeo: "SOCKET"
>=20
>=20
>=20
> even faster - about 1.5 seconds!
>=20
>=20
>=20
> How justified is this? This puts an extra burden on the system or not?
>=20
>=20
>=20
> Thank you.

This disables the Nagle Algorithm on the TCP level. Look that up. In genera=
l, you should not disable it unless you are sure that is what you want to d=
o. A better solution is to rewrite your sends so that they are not flushed =
until the end.

Sam