Application slows down over time - Java + Python -
this difficult 1 explain, , not hopeful single, simple answer, thought it's worth shot. interested in might slow down long python job interacts java application.
we have instance of tomcat running complex , robust webapp called fedora commons (not confused fedora os), software storing digital objects. additionally, have python middleware performs long background jobs celery. 1 particular job ingesting 400+ page book, each page of book has large tiff file, smaller pdf, xml, , metadata files. on course of 10-15 minutes, derivatives created these files , added single object in fedora.
our problem: on course of ingesting 1 book, adding files digital object in java app fedora commons slows down consistently , predictably, can't figure out how or why.
i thought graph of ingest speeds might help, perhaps belies common memory management pattern more experienced java might recognize:
the top-left graph timing large tiffs, being converted jp2, ingested fedora commons. bottom-left small xml files, no derivative being made, ingested well. can see, slope of curve slowing down identical. on right, 2 processes graphed together.
i've been on internet trying learn garbage collection in java (gc), trying different configurations, not having effect on slowdown. if helps, here memory configurations we're passing tomcat (where tail-end believe diagnostic):
java_opts='-server -xms1g -xmx1g -xx:+useg1gc -xx:+disableexplicitgc -xx:survivorratio=10 -xx:targetsurvivorratio=90 -verbose:gc -xloggc:/var/log/tomcat7/ggc.log -xx:+printgcdetails -xx:+printgctimestamps -xx:+printheapatgc'
we're working 12gb
of ram on vm.
i realize number of factors might result in behavior are, excuse pun, off charts. we've worked fedora commons , our python middleware quite time, , been successful. slow down set watch feels suspiciously java / garbage collection related, though wrong too.
any or advice digging in more appreciated!
you suspect gc problem, show no gc metrics. put program through profiler , see why gc overloaded. hard solve problem without identifying cause.
once have found problem lies, need change code instead of tweaking gc settings.
Comments
Post a Comment