[EMAIL PROTECTED] wrote:
> My system has 1 GB of memory and about 2GB of paging space, so I shouldn't
> have any memory constraints at this point. I looked back in my logs for
> the past week and I do have a couple of "java.lang.OutOfMemoryError", but
> only about 5 over a 23 hour period. At the system level I never come close
> to using up my resources I check with vmstat and sar. So is there a limit
> somewhere about how much memory my system will give to my JVM. Is it a JVM
> setting?
Yes. Your Java VM get a block of memory from OS, and then allocate or free
memory from that dedicated block of memory. Make an estimate of how much
memory at peak time are needed, then start your JVM with that much or a bit
more than that much of memory. You may verify this by either looking at NT's
task manager where process information is displayed, or looking at what "top"
on Unix says about your JVM.
For JDK1.1.x, use
java -ms60m -mx120m YourClass
that specifies that JVM starts with 60 MB of memory, and can group up to 120
MB. If at peak time, your Java applications allocate so many objects that 120
MB room is not large enough, then you will get "java.lang.OutOfMemoryError".
For JDK1.2, use
java -Xms60m -Xmx120m YourClass
Notice the -X option switch that is new under Java 2.
regards,
-Shaoping Zhou
> I'm really leaning toward the number of sockets/connections I
> have getting backed up, but I haven't been able to find any documentation
> on what to set Jserv's properties to allow more sockets. There are a
> couple of settings in Jserv.proerties and the properties file for my
> servlet zone, but I don't want to change them until I understand how many
> servlets can the defaults handle concurrently.
> Thanks for keeping the suggestions coming Jon, Jean, Lichtner!
>
> PAUL M. LUCAS
> AIX System Admin.
> T/L 861-7415
> External 972-561-7415
>
> "jon *" <[EMAIL PROTECTED]> on 04/14/99 03:43:19 PM
>
> Please respond to "Java Apache Users"
> <[EMAIL PROTECTED]>
>
> To: Java Apache Users <[EMAIL PROTECTED]>
> cc: (bcc: Paul Lucas/Dallas/IBM)
> Subject: Re: Jserv defaults for High Volume Website
>
> > Is there an easy way to tell if my JVM is running out of memory?
>
> in the log files, you will get OutOfMemoryExceptions all over the place and
> Apache JServ will stop responding because it isn't able to allocate any
> more
> memory to itself in order to spawn threads and such. ;-)
>
> -jon
>
> ----------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://java.apache.org/main/mail.html/>
> Problems?: [EMAIL PROTECTED]
>
> ----------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://java.apache.org/main/mail.html/>
> Problems?: [EMAIL PROTECTED]
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]