Skip to content
Tcl Source Code History Of Ticket fc3c425cde
Login

History Of Ticket fc3c425cde

Artifacts Associated With Ticket fc3c425cde

  1. Ticket change [6c8ddb3ba4] (rid 151699) by oehhar on 2017-01-31 20:57:22:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Aim of this ticket is to elaborate to use iocpsock ([http://sf.net/projects/iocpsock]) as a windows socket driver.
      
      The author is David Gravereaux, who provided the following informations by private E-Mail:
      
      As my open license says you can do anything you want with my code, go for it.  Yes, please add it to the core.
      
      I had some reservations in 2004 or so when Jeff Hobbs asked me only because I'm a perfectionist.
      
      The thread that processes the completion port could also be used for file and console channel types, too.
      So that will need to be internally shared in some manner.
      
      I've lost touch with the Win32 API as I don't do programming these days, but I tried to implement a method for creating more than just TCP channel types.
      I think Microsoft has dropped that since XP was current.
      Also, there probably isn't much of an interest in Netware IPX sockets anyways.
      
      Has the channel API in TCL gained the support of packet/message based usage yet to support UDP?
      
      When I first wrote the extension, I used a crazy complex way of allowing fine tuning of the amount pre-allocated buffers.
      Some of it was good such as multiple send buffers and multiple accept buffers for listening sockets, but the rest didn't work for finding an improvement.
      
      For receiving sockets, after deep experimentation, I found that just a single zero sized buffer to act as pure notification while matching the TCP buffer size to the channel buffer size was the best way to do it.
      Doing the WSARecv() in the ChannelReadable using the channel buffer directly is the most efficient way rather copying from the returning completion port buffers.
      
    5. foundin initialized to: "8.6.7"
    6. is_private initialized to: "0"
    7. login: "oehhar"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "oehhar"
    14. subsystem initialized to: "25. Channel System"
    15. title initialized to: "Use iocpsock as windows socket driver"
    16. type initialized to: "RFE"
  2. Ticket change [9fd788a7e9] (rid 167124) by anonymous on 2018-11-05 12:38:04:

    1. icomment:
      After the discussion on mailing list, i joining this request. It would be very nice to have Iocpsock implemented as windows socket driver in core.
      
      I working on multiplatform http upload application where speed is needed. And i was very confused, why on Linux i getting upload speed about 10-11Mbs (upper limit of my internet connection) and on windows only about 2-3Mbs.
      
      I received suggestion from Harald Oehlmann, that i should try Iocpsock package. So i tried and replaced core 'socket' command with 'socket2' command:
      
      package require Iocpsock
      package require http
      ....
      rename socket ""
      rename socket2 socket
      .... 
      
      And it helped!
      Now im getting the same speed, about 10-11Mbs as on linux.
      
      I can imagine, that poor performance of sockets under windows may frighten some users and they run away to other language (javascript, python, #C, or whetever is trendy today) And we dont want this, right? :)
      
      Pavel J.
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  3. Ticket change [b72ca63ca0] (rid 171040) by oehhar on 2019-04-14 09:39:42:

    1. icomment:
      Ralf fassel wrote on clt 2019-04-11 titled "FYI: doubleplusgood TCL socket performance Windows 10"
      
      I'm in the middle of rolling out a high-data-rate application which we
      originally provided on Windows-7.  The TCL socket performance (of course
      most probably the underlying Windows-7 TCP/IP stack) was not good enough
      for the high data rates (Gigabit ethernet, using up to 100MByte/s).
      Therefore we successfully used the iocpsock extension there (which
      basically implements a multi-threaded double-buffer reading).
      
      Now on Windows 10 I found that the plain TCL socket performance (of
      course most probably the underlying Windows-10 TCP/IP stack) has greatly
      improved and can cope with Gigabit in a single-threaded application.
      I'm getting datarates above 100MByte/s, dumping them in parallel to SSD
      and serving a responsive Tk gui.  Sometimes the earth *is* a disc... :-)
      
      Needless to say that the same hardware running under Linux never had any
      problems with these data rates...
      
      R'
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [427df453d4] (rid 171047) by oehhar on 2019-04-15 11:23:35:

    1. icomment:
      Tombert on clt:
      
      Just for completeness, I had an issue with Nagle's algorithm which I had to disable also on linux to get full performance.
      https://groups.google.com/forum/#!topic/comp.lang.tcl/xtVodiKNr0I
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  5. Ticket change [20b8bc564f] (rid 171049) by ralfixx on 2019-04-15 13:47:55:

    1. icomment:
      In addition to my observation (posted by oehhar on my behalf, thanks Harald) that I get full channel performance with plain TCL sockets on Windows 10, iocpsock in zero-byte receive mode maxes out at about 44MByte/s, reason unknown.  I had no time to investigate further since plain TCL works just fine...
      
      I'm using a patched TCL which allows up to 10MB as -buffering for any channel (instead of the default 1MB), but that was also the case before on Windows-7 when plain TCL did not work and iocpsock did.
      
    2. login: "ralfixx"
    3. mimetype: "text/plain"
  6. Ticket change [185c2c0536] (rid 178805) by apnadkarni on 2020-01-24 05:48:46:

    1. icomment:
      I've started on an iocp package with the intent of merging into the core at some point. Not based on iocpsock though for multiple reasons.
      
      Only mentioning here in case someone else starts a similar project so I can drop working on mine :-)
      
      /Ashok
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-fossil-wiki"
  7. Ticket change [194a1082b8] (rid 178806) by oehhar on 2020-01-24 07:10:22:

    1. icomment:
      Thank you, Ashok, this is rocket news!
      If you want to get in contact with David, please drop me an E-Mail.
      
      Thank you,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"