Performance and Scaling¶
Guidance for sizing OntoLogos workloads. OntoLogos v0.4 uses batch fixed-point engines (not incremental). Benchmark numbers are indicative — run cargo bench on your hardware for production decisions.
Default limits¶
JSON deserialization¶
| Limit | Default | Configure via |
|---|---|---|
max_json_bytes |
16 MiB | Limits::max_json_bytes |
max_entities |
1,000,000 | Limits::max_entities |
max_axioms |
10,000,000 | Limits::max_axioms |
max_iri_len |
8,192 | Limits::max_iri_len |
See Security and JSON snapshot v2.
OWL file parsing¶
| Limit | Default | Configure via |
|---|---|---|
max_file_bytes |
64 MiB | ParseLimits::max_file_bytes |
max_axioms |
10,000,000 | ParseLimits::max_axioms |
See ParseLimits.
Engine behavior¶
RDFS (RdfsEngine)¶
- Complexity: Depends on taxonomy depth and property hierarchy size; runs until TBox rules saturate.
- Memory: In-place — inferred axioms are added to the same
Ontology. - Parallelism: Sequential only in v0.4.
OWL RL (RlEngine)¶
- Parallelism:
RlEngine::new(n)withnin1..=64. Parallelism affects ABox type-rule candidate expansion only; use1for fully sequential execution. - Pipeline: Always runs RDFS materialization first, then RL rules to fixed point.
For reproducible debugging, use RlEngine::new(1).
Reference corpora (v0.4)¶
| Corpus | Mapped axioms (approx.) | Profile | Notes |
|---|---|---|---|
| Family | ~57 | RL | Vendored; good RL smoke test |
| Pizza | ~658 | DL | Requires download.sh; stress parser + profile |
Run locally:
./benchmarks/scripts/download.sh
cargo test -p ontologos-parser --test manifest_integration
cargo test -p ontologos-rl --test corpus
Optional Criterion bench:
Results under target/criterion/.
External comparison (RL)¶
For OWL RL materialization baselines, compare against reasonable using the optional harness:
See Conformance coverage.
Scaling recommendations¶
| Workload | Recommendation |
|---|---|
| Small ontologies (< 10k mapped axioms) | Default limits; RlEngine::new(1) |
| Medium batch jobs | Tune ParseLimits; snapshot to JSON v2 after saturation |
| Untrusted uploads | load_ontology_in(base, path) + reduced limits — Production integration |
| Large DL corpora (GALEN, SNOMED) | Not production-ready in v0.4; optional #[ignore] stress tests only |
| Incremental updates | Not supported until v0.7 — reload and re-saturate |