6 Replies Latest reply on Nov 16, 2011 10:15 AM by Peter Johnson

    RAM Requires In Jboss 4

    Azizur Rahaman Newbie

      Hi,

       

      Can somebody tell me the RAM size for an Web Application for 1000 users and 2500 hits daily.

       

      Thanks

      -Aziz

        • 1. Re: RAM Requires In Jboss 4
          Radoslav Husar Master

          Hi Azizur,

           

          that strongly depends on your application. The AS7 by default starts with these switches

           

          -Xms64m -Xmx512m -XX:MaxPermSize=256m

           

          so on a machine with 1 GB of RAM that config would be alright. If I do a little match, lets say that those requests are done during a workday uniformly within 10 hours, then we are looking at  (2500 / 10) / 60 = 4.16666667 requests per minute, which is nothing so the above default config could work.

           

          Rado

          • 2. Re: RAM Requires In Jboss 4
            Azizur Rahaman Newbie

            Hi,

             

            Thanks a lot for your quick reply.Ours is a heavy HIS application and in peak hours there would be a 200 request every minute.We have already allocated 4 GB RAM to the jboss but we are geting "out of memory" error very often.

             

            Thanks a lot once again!

            • 3. Re: RAM Requires In Jboss 4
              Radoslav Husar Master

              Ah, right, I didnt notice you are using JBoss 4 which demands more RAM than AS7. Anyway, you might want to

              • increase your memory even more or
              • look into profiling and find places which use memory inefficiently or
              • look for possible memory leaks.
              • You can also try different garbage collection settings.

              But adding memory is always the simplest and quickest ;-)

              • 4. Re: RAM Requires In Jboss 4
                Klaus Olszowi Newbie

                You should also check if the system has enough physical RAM.

                 

                OutOfMemory Execptions are thrown if the Java VM can't allocate the memory in a certain amount of time. If the system uses swap space you will get such an exception even if the VM only uses just a small amount of RAM.

                 

                Which Java version are you using? Hopefully a 64-bit version.

                • 5. Re: RAM Requires In Jboss 4
                  Wolf-Dieter Fink Master

                  Hi,

                  as  Radoslav Husar  said it will depend on you application, I run different apps, one with 200req/sec and 3GB memory in total and another with less requests than yours with the same memory amount and similar problems at the beginning.

                   

                  First, OutOfMemoryExceptions in Java are unfortunately not for memory issues alone, its more that a OutOfResource, check the message that somthing is shown with the heap and not (e.g.) 'unable to start native thread' which can also happen.

                   

                  If you have a 64Bit VM you might check whether more memory help, but it might happen that this only move your problem.

                  You have to find a 'feeling' for the app behaviour

                  - does the problem occour after a while

                  - is it constant (or growing) even if the load goes down, this can be a memory leak!

                  - check what 1/10/50/100 request in parallel consume (e.g. after startup and after a while)

                   

                  may the GC be with you

                  • 6. Re: RAM Requires In Jboss 4
                    Peter Johnson Master

                    Which "out of memory" error are you getting? There are several variations on that error and each one has a completely different fix.

                     

                    If the problem really is that the heap is full, what have you done to determine what objects are filling up the heap? jmap and VisualVM are helpful in doing that. The correct solution to the problem might be to modify your application.

                     

                    BTW, While working with a customer we got AS 4.2.3 down to 64MB max heap and still were able to get about 100 web service requests per minute, sustained for about 10 minutes, without running out of memory. And by monitoring the gc data we were convinced we could run that way for days. We were trying ot track down an out of heap issue at the time so we decided to look elsewhere in the app.