On Tue, 19 Jan 2021 17:18:21 +0000, Pancho wrote:
> On 19/01/2021 16:21, Martin Gregorie wrote:
>> On Tue, 19 Jan 2021 15:34:00 +0000, Pancho wrote:
>>
>>> On 19/01/2021 15:24, Martin Gregorie wrote:
>>>> On Tue, 19 Jan 2021 13:46:18 +0000, Pancho wrote:
>>>>
>>>>> I think this clarifies in my mind why I wouldn't ever use this
>>>>> technique to observe events in practice. It is too fragile.
>>>>
>>>> So raise a bug to get it fixed: this will help everybody and is,
>>>> after all, why most Linux distros have decent bug reporting
>>>> facilities. Plus its quite a good way of thanking the developers for
>>>> their work.
>>>>
>>>>
>>>>
>>> There is not a bug, just different implementations, different
>>> behaviour.
>>> Different buffering, different arguments.
>>
>> Disagree: the delay you're seeing is definitely a bug, though possibly
>> its a task scheduler issue. If you run less than a buffer-full of data
>> through a pipe there should not be a noticeable delay under a
>> UNIX/Linux OS because the buffer is in memory and the task scheduler is
>> a multitasking scheduler and so can interleave both the writing and
>> reading tasks without any delay except those caused by task switching
>> and being preempted by higher priority tasks.
>>
>> You're reporting multi-second delays you can see which task(s) are
>> involved: run the delayed pipe again, but this time with 'top' running
>> in another console window to see what programs are active during the
>> delay.
>>
>>
> I think you are missing the point. If I pipe 4095 characters into mawk,
> nothing happens, if a pipe an extra char to make 4096, it prints out.
Thats definitely faulty behaviour: pipe operation should not depend on
how full the pipe is.
I've just run similar tests on my systems:
- Fedora 32 on an *GB Lenovo T420
- Raspbins Buster in a 512MB RPI 2B
Both systems had full updates 4 days ago.
Fedora 32 (awk 5.0.1) with 65Kb pipe buffer size
File size Time to transfer:
65535 7-10 Ms
65536 7-11 Ms
65537 10-31 Ms
Raspbian (awk 1.3.3) with 40
65535 67 Ms
65536 67 Ms
65537 68 Ms
4095 63 Ms
4096 64 Ms
4097 64 Ms
If your system can't match that then you have a problem that doesn't show
up here. How recently have you updated your system?
If the pipe hangs persist after a software update then you should raise a
bug on it, which, if the Raspbian bug reporter is any good, also gives
you the opportunity to see if anybody else has the same problem.
The Raspbian awk is also quite old: Version 1.3.3 is dated November 1996.
By contrast, the Fedora 32 awk is version 5.0.1 and dated May 2019
I think that's old enough to be worth asking about a refresh, too.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|