Affects Version/s: current
Fix Version/s: None
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Windows 7 Enterprise X64
We experienced "outages", periods without any JVM activity (i mean any response to clients) in our system. We realized, that this is caused by the soft reference cache in PDFFile class.
I created a small test project (eclipse project), which contains the followings:
- a hacky subclass of PDFFile and Cache classes, which lets you basicly switch off this built in caching
- a unit test containing one test method with caching and without caching to let you to compare the results. A PDF file is converted into a set of JPG files. ~300 pages.
I also traced the JVM, and I attached the results. 256M and 512M heap with and without caching. From the graphs it can be easily seen, that the caching in general takes a lot of CPU time for the garbage collection, and there are "outages", when the whole CPU time is consumed by GC. On the other hand without caching the whole process is not slower at all, and the GC activity and heap size is pretty normal.
I would suggest to throw away this caching, or to make it switchable.