Copy link to clipboard
Copied
Hi, I've had to increase the allocated memory once before but I forget where to do it? I've looked through CF admin but I must be missing it.
Thanks in advance...
Gary
You can do this under Java and JVM settings, using the two fields that correspond to minimum and maximum memory. This sets the overall memory allocation for the JVM itself. If you want to dig in further, you can use a bunch of switches for the JVM launcher, to control memory allocation for the various parts of the Java heap, how garbage collection works, etc.
It might be worthwhile for you to spend a little bit of time figuring out whether you actually need to increase the memory or not. Depen
...Copy link to clipboard
Copied
You can do this under Java and JVM settings, using the two fields that correspond to minimum and maximum memory. This sets the overall memory allocation for the JVM itself. If you want to dig in further, you can use a bunch of switches for the JVM launcher, to control memory allocation for the various parts of the Java heap, how garbage collection works, etc.
It might be worthwhile for you to spend a little bit of time figuring out whether you actually need to increase the memory or not. Depending on how the JVM memory allocation fields are set, you may find that the JVM is allocating memory but not actually using it for anything. The "VM" in JVM stands for "virtual machine", and it might be that your virtual machine has a certain amount of memory allocated that's not actually doing anything.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Thanks. Just need the temp fix while we dig into what is going on. We can see that traffic has increased to about 1100 transactions a second but as you mentioned there likely is more to the story.
Copy link to clipboard
Copied
1100 cf page requests per second would be quite impressive, for a single CF instance. This is not about whether cf can handle it, I just mean that it's an unusually high number.
I'd be curious how you're measuring that. Might that really be your web server, which processes far more than just cf page requests? Or maybe more than one cf instance?
If you may wonder why I'd press this point, well as Dave said, often raising the heap is secondary to finding why it's needed. Of course, if you were at cf's default heap max of 1024mb, I'd not be surprised by a need to raise the heap for 1100 rps. Heck, even people running only a few requests per second often find they need more than that 1gb default. 🙂 That may be all you need.
Sometimes only a few gig is enough, sometimes several, rarely dozens. And of course the box has to have room to provide for that. But I'm saying that sometimes the "better" solution is to understand what's causing cf heap use to rise (and be unable to GC).
And if your 1100 rps might be unusual even for your cf server (compared to previous days or weeks), perhaps THAT is a place to look into unexpected "pressure".
Finally, you show fr's tracking of heap. You won't be raising the allocated but the max. The jvm decides how much within the max to "allocate" at any time, driven by heap "use" (and whether its doing gc's is freeing up heap). Indeed, sometimes the real focus of troubleshooting cf "memory" problems indeed finding what's ending up in the heap but that can't be gc'ed.
BTW, now that I notice the fr screenshot, is it indeed fr showing 1100 requests per second? If so, that's great!
HTH.
Copy link to clipboard
Copied
Charlie,
We have about 4000 devices in the field that check in every 5 seconds and another 10,000 devices that check in every hour. Then add the rest of our traffic and I estimate around 1100 per second. I didn't look at Fusion for an exact count. We're adding load balaning this weekend to split the traffic between our two datacenters.
PS - sent you an email yesterday to try and get on your schedule to look at this.
Copy link to clipboard
Copied
Hi, Gary. I hope you will check out the top of that page you got ath "allocated memory" from. It has the graph with the requests per second in the top left graph (the dark green, shown as "# completed"). IT would be interesting to see how that jives with your estimation. 🙂
Also, as for the email, I had not seen it because (I see now) it came from a domain name that you'd never emailed me from. I would have seen it eventually, but I have to triage email focusing on what I have tracked as client email domains first. 🙂
Since I see that you asked there essentially what you asked here, and Dave had promptly replied, I'll assume your good for now. But if you may email me again, it will be more promptly responded to. 🙂
Copy link to clipboard
Copied
How much RAM does the server have? How many CF instances are running on the server? Any other memory-intensive non-CF services running on the server?
Rule of thumb: divide the RAM by the number of instances and services. You will then get the average memory to allocate to each. To be on the safe side, calculate 90% of that. Let's say the result is R megabyte.
I shall assume that, for our particular CF instance, the available memory R is at least 8192 MB (some 30% higher than the 6000 MB the instance currently uses).
The settings I would recommend for you (in the ColdFusion Administrator):
Minimum JVM Heap Size (in MB) : 8192
Maximum JVM Heap Size (in MB) : 8192
-XX:+UseG1GC in place of -XX:+UseParallelGC
After you make the changes, remember to press the Submit Changes button, and then to restart ColdFusion.
Copy link to clipboard
Copied
Bkbk, can you offer a reference that supports your assertion that everyone using cf should switch to g1gc? You don't offer any caveat or limitation, so you do seem to be asserting that.
I've simply never seen any such contention made that it's the right choice for all. I do realize it's the default gc algo if an alternative is not offered, but since cf has always and does still specifically set parallelgc, and you are suggesting that people change it, that's why I'm asking, in the behalf of all reading this.
BTW, if you or anyone may point to the top result in a Google search for: coldfusion useg1gc, see the comments there where the author, Carl, despite not clarifying things in his post, did acknowledge (on being asked this) that each must test things for themselves.
Copy link to clipboard
Copied
Charlie, I was until now unaware of Carl's G1GC post in this very forum or of his other Adobe post on G1GC. Writing that in 2013 - hats off to him. He was well ahead of the times. Both are useful references.
Bkbk, can you offer a reference that supports your assertion that everyone using cf should switch to g1gc? You don't offer any caveat or limitation, so you do seem to be asserting that.
I've simply never seen any such contention made that it's the right choice for all. I do realize it's the default gc algo if an alternative is not offered, but since cf has always and does still specifically set parallelgc, and you are suggesting that people change it, that's why I'm asking, in the behalf of all reading this.
By @Charlie Arehart
I do not assert that everyone using CF should switch to G1GC. I am only recommending G1GC in @ghanna1 's specific use-case.
The use-case consists of:
You can deduce from 1., 2., 3. and 4: a large heap size, plus the need for reduced garbage-collection pause-times. That is, for this use-case, pause-time minimization or increased request-processing-speed (G1GC) would be preferable to throughput maximization or increased volume of requests processed (ParallelGC).
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/g1_gc.html
In any case, for applications that have a substantial heap-size, say, 4 GB or more, G1GC is Oracle Java's default garbage collector. That has been so from JDK 9 onwards.
Granted, ColdFusion still uses ParallelGC as default. However, I would bet the following. Were you to present the above use-case to Adobe's ColdFusion Team, they too would recommend G1GC.
Copy link to clipboard
Copied
I look forward to hearing if ghanna1 might consider doing some testing to demonstrate whether the change would help or not. I've still not found any significant problems that were solved by changing the gc. Instead, there have always been other explanations. I've seen such assertions like yours here, but not real demonstrations with real traffic. And to be clear, even if Adobe suggested doing it based on "this use case" alone (and regardless of the oracle docs), I'd say the same. But I am prepared to have my understanding changed--with evidence.
Copy link to clipboard
Copied
Charlie, I agree with your point about evidence. As folks say, the proof of the pudding is in the eating. 🙂 Afterall, this is Software Engineering, not an exact science.
So I would amend my recommendation to @ghanna1 :