• ANNOUNCE: iocp 2.0a0

    From Ashok@21:1/5 to All on Tue Apr 16 08:12:43 2024
    iocp 2.0 Alpha 0 released. No feature or API changes except support for
    Tcl 9. The release archive iocp2.0a0.zip supports all combinations of
    Tcl 8.6 / Tcl 9 and x86 / x64.

    Documentation: https://iocp.magicsplat.com/
    Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    Tcl extension implementing TCP and Bluetooth channels based on I/O
    completion ports. The iocp_inet package is API-compatible (except
    for some new Tcl 9 fconfigure options) with Tcl sockets while offering
    much higher performance
    (https://wiki.tcl-lang.org/page/Package+iocp%5Finet).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ashok@21:1/5 to Ashok on Tue Apr 16 08:21:24 2024
    Forgot to mention. Require Windows 7 or later.

    On 4/16/2024 8:12 AM, Ashok wrote:
    iocp 2.0 Alpha 0 released. No feature or API changes except support for
    Tcl 9. The release archive iocp2.0a0.zip supports all combinations of
    Tcl 8.6 / Tcl 9 and x86 / x64.

    Documentation: https://iocp.magicsplat.com/
    Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    Tcl extension implementing TCP and Bluetooth channels based on I/O
    completion ports. The iocp_inet package is API-compatible (except
    for some new Tcl 9 fconfigure options) with Tcl sockets while offering
    much higher performance
    (https://wiki.tcl-lang.org/page/Package+iocp%5Finet).




    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Tue Apr 16 08:40:10 2024
    Am 16.04.2024 um 04:51 schrieb Ashok:
    Forgot to mention. Require Windows 7 or later.

    On 4/16/2024 8:12 AM, Ashok wrote:
    iocp 2.0 Alpha 0 released. No feature or API changes except support
    for Tcl 9. The release archive iocp2.0a0.zip supports all combinations of
    Tcl 8.6 / Tcl 9 and x86 / x64.

    Documentation: https://iocp.magicsplat.com/
    Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    Tcl extension implementing TCP and Bluetooth channels based on I/O
    completion ports. The iocp_inet package is API-compatible (except
    for some new Tcl 9 fconfigure options) with Tcl sockets while offering
    much higher performance
    (https://wiki.tcl-lang.org/page/Package+iocp%5Finet).





    Great Wizard work!
    Would love to get that into the core...

    Thank you for all,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Tue Apr 16 12:49:16 2024
    * Ashok <apnmbx-public@yahoo.com>
    | iocp 2.0 Alpha 0 released. No feature or API changes except support --<snip-snip>--
    | Tcl extension implementing TCP and Bluetooth channels based on I/O
    | completion ports. The iocp_inet package is API-compatible (except
    | for some new Tcl 9 fconfigure options) with Tcl sockets while offering
    | much higher performance
    | (https://wiki.tcl-lang.org/page/Package+iocp%5Finet).

    Thank you very much for that great package, Ashok!

    I finally took the time to benchmark iocp in my setting:

    - server side is Linux, connected via 1 Gbit local network
    - on my Windows-10 machine (latest patch, TCL 8.6.14,
    iocp self compiled using Visual Studio 2022),

    $ tclsh netbench.tcl client -server 192.168.1.164 -repeat 3 -provider "iocp tcl"
    socket 192.168.1.164 10101
    117.92 589619200 5.00 iocp->tcl
    118.14 590700544 5.00 iocp->tcl
    118.15 590774272 5.00 iocp->tcl

    $ tclsh netbench.tcl client -server 192.168.1.164 -repeat 3 -provider "tcl"
    socket 192.168.1.164 10101
    75.82 379125760 5.00 tcl
    77.64 388198400 5.00 tcl
    76.03 380153856 5.00 tcl


    Since I could not get the reverse direction past the windows firewall
    (?), I rolled my own read-benchmark, basically:

    - server side is Linux, connected via 1 Gbit local network
    netcat -k -l 65432 < /dev/zero

    - client:
    - open the socket, configure -translation binary
    - set up fileveent readable
    - read in bunches of 65536 bytes
    - do statistics

    tcl::socket
    58.20 MB/s (avg 58.48 MB/s, lowest 57.91 MB/s)

    iocp::inet::socket
    117.85 MB/s (avg 117.84 MB/s, lowest 117.70 MB/s)

    The main point is that in both directions iocp saturates the 1G network,
    while TCL does not.

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Tue Apr 16 18:11:51 2024
    * Ashok <apnmbx-public@yahoo.com>
    | iocp 2.0 Alpha 0 released. No feature or API changes except support
    | for Tcl 9. The release archive iocp2.0a0.zip supports all combinations
    | of
    | Tcl 8.6 / Tcl 9 and x86 / x64.

    | Documentation: https://iocp.magicsplat.com/
    | Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    | Tcl extension implementing TCP and Bluetooth channels based on I/O
    | completion ports. The iocp_inet package is API-compatible (except
    | for some new Tcl 9 fconfigure options) with Tcl sockets while offering
    | much higher performance
    | (https://wiki.tcl-lang.org/page/Package+iocp%5Finet).

    Ashok,
    any plans on adding a C-level interface?

    The 'old' iocpsock had the calls to the socket creators
    Iocp_OpenTcpClient() and Iocp_OpenTcpServer() DLL-exported, so I could
    directly create the iocp-sockets from my C-Code.

    I guess without a direct interface I could always create the socket via
    a call to Tcl_Eval("iocp::inet::socket ..."), get the ObjResult and
    extract the ChannelObj from that?

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Wed Apr 17 16:41:57 2024
    * Ashok <apnmbx-public@yahoo.com>
    | iocp 2.0 Alpha 0 released. No feature or API changes except support
    | for Tcl 9. The release archive iocp2.0a0.zip supports all combinations
    | of
    | Tcl 8.6 / Tcl 9 and x86 / x64.

    | Documentation: https://iocp.magicsplat.com/
    | Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    Why does the 'configure' script second-guess my decision for
    --enable-64bit? If 64bit is requested, instead of just accepting the
    users decision, it uses some fixed pathes where some ancient SDK was
    installed to check whether it can be found on the users computer, which
    of course fails, since in newer SDKs, the pathes have changed.

    Luckily, I can override the consequences of this via a variable in the generated Makefile...

    I *think* the code in question is a result of expanding
    TEA_CONFIG_CFLAGS when the configure script is created from
    configure.in, so this does not seem an issue of iocp itself.
    Ashok, can you tell who is maintaining the TEA_CONFIG_CFLAGS part of the autoconf step?

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Thu Apr 18 11:15:05 2024
    * Ralf Fassel <ralfixx@gmx.de>
    | * Ashok <apnmbx-public@yahoo.com>
    | | iocp 2.0 Alpha 0 released. No feature or API changes except support
    | | for Tcl 9. The release archive iocp2.0a0.zip supports all combinations
    | | of
    | | Tcl 8.6 / Tcl 9 and x86 / x64.
    | >
    | | Documentation: https://iocp.magicsplat.com/
    | | Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    | Why does the 'configure' script second-guess my decision for
    | --enable-64bit? If 64bit is requested, instead of just accepting the
    | users decision, it uses some fixed pathes where some ancient SDK was
    | installed to check whether it can be found on the users computer, which
    | of course fails, since in newer SDKs, the pathes have changed.

    Ashok, could you update to the latest tclconfig release (https://core.tcl-lang.org/tclconfig) and recreate the 'configure'
    script? The latest tclconfig release no longer contains the bogus SDK detection code.

    TNX
    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ashok@21:1/5 to Ralf Fassel on Fri Apr 19 08:05:30 2024
    On 4/18/2024 2:45 PM, Ralf Fassel wrote:
    * Ralf Fassel <ralfixx@gmx.de>
    | * Ashok <apnmbx-public@yahoo.com>
    | | iocp 2.0 Alpha 0 released. No feature or API changes except support
    | | for Tcl 9. The release archive iocp2.0a0.zip supports all combinations
    | | of
    | | Tcl 8.6 / Tcl 9 and x86 / x64.
    | >
    | | Documentation: https://iocp.magicsplat.com/
    | | Download: https://sourceforge.net/projects/magicsplat/files/iocp/

    | Why does the 'configure' script second-guess my decision for
    | --enable-64bit? If 64bit is requested, instead of just accepting the
    | users decision, it uses some fixed pathes where some ancient SDK was
    | installed to check whether it can be found on the users computer, which
    | of course fails, since in newer SDKs, the pathes have changed.

    Ashok, could you update to the latest tclconfig release (https://core.tcl-lang.org/tclconfig) and recreate the 'configure'
    script? The latest tclconfig release no longer contains the bogus SDK detection code.

    TNX
    R'

    I had updated to latest tclconfig release and checked again now. But I
    had forgotten last couple of commits to github :-( Please check again if
    it works for you.

    Regarding "who maintains the TEA_CONFIG_CFLAGS", I'm afraid they are cargo-culted. Please do suggest patches/fixes.

    /Ashok

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Fri Apr 19 12:24:25 2024
    * Ashok <apnmbx-public@yahoo.com>
    | On 4/18/2024 2:45 PM, Ralf Fassel wrote:
    | > * Ralf Fassel <ralfixx@gmx.de>
    | > | * Ashok <apnmbx-public@yahoo.com>
    | > | | iocp 2.0 Alpha 0 released. No feature or API changes except support
    | > | | for Tcl 9. The release archive iocp2.0a0.zip supports all combinations | > | | of
    | > | | Tcl 8.6 / Tcl 9 and x86 / x64.
    | > | >
    | > | | Documentation: https://iocp.magicsplat.com/
    | > | | Download: https://sourceforge.net/projects/magicsplat/files/iocp/
    | >>
    | > | Why does the 'configure' script second-guess my decision for
    | > | --enable-64bit? If 64bit is requested, instead of just accepting the
    | > | users decision, it uses some fixed pathes where some ancient SDK was
    | > | installed to check whether it can be found on the users computer, which
    | > | of course fails, since in newer SDKs, the pathes have changed.
    | > Ashok, could you update to the latest tclconfig release
    | > (https://core.tcl-lang.org/tclconfig) and recreate the 'configure'
    | > script? The latest tclconfig release no longer contains the bogus SDK
    | > detection code.

    | I had updated to latest tclconfig release and checked again now. But I
    | had forgotten last couple of commits to github :-( Please check again
    | if it works for you.

    Works like a charm (also the 'const' patches are already included, so
    you could as well close ticket #23 :-).

    | Regarding "who maintains the TEA_CONFIG_CFLAGS", I'm afraid they are
    | cargo-culted. Please do suggest patches/fixes.

    It's already fixed in the latest tclconfig release, so no further action required.

    Thanks again!
    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Gravereaux@21:1/5 to David Gravereaux on Tue Apr 23 21:23:03 2024
    On 4/23/2024 9:21 PM, David Gravereaux wrote:
    Ralf,

    Do you do any comparisons with the old iocpsock?
    ... just for kicks and giggles, thanks.


    In all three recv modes

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Gravereaux@21:1/5 to All on Tue Apr 23 21:21:15 2024
    Ralf,

    Do you do any comparisons with the old iocpsock?
    ... just for kicks and giggles, thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Gravereaux@21:1/5 to David Gravereaux on Tue Apr 23 21:26:35 2024
    On 4/23/2024 9:23 PM, David Gravereaux wrote:
    On 4/23/2024 9:21 PM, David Gravereaux wrote:
    Ralf,

    Do you do any comparisons with the old iocpsock?
    ... just for kicks and giggles, thanks.


    In all three recv modes

    In zero-byte, set the buffer size to the largest payload size

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Wed Apr 24 11:29:04 2024
    * David Gravereaux <davygrvy@pobox.com>
    | Do you do any comparisons with the old iocpsock?
    | ... just for kicks and giggles, thanks.

    David,
    I found that in my setting the 'old' iocpsock under Windows-7 was way
    faster than plain TCL socket, and in Windows-10 suddenly way slower. I
    did not investigate further with all the available options, but in the
    mode which was fastest for me on Windows-7 (recvmode zero-byte, with a buffersize of 10485760 (modified TCL version)) gives me around
    ~35-40MByte/s on Windows-10. Since TCL sockets on Windows-10 are faster
    (and fast enough for my purpose), I simply switched to TCL sockets...

    R'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Gravereaux@21:1/5 to Ralf Fassel on Wed Apr 24 06:29:00 2024
    On 4/24/2024 2:29 AM, Ralf Fassel wrote:
    * David Gravereaux <davygrvy@pobox.com>
    | Do you do any comparisons with the old iocpsock?
    | ... just for kicks and giggles, thanks.

    David,
    I found that in my setting the 'old' iocpsock under Windows-7 was way
    faster than plain TCL socket, and in Windows-10 suddenly way slower. I
    did not investigate further with all the available options, but in the
    mode which was fastest for me on Windows-7 (recvmode zero-byte, with a buffersize of 10485760 (modified TCL version)) gives me around
    ~35-40MByte/s on Windows-10. Since TCL sockets on Windows-10 are faster
    (and fast enough for my purpose), I simply switched to TCL sockets...

    R'

    Now I'm sad :(
    Bit rot on 15 year old code, drat.

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