Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Am I reaching a limit?

Am I reaching a limit?

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lucy 0
    wrote on last edited by
    #1

    :mad: :mad: I am using TCP/IP socket, one application is running on Windows 2000, the other is on VxWorks(a real-time OS). What I am doing is: the Win app will send the VxWorks a request, say REQ_1, VxWorks received REQ_1, send back an acknoledge RESPONSE_1, Win app received RESPONSE_1, will send several KB data to VxWorks. so the data flow is:

    Win App VxWorks
    REQ_1 ------------> (wait for reqeust)
    (wait for response) <------------ RESPONSE_1
    data -------------> (wait for data)

    I found out that the first round of handshaking is very fast, it takes almost no time to finish everything (0.000000 according the my TRACE statement). But the second will take 0.08 or 0.09 or 0.10 seconds, and the following one would take 0.2 seconds. So there will be a limit 5 times of handshaking in a seconds. The bottleneck is for the Win App to receive the RESPONSE_1. I tested it on a 10M LAN as well as on a 100M LAN, and get the same result. X| Am I reaching any limit of software handshaking of TCP/IP socket? What did I do wrong? :((

    T 1 Reply Last reply
    0
    • L lucy 0

      :mad: :mad: I am using TCP/IP socket, one application is running on Windows 2000, the other is on VxWorks(a real-time OS). What I am doing is: the Win app will send the VxWorks a request, say REQ_1, VxWorks received REQ_1, send back an acknoledge RESPONSE_1, Win app received RESPONSE_1, will send several KB data to VxWorks. so the data flow is:

      Win App VxWorks
      REQ_1 ------------> (wait for reqeust)
      (wait for response) <------------ RESPONSE_1
      data -------------> (wait for data)

      I found out that the first round of handshaking is very fast, it takes almost no time to finish everything (0.000000 according the my TRACE statement). But the second will take 0.08 or 0.09 or 0.10 seconds, and the following one would take 0.2 seconds. So there will be a limit 5 times of handshaking in a seconds. The bottleneck is for the Win App to receive the RESPONSE_1. I tested it on a 10M LAN as well as on a 100M LAN, and get the same result. X| Am I reaching any limit of software handshaking of TCP/IP socket? What did I do wrong? :((

      T Offline
      T Offline
      TBK
      wrote on last edited by
      #2

      Are you using TCP_NODELAY (turns off the Nagle algorithm) in the socket options? In Windows this defaults to 0.2 second delay for a send - I am not sure about VxWorks.

      L T 2 Replies Last reply
      0
      • T TBK

        Are you using TCP_NODELAY (turns off the Nagle algorithm) in the socket options? In Windows this defaults to 0.2 second delay for a send - I am not sure about VxWorks.

        L Offline
        L Offline
        lucy 0
        wrote on last edited by
        #3

        Wow, got it. After I set it, my program is like flying. Thank you so much!:rose: :rose: :rose: :rose: :rose: :rose: :rose:

        1 Reply Last reply
        0
        • T TBK

          Are you using TCP_NODELAY (turns off the Nagle algorithm) in the socket options? In Windows this defaults to 0.2 second delay for a send - I am not sure about VxWorks.

          T Offline
          T Offline
          Tim Smith
          wrote on last edited by
          #4

          Damn it, I thought it was the Nagle algorithm getting in the way, but I wasn't sure at all so I didn't say anything... :mad: :laugh: Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?

          L 1 Reply Last reply
          0
          • T Tim Smith

            Damn it, I thought it was the Nagle algorithm getting in the way, but I wasn't sure at all so I didn't say anything... :mad: :laugh: Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?

            L Offline
            L Offline
            lucy 0
            wrote on last edited by
            #5

            Believe in yourself and be proud of yourself. ;)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups