Re: singe thread per connection
- From: Neil Coffey <neil.coffey@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 11 Jul 2008 21:29:24 -0500
Peter Duniho wrote:
For that matter, I'm not convinced it would be good to have 500 threads.
It's not a great design for the purpose, but purely in terms of
numbers of threads, you'd probably get away with it on a modern OS.
(If you're running Windoze, check perfmon--
you'll quite possibly find you have hundreds of threads running just
with your box "ticking over".)
Not just sure what limits people reach nowadays with one-thread-per-
connection. But I seem to recall that typical UNIX-based web servers
used to fall over at about 400, but that was due to buggy process
scheduling rather than a problem with the connection count per se.
So you may even be all right with 500. Obviously, I'm NOT repeat NOT
advocating this as an example of good program design. You really
should look at an alternative such as NIO (see the thread from a
couple of weeks ago on somebody needing a NIO client app -- I posted
a skeleton). But if it's going to be time-consuming for you to
learn another IO framework, you might just try doing it the nasty
way. (Actually, I'd be sort of interested to know if it works.)
By the way, not really a Java problem, but you should check if the
system you're using imposes any artificial limits on numbers of
outgoing connections.
Oh and I can't see why 4 threads per telnet connection either. Perhaps
somebody was feeling particularly masochistic the day they wrote it...
Neil
.
- Follow-Ups:
- Re: singe thread per connection
- From: Peter Duniho
- Re: singe thread per connection
- References:
- singe thread per connection
- From: Praki
- Re: singe thread per connection
- From: Peter Duniho
- singe thread per connection
- Prev by Date: Re: NetBeans giving error at dataTable tag. Missing JAR?
- Next by Date: Re: Weak/Soft references?
- Previous by thread: Re: singe thread per connection
- Next by thread: Re: singe thread per connection
- Index(es):
Relevant Pages
|
|