Sagewire Logo

JAVA networking, 50000 sockets

4 Message(s) by 3 Author(s) originally posted in java developer


From: Chris Miller Date:   Wednesday, April 20, 2005
Has anyone tried to monitor 50000 socket connections in JAVA?
I've an application that needs to do just that.

I can open 50000 sockets with no problems, but things get unstable when
I try to listen to 5000 to 6000 of them.

My configuration is a combination of 50 threads to listen to 1 socket
each, 500 threads pooled and waiting for the ServerSocket.accept(), and
2500 listening for data on 20 sockets each. Tested on Red Hat Enterprise
up to 6000 sockets. I am pretty sure there no deadlocks, or anything
strange.

Has anyone done something similar? Is this idea even sane?

Thanks.


From: George Neuner Date:   Wednesday, April 27, 2005
On Thu, 21 Apr 2005 00:07:48 +0100, Chris Miller
wrote in message:

Has anyone tried to monitor 50000 socket connections in JAVA?
I've an application that needs to do just that.
I can open 50000 sockets with no problems, but things get unstable when
I try to listen to 5000 to 6000 of them.
My configuration is a combination of 50 threads to listen to 1 socket
each, 500 threads pooled and waiting for the ServerSocket.accept(), and
2500 listening for data on 20 sockets each. Tested on Red Hat Enterprise
up to 6000 sockets. I am pretty sure there no deadlocks, or anything
strange.
Has anyone done something similar? Is this idea even sane?
Thanks.



Well ...

50000 sockets (real sockets as opposed to local bypasses)'d
require something like 1.5 GB of I/O buffer with the default settings.
I'm suprised you can even open that many.

I do not know what you're trying to do, but whatever it is, you should
probably rethink the design to use *many* fewer sockets. Devote some
of the threads exclusively to managing communication and have them
relay data to and from processing threads.

George
--
for email reply remove "/" from address


From: millerch Date:   Thursday, April 28, 2005
The 50,000 sockets are the primary requirement, so thats not really
negotiable, fortunately I can split this across 2 or 3 boxes.

Opening the sockets themselves aren't the problem, w2k (client edition)
can not do it, but linux certainly can. The problem is reading/writing to
all the sockets in a reasonable time.

wrote in message:
On Thu, 21 Apr 2005 00:07:48 +0100, Chris Miller
wrote in message:
Has anyone tried to monitor 50000 socket connections in JAVA?
I've an application that needs to do just that.

I can open 50000 sockets with no problems, but things get unstable when
I try to listen to 5000 to 6000 of them.

My configuration is a combination of 50 threads to listen to 1 socket
each, 500 threads pooled and waiting for the ServerSocket.accept(), and
2500 listening for data on 20 sockets each. Tested on Red Hat Enterprise
up to 6000 sockets. I am pretty sure there no deadlocks, or anything
strange.

Has anyone done something similar? Is this idea even sane?

Thanks.
Well ...
50000 sockets (real sockets as opposed to local bypasses)'d
require something like 1.5 GB of I/O buffer with the default settings.
I'm suprised you can even open that many.
I do not know what you're trying to do, but whatever it is, you should
probably rethink the design to use *many* fewer sockets. Devote some
of the threads exclusively to managing communication and have them
relay data to and from processing threads.
George





From: George Neuner Date:   Sunday, May 01, 2005
On Thu, 28 Apr 2005 08:28:29 +0100, millerch
wrote in message:

The 50,000 sockets are the primary requirement, so thats not really
negotiable, fortunately I can split this across 2 or 3 boxes.



I'd bet the actual spec is 50000 *connections* rather than 50000
sockets. You've to decide whether they are the same.>The problem is reading/writing to all the sockets in a reasonable time.

Performance is another reason for using fewer sockets. Depending on
the hardware, drivers , TCP and JVM implementation, each socket
operation can result in several context switches and require multiple
copies be made of the user data. It may make a big difference if you
can access the drivers directly using JNI or using an optimized
library rather than going through whatever your JVM supplies..George
--
for email reply remove "/" from address



Next Message: how to use JAVAscript functions in struts html:form


Blogs related to JAVA networking, 50000 sockets

WDVL Weekly Newsletter
Core 2 Extreme processors, introducing a desktop design with sockets for two ... This subscription-based service allows access to over 50000 professional grade photos ... for Java news, articles, tutorials, reviews, applets and more! ...

Rats
My ethernet cord is broken and keeps popping out of the socket every five seconds. ... Ever since that grasshopper cake at Java turned out to not actually be grasshopper but ... I broke 50000 words to win NaNoWriMo a week ahead of time. ...

Lotto Lottery Bingo
latest version browser price socket computer slots ... Other operators use Java or Flash based games that allow you to play immediately online ... Some 50000 of the estimated 3 million land-based bingo players now play bingo online. ...

http://verwalter.mylvepage.com
1 (UDP) - Sockets des Troie 2 Death 15 B2 20 Senna Spy FTP server 21 Back ... 1212 Kaos 1234 SubSeven Java client, Ultors Trojan 1243 BackDoor-G, SubSeven, ... Rock 49301 OnLine KeyLogger 50000 SubSARI 50130 Enterprise 50505 Sockets des ...

Trabajando con Redes
puerto 1234 SubSeven Java client, Ultors Trojan puerto 1243 BackDoor-G, SubSeven, ... puerto 2000 Der Späher / Der Spaeher, Insane Network, Last 2000, ... puerto 50000 SubSARI puerto 50130 Enterprise puerto 50505 Sockets des Troie ...

CIS 3081 Advanced Client/Server Computing and Dist...
nthonl…network to host long Symbolic constants for socket call parameters. ... for (i = 1, i<=50000, i++) { printf (“ c = %d \n”, i); sum = sum + i; ... The basic concept will be illustrated in Java code snippets. ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional