简体   繁体   中英

Pellet Reasoner with Jena + PermGen spaces

I am running Pellet with Jena as the following:

public void storeInferredModel(Data data) {
    System.out.println("creating inferred dataset ");
    Dataset dataset = TDBFactory.createDataset(data.getInferredResultsPath());
    System.out.println("creating OntModel ");
    OntModel Infmodel = ModelFactory.createOntologyModel(
                          PelletReasonerFactory.THE_SPEC, 
                          dataset.getNamedModel(this.URL));
    System.out.println("adding schema (OWL) to OntModel");
    Infmodel.add(this.owl);
    System.out.println("adding data (RDF) to OntModel ");
    Infmodel.add(data.tdb);
    System.out.println("creating ModelExtractor ");
    ModelExtractor ext = new ModelExtractor(Infmodel);
    System.out.println("replacing OntModel by the Extracted Model");
    dataset.replaceNamedModel(this.URL, ext.extractModel());
    System.out.println("saving inferred model");
    Infmodel.close();
    System.out.println("closing inferred dataset");
    dataset.close();
}

I had the previous post under Pellet Reasoner with Jena . My TDB or the raw data is 2.7G. I have been running the reasoner against the TDB but I got the problem of “PermGen spaces java” though I give the program around 70G memory and the reasoner has taken only 30G and then crashed. In other words, it did not reached the Max of computer memory

I am running Linux and Java 64 bit and I have 83 G memory in the server. I have been stuck with that for a week.

Pellet performs its reasoning in-memory . Using it with TDB isn't going to work the way I suspect you think it should; TDB is just storage, Pellet will pull whatever it needs to perform reasoning into memory.

Further, telling us that your data is 2.7G isn't remotely useful. The expressivity of your TBox has as much, or more, effect on reasoning performance than the size (and size on disk is not useful, knowing the # of triples is a far better metric).

So knowing what is in your TBox is crucial for a better diagnosis. Given that we don't know anything about what you're feeding into Pellet, I can only guess that the TBox is very expressive, or very large, or both.

Pellet can work with large ontologies, it handles the NCI thesaurus just fine, but there are TBox's that it won't be able to handle. DL reasoning is hard, even harder at scale.

You may also want to review the DL handbook for a good review of some useful background material.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM