• Re: Are We Back to the "Wars" Now ?

    From The Natural Philosopher@21:1/5 to 186282@ud0s4.net on Sat Nov 23 11:12:50 2024
    On 23/11/2024 06:27, 186282@ud0s4.net wrote:


      I know it CAN handle BIG transactions.

      But SHOULD it ?

      This is maybe a "philosophical" matter ...


    *Should* is an interesting word, used today in enormous quantities, to
    justify actions.
    It is a nasty little fella, because its roots like in the language of
    debt - both physical and moral - and obligation.

    And whilst it seems to not overtly contain such elements, implicitly it
    does.

    Do if I say 'you *should* do this, there is an implicit quality of (unspecified) goodness and badness and obligation on you in doing it or
    not doing it.

    Unless you prefix it with a conditional like 'If you want to get to
    Rome, you should take this road' there is the implicit conditional of
    'if you want to be regarded as a good and holy person' you should take
    this road.


      I'm still of the crap CPU/Mem era ... always look
      to minimize/simplify.

    Well yes, but we have gigabytes of RAM these days.

    You have to look at what your are doing, what you are trying to do, and
    what resources are available, to do it with, how long it will take and
    what it will cost.

    This is standard professional engineering philosophy. It is also officer
    class military procedure - a pragmatic approach to achieving well
    defined tactical and strategic objectives.

    You cant ask 'should we' in isolation.
    Only in the context of the above.


    --
    The theory of Communism may be summed up in one sentence: Abolish all
    private property.

    Karl Marx

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Lawrence D'Oliveiro on Sat Nov 23 14:39:40 2024
    On 2024-11-23 08:41, Lawrence D'Oliveiro wrote:
    On Sat, 23 Nov 2024 01:27:25 -0500, 186282@ud0s4.net wrote:

    On 11/23/24 12:19 AM, Lawrence D'Oliveiro wrote:

    You didn’t realize IPC on *nix is industrial-strength?

    I know it CAN handle BIG transactions.

    But SHOULD it ?

    That’s what it’s designed for!

    I use named pipes on my backup script.

    I dd a hard disk partition, compress it, and at the same time calculate a checksum.

    mkfifo mdpipe
    dd if=/dev/$1 status=progress bs=16M | tee mdpipe | pigz -3 > $3.gz &
    md5sum -b mdpipe | tee -a md5checksum_expanded
    wait
    rm mdpipe
    echo "$3" >> md5checksum_expanded

    This way there is only one disk read operation. I can see the thing running at max hard disk speed.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fritz Wuehler@21:1/5 to All on Sat Nov 23 22:32:37 2024
    Carlos E.R. <robin_lis...@es.invalid> [CE]:
    I dd a hard disk partition, compress it, and at the same time
    calculate a checksum.

    mkfifo mdpipe
    dd if=/dev/$1 status=progress bs=16M | tee mdpipe | pigz -3 > $3.gz &
    md5sum -b mdpipe | tee -a md5checksum_expanded
    wait
    rm mdpipe
    echo "$3" >> md5checksum_expanded


    David B Rosen has written the tpipe(1) utility for exactly such cases:

    The above steps can be rewritten in a much cleaner way as:

    dd if=/dev/$1 status=progress bs=16M |
    tpipe "md5sum -b >> md5checksum_expanded" |
    pigz -3 > $3.gz


    If tpipe is not available on your system, you can always use the shell's process substitution feature instead:

    dd if=/dev/$1 status=progress bs=16M |
    tee >(md5sum -b >> md5checksum_expanded) \
    >(pigz -3 > $3.gz) \
    >/dev/null

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to The Natural Philosopher on Sat Nov 23 21:25:13 2024
    On Sat, 23 Nov 2024 11:12:50 +0000, The Natural Philosopher wrote:

    *Should* is an interesting word ...

    Here I think it is being used to backpedal from the poster’s original
    claim that pipes are somehow unsuited to passing around large quantities
    of data, while trying to somehow save face.

    Well yes, but we have gigabytes of RAM these days.

    That’s irrelevant. Pipes originated on the earliest Unix machine, which
    was a PDP-11 with only a 64kiB address space. They work great for pumping around gigabytes of data, but you don’t need gigabyte-sized memory buffers
    to do that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Carlos E.R. on Sat Nov 23 22:04:17 2024
    On Sat, 23 Nov 2024 14:39:40 +0100, Carlos E.R. wrote:

    I use named pipes on my backup script.

    I dd a hard disk partition, compress it, and at the same time calculate
    a checksum.

    mkfifo mdpipe
    dd if=/dev/$1 status=progress bs=16M | tee mdpipe | pigz -3 > $3.gz &
    md5sum -b mdpipe | tee -a md5checksum_expanded
    wait
    rm mdpipe
    echo "$3" >> md5checksum_expanded

    This way there is only one disk read operation. I can see the thing
    running at max hard disk speed.

    Clever. Just one thing, I would probably use a dynamic name for the
    pipe and put it in $TMPDIR (e.g. generated with tempfile) so that 1)
    multiple instances could run at once, and 2) it doesn’t depend on
    writing into the current directory, whatever that might be.

    (It’s likely neither of those issues is relevant to your particular
    use case ...)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Fritz Wuehler on Sun Nov 24 00:11:48 2024
    On 2024-11-23 22:32, Fritz Wuehler wrote:
    Carlos E.R. <robin_lis...@es.invalid> [CE]:
    I dd a hard disk partition, compress it, and at the same time
    calculate a checksum.

    mkfifo mdpipe
    dd if=/dev/$1 status=progress bs=16M | tee mdpipe | pigz -3 > $3.gz &
    md5sum -b mdpipe | tee -a md5checksum_expanded
    wait
    rm mdpipe
    echo "$3" >> md5checksum_expanded


    David B Rosen has written the tpipe(1) utility for exactly such cases:

    The above steps can be rewritten in a much cleaner way as:

    dd if=/dev/$1 status=progress bs=16M |
    tpipe "md5sum -b >> md5checksum_expanded" |
    pigz -3 > $3.gz


    If tpipe is not available on your system,

    it is not.

    Telcontar:~ # tpipe
    If 'tpipe' is not a typo you can use command-not-found to lookup the
    package that contains it, like this:
    cnf tpipe
    Telcontar:~ # cnf tpipe
    tpipe: command not found
    Telcontar:~ # opi tpipe
    Searching repos for: tpipe
    1. inputpipe
    2. socketpipe
    3. inputpipe-debuginfo
    4. socketpipe-debuginfo
    5. inputpipe-debugsource
    6. socketpipe-debugsource
    Pick a number (0 to quit): 0
    Telcontar:~ #


    you can always use the shell's
    process substitution feature instead:

    dd if=/dev/$1 status=progress bs=16M |
    tee >(md5sum -b >> md5checksum_expanded) \
    >(pigz -3 > $3.gz) \
    >/dev/null


    I like my way, it is mine :-)

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Lawrence D'Oliveiro on Sun Nov 24 00:11:16 2024
    On 2024-11-23 23:04, Lawrence D'Oliveiro wrote:
    On Sat, 23 Nov 2024 14:39:40 +0100, Carlos E.R. wrote:

    I use named pipes on my backup script.

    I dd a hard disk partition, compress it, and at the same time calculate
    a checksum.

    mkfifo mdpipe
    dd if=/dev/$1 status=progress bs=16M | tee mdpipe | pigz -3 > $3.gz &
    md5sum -b mdpipe | tee -a md5checksum_expanded
    wait
    rm mdpipe
    echo "$3" >> md5checksum_expanded

    This way there is only one disk read operation. I can see the thing
    running at max hard disk speed.

    Clever. Just one thing, I would probably use a dynamic name for the
    pipe and put it in $TMPDIR (e.g. generated with tempfile) so that 1)
    multiple instances could run at once, and 2) it doesn’t depend on
    writing into the current directory, whatever that might be.

    (It’s likely neither of those issues is relevant to your particular
    use case ...)

    No, it is not relevant :-)

    Using the current dir allows me to see it there, too.



    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Sat Nov 23 19:42:01 2024
    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:
    On Sat, 23 Nov 2024 11:12:50 +0000, The Natural Philosopher wrote:

    *Should* is an interesting word ...

    Here I think it is being used to backpedal from the poster’s original
    claim that pipes are somehow unsuited to passing around large quantities
    of data, while trying to somehow save face.

    Check - I said there were OTHER, reasonably good, ways
    to pass lots of data between parents/children. Others
    here said they've used ordinary disk files instead of
    pipes for various reasons.

    As for my face ... it never was very handsome, no
    saving it now ... :-)

    Well yes, but we have gigabytes of RAM these days.

    That’s irrelevant. Pipes originated on the earliest Unix machine, which
    was a PDP-11 with only a 64kiB address space. They work great for pumping around gigabytes of data, but you don’t need gigabyte-sized memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then
    on a mass storage device.

    Of course 'gigabytes' ALL AT ONCE -vs- "a little
    at a time, added up" are entirely different things.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Sun Nov 24 02:03:53 2024
    On Sat, 23 Nov 2024 19:42:01 -0500, 186282@ud0s4.net wrote:

    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:

    Pipes originated on the earliest Unix machine, which
    was a PDP-11 with only a 64kiB address space. They work great for
    pumping around gigabytes of data, but you don’t need gigabyte-sized
    memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then on a mass storage
    device.

    It might be generated in one process and consumed in another. It might be coming from the network, or going to the network -- the process at the
    other end of the pipe being isolated from the network, perhaps for
    security reasons.

    In short, it might work any number of ways, without involving (local) mass-storage devices.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to All on Mon Nov 18 01:20:53 2024
    There has been a long tendency in Linux/comp groups
    to horribly attack, belittle, abuse, anybody who has
    had a 'different experience' and sees things a little
    off some kinda poorly-defined 'norm'.

    Sorry, we all didn't come up on the same track.
    A thousand different paths, a thousand different
    styles of apps/needs/solutions. Computers let
    you DO that.

    Hey, if I feel the need to use files instead
    of 'pipes' then I WANT TO USE FILES INSTEAD
    OF PIPES. Don't like it ? Tuff titty. Any
    'contributions' will be to tell me how to
    maximize that approach - not to rain down piss.

    (actually I think pipes are better - but there
    are and will be other approaches/reasons)

    The recent elections kinda upset the Linux/Unix
    groups - a lot of politics promoted a lot of
    threads. Well, the elections are OVER now.
    Back to business.

    BUT ... consider ... "back to business" does
    not need to mean "back to old habits". We all
    can do BETTER, move towards the future instead
    of being at each others throats over NOTHING.

    Just sayin'

    Most everybody here seems to have been in the
    groove since (or during) PUNCH CARDS. Let's
    not be petty. We all did it OUR WAY.

    Hey, I remember the giant handful of punch
    cards - DON'T DROP 'EM ! :-)

    --
    033-33

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to 186282@ud0s4.net on Mon Nov 18 10:13:14 2024
    On Mon, 18 Nov 2024, 186282@ud0s4.net wrote:

    There has been a long tendency in Linux/comp groups
    to horribly attack, belittle, abuse, anybody who has
    had a 'different experience' and sees things a little
    off some kinda poorly-defined 'norm'.

    Sorry, we all didn't come up on the same track.
    A thousand different paths, a thousand different
    styles of apps/needs/solutions. Computers let
    you DO that.

    Hey, if I feel the need to use files instead
    of 'pipes' then I WANT TO USE FILES INSTEAD
    OF PIPES. Don't like it ? Tuff titty. Any
    'contributions' will be to tell me how to
    maximize that approach - not to rain down piss.

    (actually I think pipes are better - but there
    are and will be other approaches/reasons)

    The recent elections kinda upset the Linux/Unix
    groups - a lot of politics promoted a lot of
    threads. Well, the elections are OVER now.
    Back to business.

    BUT ... consider ... "back to business" does
    not need to mean "back to old habits". We all
    can do BETTER, move towards the future instead
    of being at each others throats over NOTHING.

    Just sayin'

    Most everybody here seems to have been in the
    groove since (or during) PUNCH CARDS. Let's
    not be petty. We all did it OUR WAY.

    Hey, I remember the giant handful of punch
    cards - DON'T DROP 'EM ! :-)

    Are you saying we should disregard the emperor? Doesn't he teach us that
    our hate makes us stronger?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pancho@21:1/5 to 186282@ud0s4.net on Mon Nov 18 09:27:59 2024
    On 11/18/24 06:20, 186282@ud0s4.net wrote:

    Most everybody here seems to have been in the
    groove since (or during) PUNCH CARDS. Let's
    not be petty. We all did it OUR WAY.

    Hey, I remember the giant handful of punch
    cards - DON'T DROP 'EM !  :-)


    When I started Uni they showed us their computers with punch cards, so I avoided the computers until they had terminals, vt100 at least.

    Anyway make Linux great again.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to 186282@ud0s4.net on Mon Nov 18 09:54:15 2024
    "186282@ud0s4.net" <186283@ud0s4.net> writes:
    There has been a long tendency in Linux/comp groups
    to horribly attack, belittle, abuse, anybody who has
    had a 'different experience' and sees things a little
    off some kinda poorly-defined 'norm'.

    Sorry, we all didn't come up on the same track.
    A thousand different paths, a thousand different
    styles of apps/needs/solutions. Computers let
    you DO that.

    Hey, if I feel the need to use files instead
    of 'pipes' then I WANT TO USE FILES INSTEAD
    OF PIPES. Don't like it ? Tuff titty. Any
    'contributions' will be to tell me how to
    maximize that approach - not to rain down piss.

    Precisely nobody is telling you that you can’t use files.

    If the issue here is that you don’t like being told that pipes aren’t
    the same as regular files, well, maybe consider not posting that they
    are the same?

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to 186282@ud0s4.net on Sun Nov 24 14:25:10 2024
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:
    That’s irrelevant. Pipes originated on the earliest Unix machine,
    which was a PDP-11 with only a 64kiB address space. They work great
    for pumping around gigabytes of data, but you don’t need
    gigabyte-sized memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then
    on a mass storage device.

    Nope, at least not with pipes.

    Of course 'gigabytes' ALL AT ONCE -vs- "a little at a time, added
    up" are entirely different things.

    "A little at a time, added up" is exactly what pipes give you, and is
    what allows processing gigabytes of total data, without also needing
    gigabytes of memory (or disk) to do the processing.

    I regularly re-encode video files using a pipeline of several image
    filters from the mjpegtools package, ending up with a pipe to x264 for
    final compression (for size reduction purposes).

    The source files tend to be around 2-5G. The pipes between the image
    filters, and the final pipe to the x264 compressor transfers raw
    uncompressed YUV data.

    The raw uncompressed YUV data for an hours worth of 1080p video is
    about 336GiB of data (way more data than I have RAM to store it all,
    and slightly more than the total free space available right now on the
    1.9T disk I run the encodes from). Not one byte of that 336GiB of raw
    YUV data that passes through the pipes ever touches disk storage. The
    only data in disk files are the source, compressed, video file, and the
    final result, also compressed, video file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Rich on Sun Nov 24 15:48:49 2024
    On Sun, 24 Nov 2024 14:25:10 +0000, Rich wrote:

    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:
    That’s irrelevant. Pipes originated on the earliest Unix machine,
    which was a PDP-11 with only a 64kiB address space. They work great
    for pumping around gigabytes of data, but you don’t need
    gigabyte-sized memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then
    on a mass storage device.

    Nope, at least not with pipes.

    Hold on a sec.... pipes are /buffered/ in RAM, so there's at least
    a small bit of ram set aside for each open pipe. On Linux, pipe(7)
    says "In Linux versions before 2.6.11, the capacity of a pipe was
    the same as the system page size (e.g., 4096 bytes on i386).
    Since Linux 2.6.11, the pipe capacity is 65536 bytes. Since
    Linux 2.6.35, the default pipe capacity is 65536 bytes, but
    the capacity can be queried and set using the fcntl(2)
    F_GETPIPE_SZ and F_SETPIPE_SZ operations. See fcntl(2) for
    more information."
    and that "capacity" referred to consists of a kernel-managed RAM buffer.

    [snip]



    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Lew Pitcher on Sun Nov 24 16:56:32 2024
    Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
    On Sun, 24 Nov 2024 14:25:10 +0000, Rich wrote:

    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:
    That’s irrelevant. Pipes originated on the earliest Unix machine,
    which was a PDP-11 with only a 64kiB address space. They work
    great for pumping around gigabytes of data, but you don’t need
    gigabyte-sized memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then
    on a mass storage device.

    Nope, at least not with pipes.

    Hold on a sec.... pipes are /buffered/ in RAM, so there's at least a
    small bit of ram set aside for each open pipe. On Linux, pipe(7)
    says "In Linux versions before 2.6.11, the capacity of a pipe was the
    same as the system page size (e.g., 4096 bytes on i386). Since Linux
    2.6.11, the pipe capacity is 65536 bytes. Since Linux 2.6.35, the
    default pipe capacity is 65536 bytes, but the capacity can be queried
    and set using the fcntl(2) F_GETPIPE_SZ and F_SETPIPE_SZ operations.
    See fcntl(2) for more information." and that "capacity" referred to
    consists of a kernel-managed RAM buffer.

    [snip]

    Fair enough -- about 64k of RAM per each pipe is used for the kernel
    FIFO buffer.

    But that is at most 64k of RAM (unless one's C code adjusts the buffer
    size), regardless of how many GiB flow through the pipe. So it "all"
    (to quote the nymshifter) does not have to be in RAM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to Lew Pitcher on Sun Nov 24 19:14:59 2024
    Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
    On Sun, 24 Nov 2024 14:25:10 +0000, Rich wrote:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:
    That’s irrelevant. Pipes originated on the earliest Unix machine,
    which was a PDP-11 with only a 64kiB address space. They work great
    for pumping around gigabytes of data, but you don’t need
    gigabyte-sized memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then
    on a mass storage device.

    Nope, at least not with pipes.

    Hold on a sec.... pipes are /buffered/ in RAM, so there's at least
    a small bit of ram set aside for each open pipe.

    The word ‘all’ isn’t just decoration. The claim was ‘it all has to be somewhere’, and Rich’s point (as I understand it) is that it does not
    all have to be somewhere.

    For example,

    head -c $((1024*1024*1024)) /dev/urandom | sha256sum

    puts a gigabyte of data through a pipe, but at no point does anything
    allocate anywhere close to a gigabyte of storage of any kind.

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Richard Kettlewell on Sun Nov 24 20:32:46 2024
    On 2024-11-24 20:14, Richard Kettlewell wrote:
    For example,

    head -c $((1024*1024*1024)) /dev/urandom | sha256sum

    puts a gigabyte of data through a pipe, but at no point does anything allocate anywhere close to a gigabyte of storage of any kind.

    With "dd .... -bs=1G" the program size is 1G in ram. Not a pipe, though.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Richard Kettlewell on Sun Nov 24 19:36:57 2024
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
    On Sun, 24 Nov 2024 14:25:10 +0000, Rich wrote:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 11/23/24 4:25 PM, Lawrence D'Oliveiro wrote:
    That’s irrelevant. Pipes originated on the earliest Unix machine, >>>>> which was a PDP-11 with only a 64kiB address space. They work great >>>>> for pumping around gigabytes of data, but you don’t need
    gigabyte-sized memory buffers to do that.

    It all has to be SOMEWHERE ... if not in RAM then
    on a mass storage device.

    Nope, at least not with pipes.

    Hold on a sec.... pipes are /buffered/ in RAM, so there's at least
    a small bit of ram set aside for each open pipe.

    The word ‘all’ isn’t just decoration. The claim was ‘it all has to be
    somewhere’, and Rich’s point (as I understand it) is that it does not
    all have to be somewhere.

    For example,

    head -c $((1024*1024*1024)) /dev/urandom | sha256sum

    puts a gigabyte of data through a pipe, but at no point does anything allocate anywhere close to a gigabyte of storage of any kind.

    Exactly.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to 186282@ud0s4.net on Mon Nov 18 10:46:20 2024
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    Hey, if I feel the need to use files instead of 'pipes' then I WANT
    TO USE FILES INSTEAD OF PIPES.

    Except you did not say you were "using files instead of 'pipes'".

    What you said, in Message-ID: <hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com> was:

    186282@ud0s4.net <186283@ud0s4.net> wrote:
    ...

    Pipes are good.

    But, really, they're just temp files the parent process can access.

    When reality is that pipes have not been "just temp files" since the
    day's of MSDOS's fake "pipes", and for Unix systems, pipes have never
    been "just temp files".

    And when challenged, you doubled down on the just temp files parts.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phillip Frabott@21:1/5 to Rich on Mon Nov 18 09:45:07 2024
    On 11/18/2024 05:46, Rich wrote:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    Hey, if I feel the need to use files instead of 'pipes' then I WANT
    TO USE FILES INSTEAD OF PIPES.

    Except you did not say you were "using files instead of 'pipes'".

    What you said, in Message-ID: <hzSdnTUBKbG_YKv6nZ2dnZfqnPQAAAAA@earthlink.com>
    was:

    186282@ud0s4.net <186283@ud0s4.net> wrote:
    ...

    Pipes are good.

    But, really, they're just temp files the parent process can access.

    When reality is that pipes have not been "just temp files" since the
    day's of MSDOS's fake "pipes", and for Unix systems, pipes have never
    been "just temp files".

    And when challenged, you doubled down on the just temp files parts.

    I think the point that is being made by calling pipes a "temp files" is
    that they are not persistent. When the computer is turned off they
    disappear (unlike files on hard (persistent) storage). Granted a pipe
    might re-appear later when the system is back up and running but my
    professor always said, don't expect any guarantees with pipes. They may
    be there, they may not be there, you might be able to use them one
    minute and they disappear the next. Consider them temporary aberrations
    until proven otherwise.

    Chances are that the pipes of today are more solid then the pipes of yesteryear, but we've all grown up at different times with different
    states of computing and different upbringings. There are pros and cons
    to everything, including using files AND using pipes. To each their own.

    I wouldn't argue about the small things like this.

    --
    Phillip Frabott
    ----------
    - Adam: Is a void really a void if it returns?
    - Jack: No, it's just nullspace at that point.
    ----------

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Wed Nov 20 00:22:50 2024
    On Mon, 18 Nov 2024 01:20:53 -0500, 186282@ud0s4.net wrote:

    Hey, if I feel the need to use files instead of 'pipes' then I WANT TO
    USE FILES INSTEAD OF PIPES.

    Except ... you were trying to argue that there was no fundamental
    difference between pipes and files anyway. That you could somehow do
    everything you could do with pipes by using temporary files.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Phillip Frabott on Wed Nov 20 00:23:48 2024
    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:

    I think the point that is being made by calling pipes a "temp files" is
    that they are not persistent.

    Named pipes can indeed be persistent.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to All on Tue Nov 19 21:57:05 2024
    On 11/18/24 4:13 AM, D wrote:


    On Mon, 18 Nov 2024, 186282@ud0s4.net wrote:

    There has been a long tendency in Linux/comp groups
    to horribly attack, belittle, abuse, anybody who has
    had a 'different experience' and sees things a little
    off some kinda poorly-defined 'norm'.

    Sorry, we all didn't come up on the same track.
    A thousand different paths, a thousand different
    styles of apps/needs/solutions. Computers let
    you DO that.

    Hey, if I feel the need to use files instead
    of 'pipes' then I WANT TO USE FILES INSTEAD
    OF PIPES. Don't like it ? Tuff titty. Any
    'contributions' will be to tell me how to
    maximize that approach - not to rain down piss.

    (actually I think pipes are better - but there
    are and will be other approaches/reasons)

    The recent elections kinda upset the Linux/Unix
    groups - a lot of politics promoted a lot of
    threads. Well, the elections are OVER now.
    Back to business.

    BUT ... consider ... "back to business" does
    not need to mean "back to old habits". We all
    can do BETTER, move towards the future instead
    of being at each others throats over NOTHING.

    Just sayin'

    Most everybody here seems to have been in the
    groove since (or during) PUNCH CARDS. Let's
    not be petty. We all did it OUR WAY.

    Hey, I remember the giant handful of punch
    cards - DON'T DROP 'EM !  :-)

    Are you saying we should disregard the emperor? Doesn't he teach us that
    our hate makes us stronger?


    Well, the 'woke' really did try to show us the
    power of higher, gigabuck-funded, hate :-)

    But that's all over for now.

    In any case, I prefer to see these comp groups
    as being much better when they are collaborative,
    rather than derogative. Be you old boy or newbie,
    everybody has a different 'vision', a slightly
    different take on 'how it should be done'. Adding
    1000 cuts and ad-homs - all too common on usenet -
    does not represent any kind of improvement.

    Just wanted to say it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to 186282@ud0s4.net on Wed Nov 20 10:01:38 2024
    This message is in MIME format. The first part should be readable text,
    while the remaining parts are likely unreadable without MIME-aware tools.

    On Tue, 19 Nov 2024, 186282@ud0s4.net wrote:

    On 11/18/24 4:13 AM, D wrote:


    On Mon, 18 Nov 2024, 186282@ud0s4.net wrote:

    There has been a long tendency in Linux/comp groups
    to horribly attack, belittle, abuse, anybody who has
    had a 'different experience' and sees things a little
    off some kinda poorly-defined 'norm'.

    Sorry, we all didn't come up on the same track.
    A thousand different paths, a thousand different
    styles of apps/needs/solutions. Computers let
    you DO that.

    Hey, if I feel the need to use files instead
    of 'pipes' then I WANT TO USE FILES INSTEAD
    OF PIPES. Don't like it ? Tuff titty. Any
    'contributions' will be to tell me how to
    maximize that approach - not to rain down piss.

    (actually I think pipes are better - but there
    are and will be other approaches/reasons)

    The recent elections kinda upset the Linux/Unix
    groups - a lot of politics promoted a lot of
    threads. Well, the elections are OVER now.
    Back to business.

    BUT ... consider ... "back to business" does
    not need to mean "back to old habits". We all
    can do BETTER, move towards the future instead
    of being at each others throats over NOTHING.

    Just sayin'

    Most everybody here seems to have been in the
    groove since (or during) PUNCH CARDS. Let's
    not be petty. We all did it OUR WAY.

    Hey, I remember the giant handful of punch
    cards - DON'T DROP 'EM !  :-)

    Are you saying we should disregard the emperor? Doesn't he teach us that
    our hate makes us stronger?


    Well, the 'woke' really did try to show us the
    power of higher, gigabuck-funded, hate :-)

    But that's all over for now.

    In any case, I prefer to see these comp groups
    as being much better when they are collaborative,
    rather than derogative. Be you old boy or newbie,
    everybody has a different 'vision', a slightly
    different take on 'how it should be done'. Adding
    1000 cuts and ad-homs - all too common on usenet -
    does not represent any kind of improvement.

    Just wanted to say it.



    You are a wise man, 186282!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phillip Frabott@21:1/5 to Lawrence D'Oliveiro on Thu Nov 21 02:05:46 2024
    On 11/19/2024 19:23, Lawrence D'Oliveiro wrote:
    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:

    I think the point that is being made by calling pipes a "temp files" is
    that they are not persistent.

    Named pipes can indeed be persistent.

    Sure, but then your just creating a file with all the limitations that
    come from that. IPC only benefits you when you use unnamed or
    traditional pipes (performance and resources). Also, the pipe still
    requires something on the other side of the transaction which might not
    exist at some later point. Whereas a file on hard storage will almost
    always be able to be transacted (assuming permissions of course)
    regardless of what processes are (or are not) available. Also pipes also require realtime processing, whereas storing things in a file can
    provide for delayed/deferred processing at a later time.

    Now, sure piping a command may be less typing, but there is no real
    tangible benefit from the technical side from using a pipe vs typing the command out over multiple lines of commands, the transaction remains the
    same in both cases. But having non-persistent pipes gives you speed and performance perks (and in most cases uses less RAM). So if your going to
    do named pipes just know you aren't getting the real benefits of the IPC
    if it's just going to write a file anyways.

    --
    Phillip Frabott
    ----------
    - Adam: Is a void really a void if it returns?
    - Jack: No, it's just nullspace at that point.
    ----------

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Phillip Frabott on Thu Nov 21 07:22:05 2024
    On Thu, 21 Nov 2024 02:05:46 -0500, Phillip Frabott wrote:

    On 11/19/2024 19:23, Lawrence D'Oliveiro wrote:

    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:

    I think the point that is being made by calling pipes a "temp files"
    is that they are not persistent.

    Named pipes can indeed be persistent.

    Sure, but then your just creating a file with all the limitations that
    come from that.

    Not at all. It still has the same synchronization behaviour.

    IPC only benefits you when you use unnamed or traditional pipes
    (performance and resources).

    Certainly not.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phillip Frabott@21:1/5 to Lawrence D'Oliveiro on Thu Nov 21 10:12:18 2024
    On 11/21/2024 02:22, Lawrence D'Oliveiro wrote:
    On Thu, 21 Nov 2024 02:05:46 -0500, Phillip Frabott wrote:

    On 11/19/2024 19:23, Lawrence D'Oliveiro wrote:

    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:

    I think the point that is being made by calling pipes a "temp files"
    is that they are not persistent.

    Named pipes can indeed be persistent.

    Sure, but then your just creating a file with all the limitations that
    come from that.

    Not at all. It still has the same synchronization behaviour.

    IPC only benefits you when you use unnamed or traditional pipes
    (performance and resources).

    Certainly not.

    I guess it just depends on what you are doing. And in perspective, most
    pipes are generally used for small amounts of data, the smaller then
    data the less benefits you see between unnamed vs named pipes. I mean
    100-bytes has zero performance differences between named and unnamed
    while a 10MB pipe will always show that unnamed pipes are faster then
    named pipes. So it's just depends on what you are doing and the data you
    have. But as far as I know named pipes still go away when you turn the
    machine off unless you are redirecting /tmp to hard storage.

    And to be fair, I don't use named pipes as much as I used to so perhaps
    things have changed. I've never had a good reason to use named pipes in
    code in a very long time.

    --
    Phillip Frabott
    ----------
    - Adam: Is a void really a void if it returns?
    - Jack: No, it's just nullspace at that point.
    ----------

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to Phillip Frabott on Thu Nov 21 18:38:58 2024
    Phillip Frabott <nntp@fulltermprivacy.com> writes:
    On 11/21/2024 02:22, Lawrence D'Oliveiro wrote:
    On Thu, 21 Nov 2024 02:05:46 -0500, Phillip Frabott wrote:
    On 11/19/2024 19:23, Lawrence D'Oliveiro wrote:
    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:
    I think the point that is being made by calling pipes a "temp files" >>>>> is that they are not persistent.

    Named pipes can indeed be persistent.

    Sure, but then your just creating a file with all the limitations that
    come from that.

    This remark makes me wonder if you’ve got the wrong end of the stick
    about what a named pipe is. They are really not the same as regular
    files, temporary or otherwise.

    Not at all. It still has the same synchronization behaviour.

    IPC only benefits you when you use unnamed or traditional pipes
    (performance and resources).
    Certainly not.

    I guess it just depends on what you are doing. And in perspective,
    most pipes are generally used for small amounts of data, the smaller
    then data the less benefits you see between unnamed vs named pipes. I
    mean 100-bytes has zero performance differences between named and
    unnamed while a 10MB pipe will always show that unnamed pipes are
    faster then named pipes.

    Apart from the details of how you get file descriptors to them, named
    and anonymous pipes are identical.

    Empirically (and unsurprisingly) there’s no performance difference in
    Linux.

    So it's just depends on what you are doing and the data you have. But
    as far as I know named pipes still go away when you turn the machine
    off unless you are redirecting /tmp to hard storage.

    The _contents_ of any kind of pipe go away when the last file descriptor
    to them is closed (including rebooting or turning of the machine).

    The _name_ of a named pipe goes away when it is unlinked or the
    filesystem containing it is destroyed (which would include turning off
    the machine, if the name is in a tmpfs).

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Phillip Frabott on Thu Nov 21 21:56:46 2024
    On Thu, 21 Nov 2024 10:12:18 -0500, Phillip Frabott wrote:

    On 11/21/2024 02:22, Lawrence D'Oliveiro wrote:
    On Thu, 21 Nov 2024 02:05:46 -0500, Phillip Frabott wrote:

    On 11/19/2024 19:23, Lawrence D'Oliveiro wrote:

    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:

    I think the point that is being made by calling pipes a "temp files" >>>>> is that they are not persistent.

    Named pipes can indeed be persistent.

    Sure, but then your just creating a file with all the limitations that
    come from that.

    Not at all. It still has the same synchronization behaviour.

    IPC only benefits you when you use unnamed or traditional pipes
    (performance and resources).

    Certainly not.

    I guess it just depends on what you are doing.

    No it doesn’t. Named or not, pipes are pipes.

    And in perspective, most pipes are generally used for small amounts of
    data ...

    I have used them to transfer quite large amounts, quickly and reliably.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Phillip Frabott on Fri Nov 22 03:12:43 2024
    On Thu, 21 Nov 2024 21:55:37 -0500, Phillip Frabott wrote:

    We had to drop named pipes solely because of the performance hit
    because it is writing to a file system so it's being controlled by the
    file system, even if that file system is in memory.

    That doesn’t make any sense, if we were talking about Linux. Is this on Windows, by any chance?

    As the demand grows, we are actually at the limits of performance that
    even unnamed pipes gives us. So we are starting to migrate to UNIX
    sockets which has about double to bandwidth and performance of pipes.

    Not sure how that works, given that Unix sockets are actually a more
    complex mechanism than pipes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phillip Frabott@21:1/5 to Richard Kettlewell on Thu Nov 21 21:55:37 2024
    On 11/21/2024 13:38, Richard Kettlewell wrote:

    This remark makes me wonder if you’ve got the wrong end of the stick
    about what a named pipe is. They are really not the same as regular
    files, temporary or otherwise.


    From a performance perspective they are. At least from the work I've
    done. We had to drop named pipes solely because of the performance hit
    because it is writing to a file system so it's being controlled by the
    file system, even if that file system is in memory. Anonymous (unnamed)
    pipes seem to be different. Maybe it's the differences between how FIFO
    works with named pipes over the regular pipes. I don't know, but we've
    never been able to get named pipes to be 1:1 performance with unnamed pipes.

    My best guess is that since unnamed pipes are not written to a file
    system, it has a small performance advantage over named pipes. I deal
    with large data streams that have very very small TTL's on them (in come
    cases only a couple ms) so if a pipe takes too long it will get bogged
    down and won't keep up. So it might be specific to the uses we have at
    work. In probably 90% of everyone else's uses it's probably not noticeable.

    As the demand grows, we are actually at the limits of performance that
    even unnamed pipes gives us. So we are starting to migrate to UNIX
    sockets which has about double to bandwidth and performance of pipes.

    --
    Phillip Frabott
    ----------
    - Adam: Is a void really a void if it returns?
    - Jack: No, it's just nullspace at that point.
    ----------

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to ldo@nz.invalid on Fri Nov 22 06:09:05 2024
    On Fri, 22 Nov 2024 03:12:43 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <vhosra$1171f$1@dont-email.me>:

    On Thu, 21 Nov 2024 21:55:37 -0500, Phillip Frabott wrote:

    We had to drop named pipes solely because of the performance hit
    because it is writing to a file system so it's being controlled by the
    file system, even if that file system is in memory.

    That doesn’t make any sense, if we were talking about Linux. Is this on Windows, by any chance?

    Doesn't the named pipe connection work through the filesystem code?
    That could add overhead.

    Can't use named pipes on just any filesystem -- won't work on NFS
    for example, unless I'm mistaken.


    As the demand grows, we are actually at the limits of performance that
    even unnamed pipes gives us. So we are starting to migrate to UNIX
    sockets which has about double to bandwidth and performance of pipes.

    Not sure how that works, given that Unix sockets are actually a more
    complex mechanism than pipes.

    With Unix sockets, once the connection is made, it's all in-memory
    networking. I suspect (but don't know) that named pipes require the
    data to pass through the filesystem for each write.

    But I could be completely wrong, don't take my word for it.

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.0 Release: Mint 21.3 Mem: 258G
    "The way to a man's heart is through the left ventricle."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to vallor on Fri Nov 22 06:37:06 2024
    On 22 Nov 2024 06:09:05 GMT, vallor wrote:

    Doesn't the named pipe connection work through the filesystem code? That could add overhead.

    No. The only thing that exists in the filesystem is the “special file” entry in the directory. Opening that triggers special-case processing in
    the kernel that creates the usual pipe buffering/synchronization
    structures (or links up with existing structures created by some prior
    opening of the same special file, perhaps by a different process), not dependent on any filesystem.

    I just tried creating a C program to do speed tests on data transfers
    through pipes and socket pairs between processes. I am currently setting
    the counter to 10 gigabytes, and transferring that amount of data (using whichever mechanism) only takes a couple of seconds on my system.

    So the idea that pipes are somehow not suited to large data transfers is patently nonsense.

    Can't use named pipes on just any filesystem -- won't work on NFS for example, unless I'm mistaken.

    Hard to believe NFS could stuff that up, but there you go ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Fri Nov 22 01:44:35 2024
    On 11/21/24 4:56 PM, Lawrence D'Oliveiro wrote:
    On Thu, 21 Nov 2024 10:12:18 -0500, Phillip Frabott wrote:

    On 11/21/2024 02:22, Lawrence D'Oliveiro wrote:
    On Thu, 21 Nov 2024 02:05:46 -0500, Phillip Frabott wrote:

    On 11/19/2024 19:23, Lawrence D'Oliveiro wrote:

    On Mon, 18 Nov 2024 09:45:07 -0500, Phillip Frabott wrote:

    I think the point that is being made by calling pipes a "temp files" >>>>>> is that they are not persistent.

    Named pipes can indeed be persistent.

    Sure, but then your just creating a file with all the limitations that >>>> come from that.

    Not at all. It still has the same synchronization behaviour.

    IPC only benefits you when you use unnamed or traditional pipes
    (performance and resources).

    Certainly not.

    I guess it just depends on what you are doing.

    No it doesn’t. Named or not, pipes are pipes.

    And in perspective, most pipes are generally used for small amounts of
    data ...

    I have used them to transfer quite large amounts, quickly and reliably.

    Yep, WILL work. No question.

    The question is HOW MUCH should you intend to send back
    and forth using pipes (or any other method) between the
    parent and children.

    IMHO, keeping it 'minimal' is Better Programming ... but
    others may have different visions/needs/sensibilities.

    If you build things that need TOO much data passed
    around - do you REALLY want a parent/child sort of
    paradigm at all ? "One Big Pgm With Lots Of Globals"
    seems more sensible.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Fri Nov 22 06:49:32 2024
    On Fri, 22 Nov 2024 01:44:35 -0500, 186282@ud0s4.net wrote:

    On 11/21/24 4:56 PM, Lawrence D'Oliveiro wrote:

    I have used them to transfer quite large amounts, quickly and reliably.

    Yep, WILL work. No question.

    The question is HOW MUCH should you intend to send back
    and forth using pipes (or any other method) between the
    parent and children.

    How about 10 gigabytes, which I was able to transfer in two seconds? Is
    that “too much” for you?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to ldo@nz.invalid on Fri Nov 22 07:02:47 2024
    On Fri, 22 Nov 2024 06:37:06 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <vhp8qi$12m83$2@dont-email.me>:

    On 22 Nov 2024 06:09:05 GMT, vallor wrote:

    Doesn't the named pipe connection work through the filesystem code? That
    could add overhead.

    No. The only thing that exists in the filesystem is the “special file” entry in the directory. Opening that triggers special-case processing in
    the kernel that creates the usual pipe buffering/synchronization
    structures (or links up with existing structures created by some prior opening of the same special file, perhaps by a different process), not dependent on any filesystem.

    I just tried creating a C program to do speed tests on data transfers
    through pipes and socket pairs between processes. I am currently setting
    the counter to 10 gigabytes, and transferring that amount of data (using whichever mechanism) only takes a couple of seconds on my system.

    So the idea that pipes are somehow not suited to large data transfers is patently nonsense.

    Can't use named pipes on just any filesystem -- won't work on NFS for
    example, unless I'm mistaken.

    Hard to believe NFS could stuff that up, but there you go ...

    Just tested NFS, and named pipes work there.

    $ time -p ( dd if=/dev/zero of=test count=$[1024*1024] ) & cat test > /dev/null [1] 38859
    1048576+0 records in
    1048576+0 records out
    536870912 bytes (537 MB, 512 MiB) copied, 0.918945 s, 584 MB/s
    real 0.92
    user 0.16
    sys 0.76

    NFS vers 4.1.

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.0 Release: Mint 21.3 Mem: 258G
    "Diagonally parked in a parallel universe."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to Phillip Frabott on Fri Nov 22 10:04:21 2024
    Phillip Frabott <nntp@fulltermprivacy.com> writes:
    On 11/21/2024 13:38, Richard Kettlewell wrote:
    This remark makes me wonder if you’ve got the wrong end of the stick
    about what a named pipe is. They are really not the same as regular
    files, temporary or otherwise.

    From a performance perspective they are. At least from the work I've
    done. We had to drop named pipes solely because of the performance hit because it is writing to a file system

    The only filesystem write involve is the initial mkfifo(at) call. No
    further filesystem writes are involved.

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to vallor on Fri Nov 22 19:11:23 2024
    vallor <vallor@cultnix.org> wrote:
    On Fri, 22 Nov 2024 03:12:43 -0000 (UTC), Lawrence D'Oliveiro <ldo@nz.invalid> wrote in <vhosra$1171f$1@dont-email.me>:

    On Thu, 21 Nov 2024 21:55:37 -0500, Phillip Frabott wrote:

    We had to drop named pipes solely because of the performance hit
    because it is writing to a file system so it's being controlled by the
    file system, even if that file system is in memory.

    That doesn’t make any sense, if we were talking about Linux. Is this on
    Windows, by any chance?

    Doesn't the named pipe connection work through the filesystem code?
    That could add overhead.

    Only to the extent that a filesystem lookup has to occur to lookup the
    name in order to open() the name.

    Once you have a file descriptor back from the open() call, there is no difference at all kernel wise betwenn the two, they are one and the
    same block of kernel code.

    Can't use named pipes on just any filesystem -- won't work on NFS
    for example, unless I'm mistaken.

    Correct, you need a filesystem that supports storing a 'name' that
    that is a reference to a pipe, so windows filesystems are out.

    Named pipes appear as 'pipe' nodes across NFS (just tested this to be
    certian). And, so long as all the "accessors" of the named pipe are
    running on the same Linux machine with the NFS mount containing the
    pipe node, the named pipe works as expected (just tested this as well).

    But a named pipe on NFS does not give you a machine to machine (two
    different machines) transmit channel.

    As the demand grows, we are actually at the limits of performance that
    even unnamed pipes gives us. So we are starting to migrate to UNIX
    sockets which has about double to bandwidth and performance of pipes.

    Not sure how that works, given that Unix sockets are actually a more
    complex mechanism than pipes.

    With Unix sockets, once the connection is made, it's all in-memory networking.

    Correct.

    I suspect (but don't know) that named pipes require the data to pass
    through the filesystem for each write.

    Incorrect. The only 'filesystem' access for named pipes is during the
    open() call to look up the name from the filesystem. Once you get the
    file descriptor back, it is the exact same in-memory FIFO queue as an
    anonymous pipe created via pipe() (at least on Linux).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to All on Sat Nov 23 03:25:08 2024
    On Fri, 22 Nov 2024 19:11:23 -0000 (UTC), Rich <rich@example.invalid>
    wrote in <vhql0r$1a0ch$2@dont-email.me>:

    vallor <vallor@cultnix.org> wrote:
    On Fri, 22 Nov 2024 03:12:43 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <vhosra$1171f$1@dont-email.me>:

    On Thu, 21 Nov 2024 21:55:37 -0500, Phillip Frabott wrote:

    We had to drop named pipes solely because of the performance hit
    because it is writing to a file system so it's being controlled by
    the file system, even if that file system is in memory.

    That doesn’t make any sense, if we were talking about Linux. Is this
    on Windows, by any chance?

    Doesn't the named pipe connection work through the filesystem code?
    That could add overhead.

    Only to the extent that a filesystem lookup has to occur to lookup the
    name in order to open() the name.

    Once you have a file descriptor back from the open() call, there is no difference at all kernel wise betwenn the two, they are one and the same block of kernel code.

    I stand corrected about that.


    Can't use named pipes on just any filesystem -- won't work on NFS for
    example, unless I'm mistaken.

    Correct, you need a filesystem that supports storing a 'name' that that
    is a reference to a pipe, so windows filesystems are out.

    Named pipes appear as 'pipe' nodes across NFS (just tested this to be certian). And, so long as all the "accessors" of the named pipe are
    running on the same Linux machine with the NFS mount containing the pipe node, the named pipe works as expected (just tested this as well).

    I tested it too (with an NFS v4.1 filesystem), and yes, mkfifo makes
    a named pipe, and it works as expected. (Didn't expect it to work
    across machines, though that would be a neat trick.)


    But a named pipe on NFS does not give you a machine to machine (two
    different machines) transmit channel.

    As the demand grows, we are actually at the limits of performance
    that even unnamed pipes gives us. So we are starting to migrate to
    UNIX sockets which has about double to bandwidth and performance of
    pipes.

    Not sure how that works, given that Unix sockets are actually a more
    complex mechanism than pipes.

    With Unix sockets, once the connection is made, it's all in-memory
    networking.

    Correct.

    I suspect (but don't know) that named pipes require the data to pass
    through the filesystem for each write.

    Incorrect. The only 'filesystem' access for named pipes is during the
    open() call to look up the name from the filesystem. Once you get the
    file descriptor back, it is the exact same in-memory FIFO queue as an anonymous pipe created via pipe() (at least on Linux).

    Again, I stand corrected on that.

    (Haven't figured out how to increase ulimit -p yet, doesn't seem
    to want to increase, even as root...)

    --
    -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
    OS: Linux 6.12.0 Release: Mint 21.3 Mem: 258G
    "A good hot dog feeds the hand that bites it."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to vallor on Sat Nov 23 04:28:07 2024
    vallor <vallor@cultnix.org> wrote:
    (Haven't figured out how to increase ulimit -p yet, doesn't seem
    to want to increase, even as root...)

    From the ulimit manpage:

    -p The pipe size in 512-byte blocks (this may not be set)

    Note the "this may not be set" part at the end.


    It is likely the case that if you wanted to increase the pipe size that
    you would have to make a change in the kernel source and recompile a
    custom kernel.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to vallor on Sat Nov 23 04:50:09 2024
    On 23 Nov 2024 03:25:08 GMT, vallor wrote:

    I tested it too (with an NFS v4.1 filesystem), and yes, mkfifo makes a
    named pipe, and it works as expected. (Didn't expect it to work across machines, though that would be a neat trick.)

    No reason why it shouldn’t work, provided the network protocol has support for recognizing such special files.

    (Haven't figured out how to increase ulimit -p yet, doesn't seem to want
    to increase, even as root...)

    <https://manpages.debian.org/7/pipe.7.en.html> mentions the /proc/sys/fs/pipe-max-size configuration limit. It could be that ulimit -p
    has no effect on Linux.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Fri Nov 22 23:44:24 2024
    On 11/22/24 1:49 AM, Lawrence D'Oliveiro wrote:
    On Fri, 22 Nov 2024 01:44:35 -0500, 186282@ud0s4.net wrote:

    On 11/21/24 4:56 PM, Lawrence D'Oliveiro wrote:

    I have used them to transfer quite large amounts, quickly and reliably.

    Yep, WILL work. No question.

    The question is HOW MUCH should you intend to send back
    and forth using pipes (or any other method) between the
    parent and children.

    How about 10 gigabytes, which I was able to transfer in two seconds? Is
    that “too much” for you?


    Yep - though you may have had a 'radical vision' when
    writing your parent/child app .... just because *I*
    wouldn't do it .......

    256 Bytes is about as far as I'd go. The children/threads
    should deal with the big files themselves IMHO. Put the
    kids to work :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Sat Nov 23 05:19:59 2024
    On Fri, 22 Nov 2024 23:44:24 -0500, 186282@ud0s4.net wrote:

    On 11/22/24 1:49 AM, Lawrence D'Oliveiro wrote:
    On Fri, 22 Nov 2024 01:44:35 -0500, 186282@ud0s4.net wrote:

    On 11/21/24 4:56 PM, Lawrence D'Oliveiro wrote:

    I have used them to transfer quite large amounts, quickly and
    reliably.

    Yep, WILL work. No question.

    The question is HOW MUCH should you intend to send back and forth
    using pipes (or any other method) between the parent and children.

    How about 10 gigabytes, which I was able to transfer in two seconds? Is
    that “too much” for you?

    Yep - though you may have had a 'radical vision' when writing your parent/child app .... just because *I* wouldn't do it .......

    You didn’t realize IPC on *nix is industrial-strength?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Sat Nov 23 01:27:25 2024
    On 11/23/24 12:19 AM, Lawrence D'Oliveiro wrote:
    On Fri, 22 Nov 2024 23:44:24 -0500, 186282@ud0s4.net wrote:

    On 11/22/24 1:49 AM, Lawrence D'Oliveiro wrote:
    On Fri, 22 Nov 2024 01:44:35 -0500, 186282@ud0s4.net wrote:

    On 11/21/24 4:56 PM, Lawrence D'Oliveiro wrote:

    I have used them to transfer quite large amounts, quickly and
    reliably.

    Yep, WILL work. No question.

    The question is HOW MUCH should you intend to send back and forth
    using pipes (or any other method) between the parent and children.

    How about 10 gigabytes, which I was able to transfer in two seconds? Is
    that “too much” for you?

    Yep - though you may have had a 'radical vision' when writing your
    parent/child app .... just because *I* wouldn't do it .......

    You didn’t realize IPC on *nix is industrial-strength?


    I know it CAN handle BIG transactions.

    But SHOULD it ?

    This is maybe a "philosophical" matter ...

    I'm still of the crap CPU/Mem era ... always look
    to minimize/simplify.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Sat Nov 23 07:41:49 2024
    On Sat, 23 Nov 2024 01:27:25 -0500, 186282@ud0s4.net wrote:

    On 11/23/24 12:19 AM, Lawrence D'Oliveiro wrote:

    You didn’t realize IPC on *nix is industrial-strength?

    I know it CAN handle BIG transactions.

    But SHOULD it ?

    That’s what it’s designed for!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Tue Dec 3 01:19:53 2024
    On 11/19/24 7:22 PM, Lawrence D'Oliveiro wrote:
    On Mon, 18 Nov 2024 01:20:53 -0500, 186282@ud0s4.net wrote:

    Hey, if I feel the need to use files instead of 'pipes' then I WANT TO
    USE FILES INSTEAD OF PIPES.

    Except ... you were trying to argue that there was no fundamental
    difference between pipes and files anyway. That you could somehow do everything you could do with pipes by using temporary files.

    Yep.

    But I *just may not WANT to* :-)

    Files DO have a hidden advantage - many largely
    dis-related programs can ACCESS them. This can
    give you stats, insight, 'intelligence'. Pipes
    are basically restricted to the original parent
    and children. Good reasons for that, sometimes,
    but not *always*.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Tue Dec 3 06:49:41 2024
    On Tue, 3 Dec 2024 01:19:53 -0500, 186282@ud0s4.net wrote:

    Files DO have a hidden advantage - many largely dis-related programs
    can ACCESS them.

    On *nix systems, pipes can be accessed just as easily.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Wed Dec 4 01:10:25 2024
    On 12/3/24 1:49 AM, Lawrence D'Oliveiro wrote:
    On Tue, 3 Dec 2024 01:19:53 -0500, 186282@ud0s4.net wrote:

    Files DO have a hidden advantage - many largely dis-related programs
    can ACCESS them.

    On *nix systems, pipes can be accessed just as easily.

    Well ... do it your way :-)

    I'll stay more flexible, whatever inspires.

    I can't really argue over pipes/files ... they
    can both get the same thing done. Files CAN be
    a bit more flexible, even non-pipe langs can
    access them very easily.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to 186282@ud0s4.net on Wed Dec 4 06:45:39 2024
    On Wed, 4 Dec 2024 01:10:25 -0500, 186282@ud0s4.net wrote:

    On 12/3/24 1:49 AM, Lawrence D'Oliveiro wrote:

    On Tue, 3 Dec 2024 01:19:53 -0500, 186282@ud0s4.net wrote:

    Files DO have a hidden advantage - many largely dis-related programs
    can ACCESS them.

    On *nix systems, pipes can be accessed just as easily.

    I can't really argue over pipes/files ...

    Consider this:

    cat <(echo first line) <(echo second line) <(echo third line)

    Output:

    first line
    second line
    third line

    What’s going on here?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard L. Hamilton@21:1/5 to 186282@ud0s4.net on Sat Dec 14 08:06:52 2024
    In article <lNycnZghasCXPtP6nZ2dnZfqnPSdnZ2d@earthlink.com>,
    "186282@ud0s4.net" <186283@ud0s4.net> writes:
    On 11/19/24 7:22 PM, Lawrence D'Oliveiro wrote:
    On Mon, 18 Nov 2024 01:20:53 -0500, 186282@ud0s4.net wrote:

    Hey, if I feel the need to use files instead of 'pipes' then I WANT TO
    USE FILES INSTEAD OF PIPES.

    Except ... you were trying to argue that there was no fundamental
    difference between pipes and files anyway. That you could somehow do
    everything you could do with pipes by using temporary files.

    Yep.

    But I *just may not WANT to* :-)

    Files DO have a hidden advantage - many largely
    dis-related programs can ACCESS them. This can
    give you stats, insight, 'intelligence'. Pipes
    are basically restricted to the original parent
    and children. Good reasons for that, sometimes,
    but not *always*.

    Named pipes can allow communication between unrelated processes.

    Using files means there has to be locking or some coordination, so
    that the receiver only reads the file when the contents are in a
    consistent state. Renaming a file (on the same filesystem, where it's
    not a copy and delete) is atomic, so if the file is created in one
    directory and moved to a parallel directory when complete, the
    receiving program can just grab it from there, perhaps after being
    signalled to wake up and scan the directory. That works somewhat
    efficiently even without modern locking or filesystem change
    notification mechanisms.

    A file has the advantage that one can seek on it, which may simplify
    some things; for example if a header has a checksum over the following
    data, it's easier to seek back and fill that field in with its final
    value. Otherwise one may have to use a temporary file internally anyway.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pancho@21:1/5 to Richard L. Hamilton on Sat Dec 14 10:10:57 2024
    On 12/14/24 08:06, Richard L. Hamilton wrote:
    In article <lNycnZghasCXPtP6nZ2dnZfqnPSdnZ2d@earthlink.com>,
    "186282@ud0s4.net" <186283@ud0s4.net> writes:
    On 11/19/24 7:22 PM, Lawrence D'Oliveiro wrote:
    On Mon, 18 Nov 2024 01:20:53 -0500, 186282@ud0s4.net wrote:

    Hey, if I feel the need to use files instead of 'pipes' then I WANT TO >>>> USE FILES INSTEAD OF PIPES.

    Except ... you were trying to argue that there was no fundamental
    difference between pipes and files anyway. That you could somehow do
    everything you could do with pipes by using temporary files.

    Yep.

    But I *just may not WANT to* :-)

    Files DO have a hidden advantage - many largely
    dis-related programs can ACCESS them. This can
    give you stats, insight, 'intelligence'. Pipes
    are basically restricted to the original parent
    and children. Good reasons for that, sometimes,
    but not *always*.

    Named pipes can allow communication between unrelated processes.

    Using files means there has to be locking or some coordination, so
    that the receiver only reads the file when the contents are in a
    consistent state.

    I don't really know, but I would be surprised if that were always true.

    Renaming a file (on the same filesystem, where it's
    not a copy and delete) is atomic, so if the file is created in one
    directory and moved to a parallel directory when complete, the
    receiving program can just grab it from there, perhaps after being
    signalled to wake up and scan the directory. That works somewhat
    efficiently even without modern locking or filesystem change
    notification mechanisms.


    I suspect you are mixing up sensible programming techniques for handling
    file concurrency, with the way things need to be. i.e. I think it is
    perfectly possible to have concurrent programs read and write to the
    same file, it is just that there might be a few gotchas. Whereas
    renaming is a very safe and simple technique, avoiding many potential
    problems.

    A file has the advantage that one can seek on it, which may simplify
    some things; for example if a header has a checksum over the following
    data, it's easier to seek back and fill that field in with its final
    value. Otherwise one may have to use a temporary file internally anyway.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to root on Sat Dec 14 16:06:33 2024
    On 14/12/2024 15:54, root wrote:
    If you create a tmpfs /ram directory then pipes or named
    files would both work in ram, and there would be no
    functional difference.

    I am not sure how pipes work as to be certain of that. There are
    overheads associated with files and with pipes.

    I am a fan of ramdisk files because I understand files, but not really
    pipes.
    But I cant say they are as good. They are, for me. merely 'good enough'

    --
    “The fundamental cause of the trouble in the modern world today is that
    the stupid are cocksure while the intelligent are full of doubt."

    - Bertrand Russell

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From root@21:1/5 to All on Sat Dec 14 15:54:30 2024
    If you create a tmpfs /ram directory then pipes or named
    files would both work in ram, and there would be no
    functional difference.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geoff Clare@21:1/5 to The Natural Philosopher on Tue Dec 17 13:34:30 2024
    The Natural Philosopher wrote:

    On 14/12/2024 15:54, root wrote:
    If you create a tmpfs /ram directory then pipes or named
    files would both work in ram, and there would be no
    functional difference.

    I am not sure how pipes work as to be certain of that.

    In fact quite the opposite is true; there is a very real and
    easily noticeable functional difference.

    If you use a regular file in a tmpfs to transfer data between two
    processes, the amount of data you can transfer is limited to the
    free space on the tmpfs, unless you go to great lengths to put
    logic into the two processes to coordinate the reading and writing
    such that the file never grows larger than a certain size and is
    overwritten as necessary. You also need a way for the writer to
    indicate to the reader that all of the data has been written.

    With a pipe or FIFO, you just use simple read and write operations
    and the system handles all the messy stuff for you. If the pipe
    reaches capacity, write blocks until there is room to write some
    more; if the pipe becomes empty, read blocks until there is more
    data available; when read returns EOF that's the end of the data.

    --
    Geoff Clare <netnews@gclare.org.uk>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Geoff Clare on Wed Dec 18 01:23:18 2024
    On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:

    With a pipe or FIFO, you just use simple read and write operations and
    the system handles all the messy stuff for you. If the pipe reaches
    capacity, write blocks until there is room to write some more; if the
    pipe becomes empty, read blocks until there is more data available; when
    read returns EOF that's the end of the data.

    Yup. Furthermore:

    * When the last writer closes its end, any remaining read attempts get
    EOF.
    * When the last reader closes its end, any remaining write attempts get “broken pipe”.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 186283@ud0s4.net@21:1/5 to Lawrence D'Oliveiro on Tue Dec 17 23:25:25 2024
    On 12/17/24 8:23 PM, Lawrence D'Oliveiro wrote:
    On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:

    With a pipe or FIFO, you just use simple read and write operations and
    the system handles all the messy stuff for you. If the pipe reaches
    capacity, write blocks until there is room to write some more; if the
    pipe becomes empty, read blocks until there is more data available; when
    read returns EOF that's the end of the data.

    Yup. Furthermore:

    * When the last writer closes its end, any remaining read attempts get
    EOF.
    * When the last reader closes its end, any remaining write attempts get “broken pipe”.

    But you're still limited to the amount of RAM the
    system can access.

    These days that's probably a LOT - but might NOT be,
    esp for 'embedded' type boards like the older PIs,
    BBBs and such. Never assume the user has essentially
    infinite RAM.

    For such platforms you may need to sacrifice speed
    and some convenience and instead put such data on a
    mass-storage device. Not THAT hard to do - but
    remember to use locks.

    Know your target audience - yet TRY to accommodate all.

    I'll still rec making interprocess comms relatively
    terse and handle 'big data' in some other manner
    (as extensively covered in this thread). An 8k raw
    frame grab is about 146mb - and let's not even speak
    of 8k video segments.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to 186282@ud0s4.net on Wed Dec 18 05:01:15 2024
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 12/17/24 8:23 PM, Lawrence D'Oliveiro wrote:
    On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:

    With a pipe or FIFO, you just use simple read and write operations
    and the system handles all the messy stuff for you. If the pipe
    reaches capacity, write blocks until there is room to write some
    more; if the pipe becomes empty, read blocks until there is more
    data available; when read returns EOF that's the end of the data.

    Yup. Furthermore:

    * When the last writer closes its end, any remaining read attempts
    get EOF.
    * When the last reader closes its end, any remaining write attempts
    get “broken pipe”.

    But you're still limited to the amount of RAM the system can
    access.

    Not with a pipe or FIFO, which is what is being discussed above.

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    These days that's probably a LOT - but might NOT be,
    esp for 'embedded' type boards like the older PIs,
    BBBs and such. Never assume the user has essentially
    infinite RAM.

    The system will not have infinite RAM. You can transfer infinite data
    over a pipe (although it will take a while to reach infinity).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Riches@21:1/5 to Rich on Wed Dec 18 05:12:33 2024
    On 2024-12-18, Rich <rich@example.invalid> wrote:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 12/17/24 8:23 PM, Lawrence D'Oliveiro wrote:
    On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:

    With a pipe or FIFO, you just use simple read and write operations
    and the system handles all the messy stuff for you. If the pipe
    reaches capacity, write blocks until there is room to write some
    more; if the pipe becomes empty, read blocks until there is more
    data available; when read returns EOF that's the end of the data.

    Yup. Furthermore:

    * When the last writer closes its end, any remaining read attempts
    get EOF.
    * When the last reader closes its end, any remaining write attempts
    get “broken pipe”.

    But you're still limited to the amount of RAM the system can
    access.

    Not with a pipe or FIFO, which is what is being discussed above.

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    These days that's probably a LOT - but might NOT be,
    esp for 'embedded' type boards like the older PIs,
    BBBs and such. Never assume the user has essentially
    infinite RAM.

    The system will not have infinite RAM. You can transfer infinite data
    over a pipe (although it will take a while to reach infinity).

    A pipe is _NOT_ limited to system RAM!

    Using a named pipe on a Raspberry Pi model 1 with a _half_ GB of
    total RAM, I would routinely transfer _several_ GB in a single
    stream from an mplayer process to a netcat process. The only
    reason that's not currently happening every night these days is
    the amplified TV antenna lost too much gain due to age, attic
    heat, etc.

    HTH

    --
    Robert Riches
    spamtrap42@jacob21819.net
    (Yes, that is one of my email addresses.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to Rich on Wed Dec 18 08:27:25 2024
    Rich <rich@example.invalid> writes:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    But you're still limited to the amount of RAM the system can
    access.

    Not with a pipe or FIFO, which is what is being discussed above.

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    Quite. I’m not sure why this discussion has restarted but it was clear
    from last time round that some of the participants don’t know what a
    pipe is, and aren’t particularly interested in finding out.

    These days that's probably a LOT - but might NOT be,
    esp for 'embedded' type boards like the older PIs,
    BBBs and such. Never assume the user has essentially
    infinite RAM.

    The system will not have infinite RAM. You can transfer infinite data
    over a pipe (although it will take a while to reach infinity).

    I think I’d use a slightly weaker term than ‘infinite’, something will put an upper bound on it, even if it’s the heat death of the universe.

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Richard Kettlewell on Wed Dec 18 14:02:52 2024
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    Rich <rich@example.invalid> writes:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    But you're still limited to the amount of RAM the system can
    access.

    Not with a pipe or FIFO, which is what is being discussed above.

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    Quite. I’m not sure why this discussion has restarted but it was clear
    from last time round that some of the participants don’t know what a
    pipe is, and aren’t particularly interested in finding out.

    Yes, our local nymshift troll seems to clearly not know what a pipe is,
    nor care to learn either.

    These days that's probably a LOT - but might NOT be, esp for
    'embedded' type boards like the older PIs, BBBs and such. Never
    assume the user has essentially infinite RAM.

    The system will not have infinite RAM. You can transfer infinite data
    over a pipe (although it will take a while to reach infinity).

    I think I’d use a slightly weaker term than ‘infinite’, something will put an upper bound on it, even if it’s the heat death of the universe.

    That was the point of the subtle hint of "will take a while to reach
    infinity". Although I suppose it was too subtle there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Robert Riches on Wed Dec 18 14:03:53 2024
    Robert Riches <spamtrap42@jacob21819.net> wrote:
    On 2024-12-18, Rich <rich@example.invalid> wrote:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 12/17/24 8:23 PM, Lawrence D'Oliveiro wrote:
    On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:

    With a pipe or FIFO, you just use simple read and write operations
    and the system handles all the messy stuff for you. If the pipe
    reaches capacity, write blocks until there is room to write some
    more; if the pipe becomes empty, read blocks until there is more
    data available; when read returns EOF that's the end of the data.

    Yup. Furthermore:

    * When the last writer closes its end, any remaining read attempts
    get EOF.
    * When the last reader closes its end, any remaining write attempts
    get “broken pipe”.

    But you're still limited to the amount of RAM the system can
    access.

    Not with a pipe or FIFO, which is what is being discussed above.

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    These days that's probably a LOT - but might NOT be,
    esp for 'embedded' type boards like the older PIs,
    BBBs and such. Never assume the user has essentially
    infinite RAM.

    The system will not have infinite RAM. You can transfer infinite data
    over a pipe (although it will take a while to reach infinity).

    A pipe is _NOT_ limited to system RAM!

    Using a named pipe on a Raspberry Pi model 1 with a _half_ GB of
    total RAM, I would routinely transfer _several_ GB in a single
    stream from an mplayer process to a netcat process. The only
    reason that's not currently happening every night these days is
    the amplified TV antenna lost too much gain due to age, attic
    heat, etc.

    While you are correct, you responded to the wrong post. I pointed out
    to the nymshift troll the exact statement you made to me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to John Ames on Wed Dec 18 16:51:50 2024
    John Ames <commodorejohn@gmail.com> wrote:
    On Wed, 18 Dec 2024 14:02:52 -0000 (UTC)
    Rich <rich@example.invalid> wrote:

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    Quite. I’m not sure why this discussion has restarted but it was
    clear from last time round that some of the participants don’t know
    what a pipe is, and aren’t particularly interested in finding out.

    Yes, our local nymshift troll seems to clearly not know what a pipe
    is, nor care to learn either.

    I *think* what he's meaning to say is this: while you can transfer any arbitrary amount of data *through* a pipe, there is an upper limit to
    how much you can have *in* a pipe at any one time; eventually, you hit
    either *A.* an OS-imposed limit on buffer size, at which point things
    start blocking as already discussed, or *B.* the upper bounds of system memory, at which point the system will either start swapping (in which
    case you lose any speed advantage) or blocking (as with limited buffer
    size.)

    Even if that is what the nymshift troll means, the second half is still
    wrong when discussing pipes. There is a pipe buffer size, when you hit
    that then the OS begins blocking the pipe writer to stop the flow until
    the pipe reader removes some of the data.

    But you never exhaust system memory via data in a pipe, the pipe API
    simply does not work that way.

    Where the nymshift troll's idea of pipes seems to be stuck is MSDOS 2.0
    and command.com's fake pipes that were really temporary disk files.
    This seems to be his concept of a pipe and he's never learned anything
    nor updated his belief since MSDOS 2.0.

    That said, what probably shouldn't need saying here is that if you're
    filling up all available space in a pipe such that you're regularly
    hitting these limits, you're probably doing pipes wrong.

    You can't fill system memory via data buffered inside a pipe. The pipe
    will only hold whatever the system buffer space is (recent Linux's seem
    to be 64k buffer size within the pipe). You'd need to create a
    significant number of pipes (and never close them) to exhaust system
    memory, in which case yes, you are "doing pipes wrong".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Kettlewell@21:1/5 to John Ames on Wed Dec 18 18:32:15 2024
    John Ames <commodorejohn@gmail.com> writes:
    Rich <rich@example.invalid> wrote:
    Yes, our local nymshift troll seems to clearly not know what a pipe
    is, nor care to learn either.

    I *think* what he's meaning to say is this: while you can transfer any arbitrary amount of data *through* a pipe, there is an upper limit to
    how much you can have *in* a pipe at any one time; eventually, you hit
    either *A.* an OS-imposed limit on buffer size, at which point things
    start blocking as already discussed, or *B.* the upper bounds of
    system memory, at which point the system will either start swapping
    (in which case you lose any speed advantage) or blocking (as with
    limited buffer size.)

    That’s a very charitable interpretation, particularly given that the
    reality of how pipes work has been described two or three times
    recently.

    That said, what probably shouldn't need saying here is that if you're
    filling up all available space in a pipe such that you're regularly
    hitting these limits, you're probably doing pipes wrong.

    Pipes have a capacity of, typically, a few kilobytes and when that
    capacity is reached, writers block until readers drain them.

    All this stuff about filling RAM or swapping is just nonsense.

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Riches@21:1/5 to Rich on Thu Dec 19 04:27:08 2024
    On 2024-12-18, Rich <rich@example.invalid> wrote:
    Robert Riches <spamtrap42@jacob21819.net> wrote:
    On 2024-12-18, Rich <rich@example.invalid> wrote:
    186282@ud0s4.net <186283@ud0s4.net> wrote:
    On 12/17/24 8:23 PM, Lawrence D'Oliveiro wrote:
    On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:

    With a pipe or FIFO, you just use simple read and write operations >>>>>> and the system handles all the messy stuff for you. If the pipe
    reaches capacity, write blocks until there is room to write some
    more; if the pipe becomes empty, read blocks until there is more
    data available; when read returns EOF that's the end of the data.

    Yup. Furthermore:

    * When the last writer closes its end, any remaining read attempts
    get EOF.
    * When the last reader closes its end, any remaining write attempts
    get “broken pipe”.

    But you're still limited to the amount of RAM the system can
    access.

    Not with a pipe or FIFO, which is what is being discussed above.

    The amount of data you can transfer over a pipe is not in any way
    limited by system memory size or any other system imposed limits.

    These days that's probably a LOT - but might NOT be,
    esp for 'embedded' type boards like the older PIs,
    BBBs and such. Never assume the user has essentially
    infinite RAM.

    The system will not have infinite RAM. You can transfer infinite data
    over a pipe (although it will take a while to reach infinity).

    A pipe is _NOT_ limited to system RAM!

    Using a named pipe on a Raspberry Pi model 1 with a _half_ GB of
    total RAM, I would routinely transfer _several_ GB in a single
    stream from an mplayer process to a netcat process. The only
    reason that's not currently happening every night these days is
    the amplified TV antenna lost too much gain due to age, attic
    heat, etc.

    While you are correct, you responded to the wrong post. I pointed out
    to the nymshift troll the exact statement you made to me.

    Yes, I was supporting your position with a concrete existence
    proof. Not every reply needs to be a contradiction of the
    immediately previous post.

    I'm not certain, but I think I might have killfiled the nymshift
    troll, so your post was the only one for which I had a reference
    in order to contradict said nymshift troll.

    --
    Robert Riches
    spamtrap42@jacob21819.net
    (Yes, that is one of my email addresses.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Robert Riches on Thu Dec 19 14:07:55 2024
    Robert Riches <spamtrap42@jacob21819.net> wrote:
    I'm not certain, but I think I might have killfiled the nymshift
    troll, so your post was the only one for which I had a reference in
    order to contradict said nymshift troll.

    Ah, ok, now I get why you replied to my post. No worries in that case.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From D@21:1/5 to Rich on Thu Dec 19 16:02:35 2024
    On Thu, 19 Dec 2024, Rich wrote:

    Robert Riches <spamtrap42@jacob21819.net> wrote:
    I'm not certain, but I think I might have killfiled the nymshift
    troll, so your post was the only one for which I had a reference in
    order to contradict said nymshift troll.

    Ah, ok, now I get why you replied to my post. No worries in that case.


    Harmony and peace have been restored!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)