Re: Number of Threads per process in Java

2004-09-15 Thread Anatoly Vorobey
On Tue, Sep 14, 2004 at 09:55:41PM +0300, [EMAIL PROTECTED] wrote: > >It's possible, of course, that the nature of the task at hand is such > >that it's impossible to satisfy condition a), because the code that does > >the actual job entrusted to the server *must* wait for some resources. > > Or d

Re: Number of Threads per process in Java

2004-09-14 Thread amos
Micha Feigin wrote: On Tue, Sep 14, 2004 at 09:35:13AM +0300, [EMAIL PROTECTED] wrote: Daniel Feiglin wrote: Is this some kind of thread per client application? If it is, you might like to take a look at the good old C library select(2) api which has been somehow implemented in Java 1.4.x (see for

Re: Number of Threads per process in Java

2004-09-14 Thread amos
Anatoly Vorobey wrote: [EMAIL PROTECTED] wrote on Tue, Sep 14, 2004 at 09:35:13AM: If it is, you might like to take a look at the good old C library select(2) api which has been somehow implemented in Java 1.4.x (see for example, API doc java.nio.channels.SelectableChannel). I haven't used this Ja

Re: Number of Threads per process in Java

2004-09-14 Thread Anatoly Vorobey
On Tue, Sep 14, 2004 at 12:16:37PM +0300, Eli Kara wrote: > > I wrote (and have been maintaining) a network memory cache server using > > the single-thread model and libevent. It routinely handles many hundreds > > of simultaneous clients, easily scales to over a thousand, and does all > > this usi

Re: Number of Threads per process in Java

2004-09-14 Thread Micha Feigin
On Tue, Sep 14, 2004 at 09:35:13AM +0300, [EMAIL PROTECTED] wrote: > Daniel Feiglin wrote: > > >Is this some kind of thread per client application? > > > >If it is, you might like to take a look at the good old C library > >select(2) api which has been somehow implemented in Java 1.4.x (see for >

Re: Number of Threads per process in Java

2004-09-14 Thread Oded Arbel
On Tuesday 14 September 2004 10:44, [EMAIL PROTECTED] wrote: > Oded Arbel wrote: > >On Tuesday 14 September 2004 09:35, [EMAIL PROTECTED] wrote: > >>Now you say that the benefit of using select is to cut-down the > >>number of threads/processes - > >>what do you expect to gain from this? Reduce mem

Re: Number of Threads per process in Java

2004-09-14 Thread Muli Ben-Yehuda
On Tue, Sep 14, 2004 at 09:50:08AM +0200, [EMAIL PROTECTED] wrote: > I can not say anything about the performance of 1:1 linux threading model. > I can not say that it is supperior or anything like that. I have not > done any benchmarks. I can just say that the design of this model has > some draw

Re: Number of Threads per process in Java

2004-09-14 Thread Oded Arbel
On Tuesday 14 September 2004 10:45, Omer Zak wrote: > One thing which I do not understand: > > Why use Java at all in a system, which needs to handle hundreds or > thousands of concurrent HTTP calls, and therefore can justify the > effort to be invested in optimizing thread handling by using C/C++

Re: Number of Threads per process in Java

2004-09-14 Thread Eli Kara
> > I wrote (and have been maintaining) a network memory cache server using > the single-thread model and libevent. It routinely handles many hundreds > of simultaneous clients, easily scales to over a thousand, and does all > this using very little CPU (never more than 1-2%). It'd be nice to be >

Re: Number of Threads per process in Java

2004-09-14 Thread shtirlitz
Quoting Muli Ben-Yehuda <[EMAIL PROTECTED]>: I can not say anything about the performance of 1:1 linux threading model. I can not say that it is supperior or anything like that. I have not done any benchmarks. I can just say that the design of this model has some drawbacks. "However, the two majo

Re: Number of Threads per process in Java

2004-09-14 Thread amos
Oded Arbel wrote: On Tuesday 14 September 2004 09:35, [EMAIL PROTECTED] wrote: Now you say that the benefit of using select is to cut-down the number of threads/processes - what do you expect to gain from this? Reduce memory use? Reduced overhead. The overhead of context switching between m

Re: Number of Threads per process in Java

2004-09-14 Thread Omer Zak
One thing which I do not understand: Why use Java at all in a system, which needs to handle hundreds or thousands of concurrent HTTP calls, and therefore can justify the effort to be invested in optimizing thread handling by using C/C++ implementation? Oded Arbel wrote: On Tuesday 14 September 2

Re: Number of Threads per process in Java

2004-09-14 Thread Anatoly Vorobey
[EMAIL PROTECTED] wrote on Tue, Sep 14, 2004 at 09:35:13AM: > >If it is, you might like to take a look at the good old C library > >select(2) api which has been somehow implemented in Java 1.4.x (see for > >example, API doc java.nio.channels.SelectableChannel). I haven't used > >this Java API myse

Re: Number of Threads per process in Java

2004-09-14 Thread Oded Arbel
On Tuesday 14 September 2004 09:35, [EMAIL PROTECTED] wrote: > Now you say that the benefit of using select is to cut-down the > number of threads/processes - > what do you expect to gain from this? Reduce memory use? Reduced overhead. The overhead of context switching between multiple threads, e

Re: Number of Threads per process in Java

2004-09-13 Thread amos
Daniel Feiglin wrote: Is this some kind of thread per client application? If it is, you might like to take a look at the good old C library select(2) api which has been somehow implemented in Java 1.4.x (see for example, API doc java.nio.channels.SelectableChannel). I haven't used this Java API mys

Re: Number of Threads per process in Java

2004-09-13 Thread Muli Ben-Yehuda
On Mon, Sep 13, 2004 at 08:08:29PM +0200, [EMAIL PROTECTED] wrote: > So it is better to switch to NetBSD. I'll assume for a second that you aren't just trolling. Care to elaborate on why you think M:N is superior, considering the details and performance of the Linux implementation of 1:1? Cheers

Re: Number of Threads per process in Java

2004-09-13 Thread guy keren
On Mon, 13 Sep 2004, Daniel Feiglin wrote: > Is this some kind of thread per client application? > > If it is, you might like to take a look at the good old C library > select(2) api which has been somehow implemented in Java 1.4.x (see for > example, API doc java.nio.channels.SelectableChannel).

Re: Number of Threads per process in Java

2004-09-13 Thread shtirlitz
> > > > U better try to test the new kernel version 2.6.x. > > It has support for userspace semaphores > > They're called 'futexes'. > > > and support > > for mapping number of kernel threads for different number > > of userspace threads. I think it is called N:M model. > > It's called 'M:N thread

Re: Number of Threads per process in Java

2004-09-13 Thread Muli Ben-Yehuda
On Mon, Sep 13, 2004 at 10:20:40AM +0200, [EMAIL PROTECTED] wrote: > > Hi Vladek > > U better try to test the new kernel version 2.6.x. > It has support for userspace semaphores They're called 'futexes'. > and support > for mapping number of kernel threads for different number > of userspace

Re: Number of Threads per process in Java

2004-09-13 Thread Oron Peled
On Monday 13 September 2004 10:46, Sobolevsky Vladek wrote: > Hi All, > I have problem to run more then 1000 threads on Linux. > ... > I am running Red Hat 7.2 , 2.4.18 kernel. Even if/when it works, it would create huge scalability problems due to the Linux threading model of this old distro. Fo

Re: Number of Threads per process in Java

2004-09-13 Thread Daniel Feiglin
Is this some kind of thread per client application? If it is, you might like to take a look at the good old C library select(2) api which has been somehow implemented in Java 1.4.x (see for example, API doc java.nio.channels.SelectableChannel). I haven't used this Java API myself, but if it's anyth

Re: Number of Threads per process in Java

2004-09-13 Thread Oded Arbel
On Monday 13 September 2004 11:10, Eli Kara wrote: > On Monday 13 September 2004 10:46, Sobolevsky Vladek wrote: > > Hi All, > > I have problem to run more then 1000 threads on Linux. > > I get Out of Memory error, the program written in Java so I suspect > > it related > Have you tried increasing

Re: Number of Threads per process in Java

2004-09-13 Thread shtirlitz
Hi Vladek U better try to test the new kernel version 2.6.x. It has support for userspace semaphores and support for mapping number of kernel threads for different number of userspace threads. I think it is called N:M model. In general it can give you some imprevements on the same hardware. Also

Re: Number of Threads per process in Java

2004-09-13 Thread Eli Kara
On Monday 13 September 2004 10:46, Sobolevsky Vladek wrote: > Hi All, > I have problem to run more then 1000 threads on Linux. > I get Out of Memory error, the program written in Java so I suspect it > related > To Java thread implementation. This limitation applies only to one > process , I can ru

Number of Threads per process in Java

2004-09-13 Thread Sobolevsky Vladek
Hi All, I have problem to run more then 1000 threads on Linux. I get Out of Memory error, the program written in Java so I suspect it related To Java thread implementation. This limitation applies only to one process , I can run For example 2 processes that will use 900 threads each and it works f