xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Levinson <Jonathan.Levin...@intersystems.com>
Subject RE: Memory leak in FOP
Date Thu, 08 Sep 2011 13:45:45 GMT
The reason we share a FopFactory instance between threads is speed.  FopFactory creation is
very expensive.  I believe it involves font look ups.

Perhaps we should go the private branch approach, just applying to FOP 1.0, the fixes to the
thread-safety issue.  Thanks for the beginnings of such a list, but would you mind sharing
the complete list, or instructing me on how I can construct a complete list?

Best Regards,
Jonathan Levinson


> -----Original Message-----
> From: Alexios Giotis [mailto:alex.giotis@gmail.com]
> Sent: Thursday, September 08, 2011 5:09 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Memory leak in FOP
> 
> Hi Jonathan,
> 
> We are running FOP multi-threaded in many production systems. Each system is
> creating thousand documents per day (typically 100 -500 thousand PDFs) and I
> have not noticed any memory leak. Having said that, our servers are running
> with large memory heaps (6-10GB), FOP uses a lot of memory for large
> documents and internal caches for performance.
> 
> If you are going to use it at production, I would recommend not to share the
> same FopFactory instance between threads. It is supposed to the thread-safe
> but we found (and in most cases fixed in trunk) several issues. You could try the
> FOP trunk or you could apply the patches for the related issues in your own
> private branch (this is what we do). Some issues that I remember:
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=50698  (starting from
> http://marc.info/?l=fop-user&m=129646673801270&w=2)
> https://issues.apache.org/bugzilla/show_bug.cgi?id=46360
> 
> and lately a deadlock that I am waiting for someone to review the patch:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=46962
> 
> Best Regards,
> Alexis Giotis
> 
> 
> 
> 
> 
> On Sep 7, 2011, at 7:31 PM, Jonathan Levinson wrote:
> 
> > To speed up FOP rendering, I have developed a multi-threaded program that
> initializes a FOP factory and shares it amongst the thread instances.
> >
> > We experience a large performance increase because we are not starting a
> JVM on each instance of FOP rendering and we are not creating a FOPFactory
> for each thread but sharing a FOPFactory amongst threads.
> >
> > Testing on LINUX and using the following command to examine memory:
> >
> > ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS
> >
> > I notice a slow memory memory leak.
> >
> > The test sends the same xml and xsl over and over again to the same multi-
> threaded program with its FOP factory instance.
> >
> > Is this a well known problem in FOP?  Does FOP leak memory?
> >
> > Best Regards,
> > Jonathan Levinson
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message