|
-
Threads and performance
I want to design an application that receives messages via TCPIP from different
ports, and after some processing these messages are going to make changes
to a database located on another machine. I want high performance for this
application. There are some questions about this that I hope someone can
help me with.
1) The connection to the data base is a critical point. The database is tuned,
but there might be much time consumed waiting while the database call is
managed, compared to other tasks. An idea would be to let other threads work
during the blocking time. Is there any way to get around this problem? One
thread per message is not a solution, I suppose.
2) If i have understood .Net one should have one TCPListener connected to
each port, and one thread for each tcplistener, to avoid blocking. But if
there are many ports, and if i want to get high performance according to
1) there can be a lot of threads. How many threads is recommended, I mean,
there must be some limit when switching between threads consumes more time
than the gain is of it?
3)Are there any difference in performance using thread pools compared to
ordinary threads?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks