From: masterglob@gmail.com
Subject: Re: GNAT.Sockets Streaming inefficiency
Date: Mon, 19 Jun 2017 02:22:27 -0700 (PDT)
Date: 2017-06-19T02:22:27-07:00 [thread overview]
Message-ID: <4c2990e4-b1aa-4784-86d0-d7cfe4844e1d@googlegroups.com> (raw)
In-Reply-To: <oheej5$jru$1@gioia.aioe.org>
Le vendredi 9 juin 2017 17:24:24 UTC+2, Dmitry A. Kazakov a écrit :
> On 2017-06-09 15:30, gautier_niouzes@hotmail.com wrote:
>
> > It could be related to a performance bottleneck in 'Read and 'Write,
> > perhaps more than to the nature of the stream (socket vs. file vs. ...).
>
> 1. Without NODELAY. Writes are buffered and spilled out either when the
> buffer is full or when the coalescing algorithm timeout expired. With
> string length is not a multiply of the buffer and moderate output rate
> or synchronized output, the last frame carrying the string will be
> always delayed. So the observed latency will be more or less the
> coalescing algorithm timeout.
>
> 2. With NODELAY. Individual writes are sent in independent frames. If
> 'Output or 'Write write individual characters separately, plus the
> string bounds, then the network gets flooded with short frames and the
> latency depends on how good the stack, the OS, the network
> infrastructure are.
>
> In either scenario there is nothing good to expect.
>
> --
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de
I currently do not use "NO_DELAY", but the thing is that the "producer" process is 100%. This tends to indicate that it is not this kind of issue (I would have long execution time, but not a 100% CPU usage).
I have to try other implementations proposed (like using something else than Stream 'write & 'Read)
prev parent reply other threads:[~2017-06-19 9:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 10:36 GNAT.Sockets Streaming inefficiency masterglob
2017-06-08 14:46 ` Dmitry A. Kazakov
2017-06-08 15:39 ` Robert Eachus
2017-06-09 13:30 ` gautier_niouzes
2017-06-09 15:24 ` Dmitry A. Kazakov
2017-06-19 9:22 ` masterglob [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox