[MUD-Dev] RE: Question regarding Java threads

Matt Chatterley matt at mpc.dyn.ml.org
Mon Aug 10 11:41:02 CEST 1998


This message is in MIME format
--_=XFMail.1.3.p0.Linux:980810114102:253=_
Content-Type: text/plain; charset=us-ascii


On 05-Aug-98 Jon A. Lambert wrote:
> A bit back we we discussing the upper limits of Java threads on 
> various platforms.   Much of the concern, especially in regard to 
> Java, was the one thread per connection issue.  Can anyone comment on 
> the following hardware(?) issue raised here? 
> 
> --cut from rgma --
> 
> By the way, your P2-233 will choke with 200 active users.  Interrupt
> overflow from the NIC.  You could solve this problem with a $500 NIC
> that doesn't interrupt the CPU as much(has its own processor,) but
> then you'll have to ban char mode telnet outright and do some other
> unfriendly things too, and I just don't know that you're going to find
> 200 simultaneous players anyway; few muds do, so unless you become one
> of them, it isn't worth the time, money, and effort to prepare for:)

Well, ignoring the 'record' of the original writer, and attempting to be
unbiased - I'd put this in the 'partially correct' bin. I suspect a P2-233
*would* have trouble with 200 active users, running a reasonably complex (read:
CPU intensive) game. Interrupt overflow? Not a very clear term, but if in
relation to interrupt from network activity itself, I've seen 30-40 users on a
14.4k modem, on a p90, with no trouble *at all*. No lag, unless the host did
something like transfer files via FTP, or surf the web.

Most Muds *do not allow* character mode telnet anyway - its a very evil thing
(its also quite crap if your connection to the net is low bandwidth/latency,
because it takes about as long per letter as it does per normal line - not
quite, but near as damn it). I don't intend to support this personally, at any
point.

Assume that each of these 200 users enters one command per second
(overestimate, but in doing so, we allow for the times that clients send
multiple commands very rapidly). Thats 200 commands per seconds (ironically,
200 HZ, if you think about it). In order for the machine to keep up (assuming
it is a UP box, and the Mud runs UP), it needs to get through each command in
the time in 1/200th of a second? Something like that (not quite awake). Of
course, this leaves you with a huge amount of information 'hanging around' in
buffers from sockets, and so on - go with some sort of event queue model, using
a clump of threads (one per 20 users, or so forth), and you can manage this
just fine.

Java specifically? According to the work done here (Vadim's?), and some stuff i
read in one of the online magazines (I've forgotten which; it was a while ago),
all the current JDKs can support ~500 sockets with comfort, some can go far
beyond. I wouldn't worry about anything except having enough *actual computing
power* (and possibly available memory).


---
        -Matt Chatterley
        http://user.itl.net/~neddy/
"You may say I'm a dreamer, but I'm not the only one.." -John Lennon (Imagine)

--_=XFMail.1.3.p0.Linux:980810114102:253=_
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: mcG26ldBSrN90YlJJfC0GZFhNyAQyaAS

iQB1AwUBNc7cTksWGgRW8+MZAQFScwL+MC9M9hQ5MNu+8icsZTl7PUZDyTL467ci
ArzLa4YPw3YzaGadBTYKHqrjsCUBQihJUbvh9r9JH2qi7PvMpv8T9hHSM2E5d/V5
wckp05Z/pPM0ySPcif8l3SV+spJcbW54
=0dox
-----END PGP SIGNATURE-----

--_=XFMail.1.3.p0.Linux:980810114102:253=_--
End of MIME message




More information about the mud-dev-archive mailing list