Ephemeral TCP ports - Configuration? - TCP-IP

This is a discussion on Ephemeral TCP ports - Configuration? - TCP-IP ; Hi, I have a messaging client running in my local host (the OS is windows XP) . The application will send messages to a server running in a different machine. I want to find out the maximum ephemeral ports the ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Ephemeral TCP ports - Configuration?

  1. Ephemeral TCP ports - Configuration?

    Hi,
    I have a messaging client running in my local host (the OS is
    windows XP) . The application will send messages to a server running
    in a different machine. I want to find out the maximum ephemeral ports
    the application can open simultaneously..

    I researched a bit on this and here is a MS KB article.
    http://technet.microsoft.com/en-us/l.../bb878133.aspx

    It mentions that the ephemeral ports will be a wildcard number from
    1025 to 5000 and that if it needs to be changed, it can be configured
    in the registry.

    I have 2 questions..
    a) What would be the overhead of opening multiple ports
    simultaneously? Is it possible to quantitatively measure the n/w and
    processing penalties associated with 1 application simultaneously
    opening ~150 ports?
    b) Apart from configuring in the registry, Is there any other way,
    that we can control the maximum number of ephemeral ports that can be
    open simultaneously?

    Thanks!
    Santhosh

  2. Re: Ephemeral TCP ports - Configuration?

    On May 6, 11:30 pm, "santhosh.kulandai...@yahoo.com"
    > b) Apart from configuring in the registry, Is there any other way,
    > that we can control the maximum number of ephemeral ports that can be
    > open simultaneously?


    Just don't use ephemeral ports. There's nothing magic about them. You
    can choose your own port and pass it to the 'bind' call.

    DS

  3. Re: Ephemeral TCP ports - Configuration?

    On May 7, 1:38 pm, David Schwartz wrote:

    > Just don't use ephemeral ports. There's nothing magic about them. You
    > can choose your own port and pass it to the 'bind' call.



    I am working with this API which manages binding to ports. So the
    scenario is that I don't have control in the program over which ports
    I bind to. However that being said, is it possible to identify the
    performance penalties of opening many ports?

    Thanks
    Santhosh

  4. Re: Ephemeral TCP ports - Configuration?

    In article
    <27329caa-2ac7-4d88-8a1e-c4886f2910dc@i36g2000prf.googlegroups.com>,
    "santhosh.kulandaiyan@yahoo.com"
    wrote:

    > On May 7, 1:38 pm, David Schwartz wrote:
    >
    > > Just don't use ephemeral ports. There's nothing magic about them. You
    > > can choose your own port and pass it to the 'bind' call.

    >
    >
    > I am working with this API which manages binding to ports. So the
    > scenario is that I don't have control in the program over which ports
    > I bind to. However that being said, is it possible to identify the
    > performance penalties of opening many ports?


    Most implementations don't have much overhead. I think they usually use
    hashing to find the connection matching an incoming packet.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  5. Re: Ephemeral TCP ports - Configuration?

    On May 8, 5:44*am, Barry Margolin wrote:

    > > I am working with this API which manages binding to ports. So the
    > > scenario is that I don't have control in the program over which ports
    > > I bind to. However that being said, is it possible to identify the
    > > performance penalties of opening many ports?


    > Most implementations don't have much overhead. *I think they usually use
    > hashing to find the connection matching an incoming packet.


    In fact, until a few years ago, the reverse was the case. Many
    programs (such as chat servers) that have to handle large numbers of
    incoming connections actually used a large number of ports
    specifically to improve performance.

    DS

  6. Re: Ephemeral TCP ports - Configuration?

    On 2008-05-07 02:30:51 -0400, "santhosh.kulandaiyan@yahoo.com"
    said:

    > Hi,
    > I have a messaging client running in my local host (the OS is
    > windows XP) . The application will send messages to a server running
    > in a different machine. I want to find out the maximum ephemeral ports
    > the application can open simultaneously..



    Careful.

    Microsoft has a strange way sometimes of managing socket-based
    resources depending on the application used (in particular, MS-SQL, was
    a bit odd). You will want to check your patch levels for the OS in
    question you're testing with, and make sure your application is
    allocating socket resources from where you *expect*. Some MS
    applications don't use a "standard, global" pool for socket resource
    allocation and attempt to use their own. Frankly, I find the MS
    approach - strange - too many layers.

    What I wanted to pass along to you mainly was - if you see a sudden
    loss of connectivity or your performance drops drastically after a
    certain number of connections are opened, do check how the software is
    interfacing with whatever MS socket API is in use, and ask Microsoft
    which one is being used - be very specific about your patch level for
    your OS and the application revision numbers when you ask.

    I've had clients who have had severe problems with MS-SQL & W2K3 in particular.

    If you're testing, it would also probably be a good idea to test how
    your application performs opening many sockets in a very short amount
    of time as well as a reasonable amount of time.

    /dmfh

    --
    _ __ _
    __| |_ __ / _| |_ 01100100 01101101
    / _` | ' \| _| ' \ 01100110 01101000
    \__,_|_|_|_|_| |_||_| dmfh(-2)dmfh.cx


+ Reply to Thread