At 01:59  12/8/00 -0700, you wrote:
>what i did in my test program was kind of quick and
>dirty. i pre-created 100 threads in an array in
>ServerSocketAcceptor and maintained an index, and when
>a socket is returned by accept, i merely grab the
>thread from the array as pointed by the index
>(synchronized of course), and in the meanwhile
>increment the index. i assume this should be
>superfast, even faster than the a thread pool where
>you go through more method invocations and/or check
>thread availabilities. and i still lose connections!
>any clue there? 

hmmm ... do you want to post the src so I can have a look ?

>some side notes: I wrote a load test program that
>starts n threads to concurrently retrieve a html page
>from a web server. my apache server also chokes at
>mere 50 threads, while IIS and netscape seems doing
>better. I wonder if there are similar issues there.

hmm could be. Not sure depends how you test. I once had several problems
with a test program I wrote in java due to java problems but they should
have been resolved by now. If you can it may be useful to have a look at
the test code. Thou I am not sure what could be the problem.

>btw, I am running this test on NT 4.0 (service pack 5)
>on JDK 1.2.2 hotspot. Avalon is 2.2-dev, James 1.1

I am not sure if this still stands but when I originally tried hotspot a
lot of my programs decreased in performance. As ServerSocketAcceptor will
never get jitted under hotspot (because method never left) it could be
cascading problems where one part is causing other parts not to get jitted.
I haven't got a lot of experience with newer hotspots but I can have a look
at it ... if you are more familiar it may be good to have a look at hotspot
optimisation guide from sun to get it working up to par. Unfortunately I
don't have a profiler atm so can't really test it well ...

Try using a non-hotspot JVM and see if that effects performance and if it
does try running the hotspot for longer durations of time before you start
testing etc.


Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to