1 Reply Latest reply on Apr 3, 2007 12:35 PM by Newsgroup_User

    JVM Memory Settings

      I've just migrated to a new server and now I'm getting a java.lang.OutOfMemoryError every day or two. The new server has two dual core processors and 16 GB of RAM. It's running j2sdk1.4.2_11 and W2K Server Enterprise edition. The site serves in excess of 60,000 visitors per day. The Task Manager shows that SQL Server 2005 is using about 1.4GB of RAM and jrun.exe consumes less than 0.8 GB of RAM. Nothing else consumes much memory.

      My current JVM memory settings are -Xms1024m -Xmx1024m -XX:MaxPermSize=512m. When I try to set them any higher ColdFusion will not start. The log file says,"Error occurred during initialization of VM Could not reserve enough space for object heap Starting Macromedia JRun 4.0 (Build 92909), coldfusion server" Any suggestions on what I can do to get CF to happily live in this new box and make better use of the RAM?
        • 1. Re: JVM Memory Settings
          Level 7
          > My current JVM memory settings are -Xms1024m -Xmx1024m -XX:MaxPermSize=512m

          I've been able to get the heap up to 1300MB on Windows and 1600MB on
          Solaris, using the default JVM that ships with CFMX7. Other JVMs could
          quite possibly help on *nix, but I have read (can't find reference, sorry),
          that 1300MB is as good as it gets on Windows (OS restriction, not JVM

          512MB seems a comparatively large permanent generation size, but I say this
          only because in the configs I have seen, it's usually quite a small
          fraction of the heap size (say 128MB for a 1GB heap).

          There's plenty of stuff around about tuning your garbage collection, which
          could be as much of a problem as not being able to allocate a whole heap
          (pun intended, I'm afraid) of RAM to the JVM.

          One way to access more RAM is to use more than one JVM: running more than
          one CF instance to service the site.

          It's probably also worth looking at what you're putting in RAM, and whether
          you're leaving it there for the optimal amount of time (code tuning, rather
          than JVM tuning).