Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server load

 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a quick test client to stress my server. The server consists of a ConnectionFactory which gives out Connections to clients. Each Connection has a reference to a single Data object.
I wrote the test client to create 15 threads, and each thread does this 100 times:

Whenever I create more than 15 threads, I start getting refused on a few of my connections:

This happens if I crank it up to just 16 threads.
I can run this test client from 2 different hosts, at 15 threads each, and it runs fine. I'm thinking I've reached a limit for one client to connect over and over with multiple threads without getting whacked by some sort of timeout.
Any thoughts? Does it really matter in this case?
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem during the testing. I issued a sleep(5000) after instantiating every 15 threads.
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same here. RMI server doesn't like to be bombarded with multiple simultaneous client requests. I wait() 100ms between creating threads that request a connection.
Eugene.
 
Eduard Jodas
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JDK 1.4 I have tried up to 20 threads per client, without sleeping between connections, and had no problems.
But I close the connections (unregister the remote objects), so the case is a bit different.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic