Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ColdFusion not using -Xms JVM argument I specified

Community Beginner ,
Dec 17, 2008 Dec 17, 2008
I have a ColdFusion instance that I'd like to configure to use a MINimum amount of memory. I'm setting the minimum heap size value to be equal to the maximum heap size value so CF can just grab the memory all at once and not have to worry about messing with the size of the heap. The problem is when the ColdFusion service starts, it's NOT grabbing the 256MB of memory I told it to grab, it's only grabbing ~80MB. The strange thing is it will obey the MAX heap size I have set AND if I set the -Xms attribute to a value of "0m" the service won't start up. So it appears to be USING the value of the -Xms parameter to some degree. I'm at a loss as to why this is happening. Does anyone have any ideas? Below are the JVM args in the jvm.config file for my particular instance.

java.args=-Xms256m -Xmx256m -server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=128m -XX:+UseParallelGC -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Dcoldfusion.rootDir={application.home}/

I am running CFMX 7.0.2 Enterprise using multi-server instances on Windows 2003
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Feb 13, 2009 Feb 13, 2009
Totally forgot to update this post. Adam, thanks for mentioning the Windows Task Manager isn't always very accurate, that turned out to be the case. CF WAS allocating memory properly, the Task Manager wasn't showing it consistently across machines. I had the Task Manager show the amount of memory for a process that was stored in virtual memory in addition to the default columns it displays, and sure enough, everything added up to what I told CF to allocate.

Thanks for your help
Translate
LEGEND ,
Dec 17, 2008 Dec 17, 2008
First of all - and it's a slightly semantical point - but CF doesn't grab
any memory from the system at all. CF is a Java application, and the *JVM*
grabs the memory. It's got nothing to do with CF.

But that's mostly beside the point.

How are you determining that the JVM isn't grabbing the memory?

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 17, 2008 Dec 17, 2008
> I'm setting the minimum heap size value to be equal to the maximum
> heap size value
> [...]
> the 256MB of memory I told it to grab,

256MB seems like a pretty small heap to allocate, btw.

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 18, 2008 Dec 18, 2008
I'm fully aware that CF runs on top of Java and how they mesh with each other. 256MB is small yes, I plan to bump it up to 1024MB once the -Xms is actually being used. I can tell that the JVM for the CF instance is not grabbing the minimum amount of memory I set because when I start the service for the instance I'm working with, I can see the new process in the "Processes" tab of the Windows Task Manager, and it never exceeds ~80MB, even after running for a little while.

I have the minimum heap size set to 1GB for one of my production servers, and it grabs 1GB of memory right away after the service starts. The only difference between the server I'm having issues with and the production server is that the one I'm having issues with is a multi-instance install, versus a regular install of CF (without instances).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 18, 2008 Dec 18, 2008
> , I can see the new process in the "Processes" tab of
> the Windows Task Manager, and it never exceeds ~80MB, even after running for a
> little while.

I wouldn't put too much stock in that figure if I was you: it's never
seemed to be even remotely representative of reality to me. If you add in
the VM column to that display, that seems to more accurately reflect what
one would expect to see here. Also, if you flick to the Performance tab,
and look at the PF Usage figure, you'll see your RAM being allocated there.
I'm not sure why it is always reflected as being allocated to the paging
file, because - obviously - that's not so good (running of disk instead of
actually in RAM). I suppose possibly because it's such a big chunk of RAM
to be allocated all at once? I've long since given up trying to work out
what Windows does with the RAM one gives it.

A more accurate measure of what RAM the JVM has to play with is to ask it.
Have a look at the memory-oriented methods of java.lang.Runtime:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html

--
Adam
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2009 Feb 13, 2009
LATEST
Totally forgot to update this post. Adam, thanks for mentioning the Windows Task Manager isn't always very accurate, that turned out to be the case. CF WAS allocating memory properly, the Task Manager wasn't showing it consistently across machines. I had the Task Manager show the amount of memory for a process that was stored in virtual memory in addition to the default columns it displays, and sure enough, everything added up to what I told CF to allocate.

Thanks for your help
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2008 Dec 19, 2008
Kurt wrote:
> The only difference
> between the server I'm having issues with and the production server is that the
> one I'm having issues with is a multi-instance install, versus a regular
> install of CF (without instances).
>

Just to throw an idea out there. With multi-instance installs each
instance can have its own configuration. So it is possible that you are
modifying the configuration for instance B but looking at the memory for
instance A.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 19, 2008 Dec 19, 2008
And you can easily figure that out by commenting out the JAVA.HOME line and trying to start the service. It fails, you figured out which config file you're using :)

Or you could dig through the registry.....
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources