Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 697381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:09:44+00:00 2026-05-14T03:09:44+00:00

I am trying to optimize multiple connections per time to a TCP socket server.

  • 0

I am trying to optimize multiple connections per time to a TCP socket server.

Is it considered good practice, or even rational to initiate a new thread in the listening server every time I receive a connection request?

At what time should I begin to worry about a server based on this infrastructure? What is the maximum no of background threads I can work, until it doesn’t make any sense anymore?

Platform is C#, framework is Mono, target OS is CentOS, RAM is 2.4G, server is on the clouds, and I’m expecting about 200 connection requests per second.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:09:44+00:00Added an answer on May 14, 2026 at 3:09 am

    No, you shouldn’t have one thread per connection. Instead, you should be using the asynchronous methods (BeginAccept/EndAccept, BeginSend/EndSend, etc). These will make much more efficient use of system resources.

    In particular, every thread you create adds overhead in terms of context switches, stack space, cache misses and so on. Linux is better at managing this stuff than Windows, for example, but that shouldn’t be an excuse to give you free reign to create as many threads as you like 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to optimize some stored procedures on a SQL Server 2000 database
I am trying to optimize my TCP/IP settings such as TCP Window size, MSS
I'm trying to optimize a SQL Server. I have some experience with Mysql and
I'm trying to optimize my game using CCSpriteBatchNode to render multiple sprites at once.
I'm trying to optimize my workflow as I still spend quite some time waiting
I'm trying to optimize query performance and have had to resort to using optimizer
I am trying to optimize a small, highly used function which uses the high
I'm trying to optimize a stored procedure I'm maintaining, and am wondering if anyone
I'm trying to optimize the size of my Delphi classes so that they take
I`m having trouble trying to optimize this query with OVER (PARTITION BY ...) because

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.