Eric,
To aid in further understanding and tuning, there are some ways to gather more information about what's going on inside the JVM:
The following JAVA_OPTS enable two very useful logs:
-Xloggc:/var/log/islandora/java/java_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:ErrorFile=/var/log/islandora/java/java_error%p.log
...adjust the log path to a valid path on your system.
The java_gc.log log reveals Java garbage collection details. 'Tail' java_gc.log, watch it in real time, beginning with a freshly booted system state and then run some ingests. Observe after ingests are completed too.
If java_gc.log reports "Full GC" nonstop, then garbage collection is probably a major contributor to your CPU chew...
The second log, the JVM error log will reveal bigger, deeper issues, if they happen.
Speaking of logs, have you looked through Fedora's, Tomcat's, and PHP's logs for any errors, like out of memory errors, timeouts, etc? With a whole lot of logging going on, one of them will surely reveal some tidbit of information...
More tools for your JVM toolbox:
'jps' command, reveals JVM PIDs. Output:
jps
5097 Bootstrap
19446 Jps
...you most probably want the PID for "Bootstrap".
Armed with the JVM PID, you can use it with the 'jmap' command to peer into the heap:
jmap -heap PID
Output:
Attaching to process ID 5097, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.45-b01
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 37580963840 (35840.0MB)
NewSize = 21474836480 (20480.0MB)
MaxNewSize = 21474836480 (20480.0MB)
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 524288000 (500.0MB)
MaxPermSize = 524288000 (500.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity =
17074094080 (16283.125MB)
used = 8800584608 (8392.891510009766MB)
free = 8273509472 (7890.233489990234MB)
51.543493709037826% used
From Space:
capacity = 2200371200 (2098.4375MB)
used = 2200172576 (2098.248077392578MB)
free = 198624 (0.189422607421875MB)
99.99097315943783% used
To Space:
capacity = 2200371200 (2098.4375MB)
used = 0 (0.0MB)
free = 2200371200 (2098.4375MB)
0.0% used
PS Old Generation
capacity =
16106127360 (15360.0MB)
used = 14981246312 (14287.229835510254MB)
free = 1124881048 (1072.770164489746MB)
93.01581924160321% used
PS Perm Generation
capacity = 524288000 (500.0MB)
used = 116911768 (111.4957504272461MB)
free = 407376232 (388.5042495727539MB)
22.29915008544922% used
Watch it before, during, and after ingests, to gain a lot of understanding that can be applied to JVM tuning.
Here's my tuning o' the day for a 60GB RAM system:
-Xmn20g -Xms35g -Xmx35g -XX:PermSize=500m -XX:MaxPermSize=500m -XX:+DisableExplicitGC -XX:+UseParallelGC -XX:+UseParallelOldGC
For a 7.5GB system with 2 CPUs, I'd start experimenting with a tuning something like this:
-Xmn2500m -Xms4g -Xmx4g -XX:PermSize=200m -XX:MaxPermSize=200m -XX:+DisableExplicitGC -XX:+UseParallelGC -XX:+UseParallelOldGC
-Xmn defines the Young generation. I'm observing the system doing most of its heavy lifting in the Young generation, so I'm starting to give it more and more, and it's working better and better.
I'm also using the Parallel garbage collector, which gives you one thread of garbage collection per processor. You have two processors, so I encourage you to experiment with the parallel collector. The winning garbage collector will be revealed by the GC log. Repeating PSYoungGen collections are alright, repeating Full GC collections are not... Garbage collector type with the lowest number of Full GCs during real world system operations wins.
<B