pravin gate wrote:So is it there any way where I can provide small amount of jvm (thread) memory for small tasks and good amount of memory for large tasks.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
pravin gate wrote:So is it there any way where I can provide small amount of jvm (thread) memory for small tasks and good amount of memory for large tasks.
You can certainly allocate more memory for a JVM (in several ways), but I'm not sure whether that include limits per Thread (never tried).
However, I'm not sure that either task you list is going to be affected much by throwing memory at it. As you say, the login task is small, and the file transfer task is likely to be limited by the speed of the connection rather than the amount of available memory. In fact, if it was me, I think I might be looking at limiting the amount of memory available to a file transfer process rather than expanding it, simply because it might be hanging around for a long time; however, I think I'd probably use a mechanism like a blocking queue to do it, rather than mucking about with startup params.
My advice would be to do profiling to find out
(a) Whether you really do have a problem, and
(b) Exactly where it is.
Winston
pravin gate wrote:ok. So here I have created a Test application from which I am able to login(means creating connections to a singke port) number of users.
But after connecting 3000+ users , program giving me Outofflowmemory memory heap space exceptions.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
pravin gate wrote:This exception I am getting when I am trying to connect 4000 users to single port (means 4000 users will be logged in after successful login) .
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
pravin gate wrote:This exception I am getting when I am trying to connect 4000 users to single port (means 4000 users will be logged in after successful login) .
Port, schmort - shouldn't make a whit of difference (except that you may be taxing a particular bit of inetd (or whatever the port listener du jour is these days)).
Also: nothing to do with 'flow memory'; or so it would seem.
The only thing I see is that there are an awful lot of what look like Swing or AWT methods involved. Any particular reason for that? It may be perfectly reasonable, but is it possible that you're retaining more than just the login credentials from your process?
Fraid I'm no expert when it comes to GUI apps, but 4,000 logins sounds pretty reasonable to me, even if they aren't doing anything. I've worked on some medium size servers that didn't allow that many user logins.
Apart from twiddling with the heap size, I can't suggest much more; if a 10% increase allows you 10% (or roundabout) more logins, I suspect you've found your bottleneck.
Winston
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |