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. Network Performance

Network Performance

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminperformancehelpquestion
6 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.
  • O Offline
    O Offline
    od ananzi co za
    wrote on last edited by
    #1

    Hi Guys, A have a client/server application using sockets (TCP/IP) for all the IPC needs. I came across a very interesting problem the other day and is still quite stumped by it: When the apps are running on a local pc with the network cable not connected, then the apps run fine and the performance is as expected. However, when the pc is then connected onto the lan the apps suddenly start behaving eratically. They will crash for no reason, or the data transfers between the client and server will become very slow, or timeout and all weird things happen. I then unplug the cable and voila, all is fine again. I have tested lots of other network apps on that same pc and they all seem to work fine. Does anyone have any idea as to what may be wrong or where I can start looking for the problem ? Thanks

    D M 2 Replies Last reply
    0
    • O od ananzi co za

      Hi Guys, A have a client/server application using sockets (TCP/IP) for all the IPC needs. I came across a very interesting problem the other day and is still quite stumped by it: When the apps are running on a local pc with the network cable not connected, then the apps run fine and the performance is as expected. However, when the pc is then connected onto the lan the apps suddenly start behaving eratically. They will crash for no reason, or the data transfers between the client and server will become very slow, or timeout and all weird things happen. I then unplug the cable and voila, all is fine again. I have tested lots of other network apps on that same pc and they all seem to work fine. Does anyone have any idea as to what may be wrong or where I can start looking for the problem ? Thanks

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      od@ananzi.co.za wrote:

      A have a client/server application using sockets (TCP/IP) for all the IPC needs...When the apps are running on a local pc with the network cable not connected, then the apps run fine...

      How so? Is your network being saturated with too many packets? Are you using any hubs or switches?

      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      O 1 Reply Last reply
      0
      • D David Crow

        od@ananzi.co.za wrote:

        A have a client/server application using sockets (TCP/IP) for all the IPC needs...When the apps are running on a local pc with the network cable not connected, then the apps run fine...

        How so? Is your network being saturated with too many packets? Are you using any hubs or switches?

        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        O Offline
        O Offline
        od ananzi co za
        wrote on last edited by
        #3

        I have started debugging the apps when on the network and most of the crashed do occur within the sockets/socket handler classes. The crashes are totally random at this stage ... Is there an easy way to monitor the network for saturation and collissions etc ? (We do not have any measuring hardware) ...

        1 Reply Last reply
        0
        • O od ananzi co za

          Hi Guys, A have a client/server application using sockets (TCP/IP) for all the IPC needs. I came across a very interesting problem the other day and is still quite stumped by it: When the apps are running on a local pc with the network cable not connected, then the apps run fine and the performance is as expected. However, when the pc is then connected onto the lan the apps suddenly start behaving eratically. They will crash for no reason, or the data transfers between the client and server will become very slow, or timeout and all weird things happen. I then unplug the cable and voila, all is fine again. I have tested lots of other network apps on that same pc and they all seem to work fine. Does anyone have any idea as to what may be wrong or where I can start looking for the problem ? Thanks

          M Offline
          M Offline
          Moak
          wrote on last edited by
          #4

          Try using the loopback address (127.0.0.1), do not use hostnames or computer names. I would also suggest doing stress tests, the crashs you describe should not happen. Perhaps the current implementation can not handle fragmented packets very well. TCP is a stream oriented protocol, which means data does not have to arrive in the same chunk sizes as they are sent away. Hope it helps. :) /M

          My Webchat

          O 1 Reply Last reply
          0
          • M Moak

            Try using the loopback address (127.0.0.1), do not use hostnames or computer names. I would also suggest doing stress tests, the crashs you describe should not happen. Perhaps the current implementation can not handle fragmented packets very well. TCP is a stream oriented protocol, which means data does not have to arrive in the same chunk sizes as they are sent away. Hope it helps. :) /M

            My Webchat

            O Offline
            O Offline
            od ananzi co za
            wrote on last edited by
            #5

            Sorry, forgot to mention. I'm actually connecting to 127.0.0.1 already. I rarely use any hostnames, especially not when the client/server are running on the same pc. I have an application layer running on top of the socket to reassemble the sent data at the receiver end. this layer has not changed over the last two year, so I'm fairly confident that the problem is elsewhere. But where ??

            M 1 Reply Last reply
            0
            • O od ananzi co za

              Sorry, forgot to mention. I'm actually connecting to 127.0.0.1 already. I rarely use any hostnames, especially not when the client/server are running on the same pc. I have an application layer running on top of the socket to reassemble the sent data at the receiver end. this layer has not changed over the last two year, so I'm fairly confident that the problem is elsewhere. But where ??

              M Offline
              M Offline
              Moak
              wrote on last edited by
              #6

              What listening port are you using, could it be that incoming LAN traffic not meant for your application is crashing it? Just to make sure bind your listening socket specifically to 127.0.0.1 and not to INADDR_ANY. In any case, do stress testing to reproduce and isolate the trouble maker. /M

              My Webchat

              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