Re: singe thread per connection



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
.



Relevant Pages

  • Re: How to install Linux applications?
    ... I use a program called yum that is really great. ... Without connection to the Internet ... > used a desktop running Windoze XP Pro to download some of the latest verions ...
    (linux.redhat)
  • Re: How to install Linux applications?
    ... I use a program called yum that is really great. ... Without connection to the Internet ... > used a desktop running Windoze XP Pro to download some of the latest verions ...
    (comp.os.linux)
  • Re: How to install Linux applications?
    ... I use a program called yum that is really great. ... Without connection to the Internet ... > used a desktop running Windoze XP Pro to download some of the latest verions ...
    (alt.os.linux.redhat)
  • Re: How to setup a windows sharing internet connection with Ubuntu.
    ... your headers say you are running windoze - try it and find out. ... unlisted network like 192.168.*.* to a valid Internet connection. ... using ICS to hide five boxes behind a single _PUBLIC_ IP address. ... fingerprints - looks like a MacOS box. ...
    (comp.os.linux.misc)