Results 1 to 3 of 3

Thread: Can I increase the number of simultaneous connections by increasing ThreadPool.Size?

  1. #1
    timeguest is offline Registered User
    Join Date
    Oct 2004
    Posts
    16

    Can I increase the number of simultaneous connections by increasing ThreadPool.Size?

    As we all know, Ice predefined 1024 as FD_SETSIZE, which means there're at most 1024 simultaneous connections for one internal select call. When I want more connections at the same time, could I specify Server.ThreadPool.Size to 2 to obtain 2048 simultaneous connections?

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    AFAIK, Ice doesn't define any value for FD_SETSIZE: the default value defined by the operating system C library is used. Increasing the number of threads won't affect the maximum number of connections the select() system call can handle.

    If you want a single server to handle more than 1024 clients, you could create multiple object adapters and have the different clients to connect to one of the server object adapters. The problem with this solution is that you'll have a monolithic server that is perhaps capabable of handling many client connections but perhaps not capable of handling the load caused by the clients invoking on the server...

    A more scalable solution would be to distribute your application over several processes: frontend processes to concentrate the client connections and backend processes to process client requests. With such an architecture, you can easily handle an increasing number of clients by simply adding more processes (and eventually server machines). Please see this thread for a similar discussion.

    Note also that Ice provides active connection management to ensure that iddle connections from clients are automatically closed. Also, I believe some OS allow to increase the value of FD_SETSIZE -- it might be possible to increase this limit in the Ice source code.

    Benoit.

  3. #3
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Actually, one of my colleague pointed out that we actually define FD_SETSIZE to 1024 on Windows (in the preprocessor settings of the Ice project file). Assuming you're using Windows, you could try to increase this value and recompile Ice.

    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 04-01-2009, 11:56 PM
  2. ThreadPool warning when Size=MaxSize
    By jae in forum Help Center
    Replies: 1
    Last Post: 12-28-2007, 09:03 PM
  3. Strange ThreadPool size warning
    By mefoster in forum Help Center
    Replies: 1
    Last Post: 10-02-2007, 05:08 AM
  4. Replies: 3
    Last Post: 06-29-2005, 04:05 AM
  5. Process size increase using proxy calls
    By brian in forum Help Center
    Replies: 16
    Last Post: 06-04-2004, 01:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •