From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GNAT.Sockets Streaming inefficiency
Date: Fri, 9 Jun 2017 17:24:22 +0200
Date: 2017-06-09T17:24:22+02:00 [thread overview]
Message-ID: <oheej5$jru$1@gioia.aioe.org> (raw)
In-Reply-To: cde3f44b-95b5-44d5-89ec-790f429f4e63@googlegroups.com
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
next prev parent reply other threads:[~2017-06-09 15:24 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 [this message]
2017-06-19 9:22 ` masterglob
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox