18 May 09:55
Re: UIMA internals memory footprint
Kirk True wrote: > Hi Adam, > >> Kirk, >> >> In this test are you running a CPE or just an AnalysisEngine? If it >> is a CPE do you know what your CAS Pool size is? > > It's an AnalysisEngine. > >> When a CAS is created it does allocate a large heap which is then >> filled as you create annotations. By default I believe this is >> 500,000 cells (2MB) per CAS, but this can be overridden (see >> UIMAFramework.getDefaultPerformanceTuningPropeties()). So this can >> defintely be one source of memory overhead. As you saw it does not >> grow with larger documents, it will only grow if you create enough >> annotations to fill up the allocated space. > > I noticed that this is tweak-able and set it to something insanely > small (like 100). But, as you said, it grows as the number of > annotations grow. Since the parameter is under the umbrella of > performance, I'd assume that it would actually be better to > pre-allocate close to what we're going to use. [...] Yes. You can estimate data use on the heap as follows. Each FS uses at least one int for the type information, plus whatever features it has. So a vanilla annotation is 3 ints, one for the type, and one for the start and end features,(Continue reading)
that JCas
objects stick around, while plain old FeatureStructures get can get
garbage collected after each annotator has run. So JCas objects behave
like the rest of the CAS in that respect, and unlike FeatureStructure
objects. Not beating on the JCas, just trying to explain sources of
memory consumption in the final analysis, after processing, so to speak.
--Thilo
RSS Feed