Marc,

I think that the body of opinion in CS literature is consistent with your
findings.

Busy/wait burns cpu and leads to various programming problems (race,
starvation, deadlock, etc).

To address these problems a number of theorticians in concurrent
programming, such as Brinch Hansen, developed the idea of a monitor. I guess
today we would call it a design pattern.  Some writers claim that Java
wait() and notify() implement a monitor, although I've read that Brinch
Hansen is critical of the Java implementation.

Also, in the EJB benchmarks that I've run I've always found that if you try
to run too many threads, you will reach a point where application
performance declines, sometimes really dramatically. So, you need use the
Goldilocks principle in tuning your application - not too few threads and
not too many.

Which leads to a question since I'm a JBoss novice. Is there a way to set
the number of threads in JBoss?  I use WebLogic regularly and it provides a
configuration parameter that allows you to set the number of threads in the
VM that the server uses.

Bob

-----Original Message-----
From: Alexander Kogan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 10:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] LOCKING-WAITING


marc fleury wrote:
> 
> Just out of curiousity Simone...
> 
> when we benched at SUN one of the big difference under load was the thread
> management.
> 
> The best in terms of resource usage was put the thread to sleep (with a 5
> sec timeout) and notify (1) and that REALLY flew and scaled REALLY well
> because the usage of CPU and sync was really low.

This would be very good idea. For now, especially on Tru64 with JDK 1.3-1
LOKING-WAITING stuff eats a lot CPU and much more slow than on Sun.

And why do we need timeout there? Is it possible to implement a sort
of queue for that? Than you can put a new thread to the waiting list and
when the current thread is done with the transaction it can call
notify to release the tread from the waiting list.
Am I talking junk?

> 
> Do you put the threads to sleep in the current code base? I couldn't go
down
> and look for myself, plus a little introduction on what you did with the
new
> structure of cache sync would be helpful.

As far as I can see from the code - no. Again, sorry if I am mistaken.

> 
> regards
> 
> torquemada
-- 
__________________________________________________
Alexander Kogan  PTC   www.ptc.com
[EMAIL PROTECTED]    140 Kendrick St. Needham MA 02494

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to