Regarding threads in Linux implementation of Java, File descriptor and sockets
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Amitabh_Choudhury
Posted On:   Tuesday, October 30, 2001 10:37 PM

Hi Heres a brief background. I have to check the maximum number of users that can log into my application running on linux. Here are some inputs I got. 1. 1024 File descriptors can be used by default per process. 2. Every thread created in Java creates a process in linux.Hence if three threads are created in one session of java then three processes will be created and hence 3*1024 File descriptors can be created. i have decided to start a process that will 1. Create three threads 2. Each thread will capture a port 3. Each thread will create a socket per request.    More>>


Hi


Heres a brief background.




I have to check the maximum number of users that can log into my application running on linux.


Here are some inputs I got.

			
1. 1024 File descriptors can be used by default per process.
2. Every thread created in Java creates a process in linux.Hence if three threads are created in one session of java
then three processes will be created and hence 3*1024 File descriptors can be created.



i have decided to start a process that will

			
1. Create three threads
2. Each thread will capture a port
3. Each thread will create a socket per request.



Hence I will be able to allow 3*1009 users to connect to my server.








Question



Are my assumptions correct?


If I want a high number of users to access my server then will this solution work?


Is there any other way to increase the number of sockets opened at one point of time


My target is 2000000 user simultaneously accessing my server.

Is there any other solution without increasing the number of computers.





The PC configuration will not be a constraint.



Any viable solution is appreciated.



regds.,


Amitabh.    <<Less

Re: Regarding threads in Linux implementation of Java, File descriptor and sockets

Posted By:   Nathan_Meyers  
Posted On:   Wednesday, October 31, 2001 05:46 PM

The assumption is not correct. It's true that each thread has its own entry from the pid table, but they're threads - not heavyweight processes - that share memory and file descriptors.


You do have the option to launch multiple Java processes, if your app can deal with that. I don't know if you can get to 2,000,000 simultaneous connections, but you might check this page at Volano for a discussion of increasing limits.

About | Sitemap | Contact