Calendar
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Recent Entries
Come On In, Rails-The Water's Warm
Shan's Simple Examples: File uploads with Flex and ColdFusion
Recent Comments
Google Calendar API - Creating a new Calendar with ColdFusion
Steve Julian said: When and where are you going to post the finished CFC's ? Thanks
[more]
Three Phases of Programmer Development
Pat Branley said: I normally think of those phase 2 people as 'programmers' and the phase 3 people as 'developers'.
I...
[more]
New Job Title: Front End Engineer
Sean Corfield said: Well, there's always the excellent Fusion Authority Quarterly Journal...
[more]
Down To The Wire: HTTP Sniffers
Brian M said: I second the mention of the Charles Web Debugging Proxy that Tariq mentioned. It is fantastic. It s...
[more]
New Job Title: Front End Engineer
Patrick said: Heya Sean. Good point. I never understood how they did things over there at SysCon, and I understand...
[more]
Archives By Subject
Business of Software (4) [RSS]
ColdFusion (318) [RSS]
Conferences (6) [RSS]
Databases (87) [RSS]
Flex & Flash (109) [RSS]
Fusebox (87) [RSS]
General Development (29) [RSS]
Google (9) [RSS]
Hardware (5) [RSS]
JVM & Java (132) [RSS]
Linux (20) [RSS]
Miscellaneous (254) [RSS]
Performance (8) [RSS]
SeeFusion (36) [RSS]
Shan's Simple Examples (7) [RSS]
User Interface (3) [RSS]
Windows (5) [RSS]
Archives By Poster
Daryl Banttari (10)
Nat Papovich (29)
Patrick Quinn (36)
Shannon Hicks (22)
Steve Nelson (21)
Tyson Vanek (3)
Reactor Memory Usage Analysis - Part 1
I have been observing the great work that Doug Hughes has been doing on Reactor. "Reactor is an ORM framework (Object Relational Mapper), meaning it transcodes your relational database into objects for you to use in your CF programming". Because of pressure of work I had not been able to be very useful to the project at all.
Recently, Doug had expressed concerns about what appeared to be a memory leak. As we have been working on such issues for Allaire and then Macromedia clients for many years, I volunteered to help.
This is the first blog of what we did and achieved so far and this was already circulated to the Reactor email list.
Here is what I have observed since we made the tweaks to the jvm.config file, shown below, on Doug''s server. Doug restarted a little while ago but I don''t think it was due to low memory in the instance. Here is the memory situation just before the restart:
Total Memory=512768 Free=215700
At this point the instance had been up and running from 05/25 21:47:47 to 05/28 14:16:57, around 2 days 17 hours and the free memory never got dangerously low during that time, in the logs I saw. Disabling those Explicit Full GC''s had a beneficial impact. I feel there are still improvements to be made but I know Doug is also looking at code-level issue at present so will hold off further recommendations at present.
In essence, we did two different things, the first group were related to monitoring or logging. We enabled Verbose Garbage Collection logging using these commands in the jvm.config file:
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:reactorgc.log (the last bit -Xloggc:reactorgc.log gives the log a name). This information goes into the jrun4 or runtime bin directory, by default. As a note point, this is not too verbose so the log does not get too big, however it should eventually be disabled. This logging helped us identify that too many Full GC''s were occurring.
We also enabled JRun Metrics Logging which shows us the memory status at a point in time along with thread usage details. We set this to report every 60 seconds.
The most useful piece that I used was SeeFusion which enables us to observe memory and thread behavior in real-time by looking at requests as they literally run. We also wrapped the JDBC driver with SeeFusion which enabled us to monitor database calls, SQL passed and query times.
Moving on the second group of things we did. As a result of looking at this monitor and log data, we observed to many Full GC''s taking place and an difficulty for JRun-CFMX to get up and running "comfortably". As a result, we made these changes to the jvm.config file:
Added these arguments (I have these on separate lines here for clarity but they should be added to the arguments string with a single space between each):
-Xms512m (this sets the memory available to the jvm at start at 512MB which saves the effort of the jvm acquiring it)
-XX:PermSize=128m (this does the same thing as above for the permanent memory space which is what the jvm uses for its own operation).
Note the start settings here must always be either equal to or less that the maximum setting, they cannot be set to higher. Also note, if you only have a single jvm.config file in a single jvm whatever you set in that file will apply to all instances. So if you have 5 JRun/CFMX instances they will each take the start amount of memory when they start up.
-XX:+DisableExplicitGC (this stops all explicitly called Full Garbage Collections) this does not stop all Full GC''s only those called explicitly by something.
These settings certainly improved memory availability to the instance used for Doug''s blog I am still seeing frequent filling up of the New Space in the jvm so I think we should try some more jvm argument tweaks but as I say, I think Doug is working on some code level stuff so it is prudent to observe what effect this has, first.


There are no comments for this entry.
Add Comment