Held memory is memory.current less the page cache, which the kernel hands to another tenant when the host needs it. The score charges memory.current, as spec section 8.5 says.
# TETRA v0, linux/amd64.
#
# TETRA publishes no image, so the adapter builds one on the engine's host:
# `adapters/tetra/build-image.sh path/to/tetra-linux-amd64` (Containerfile and
# entrypoint.sh beside this file). The image is local, so `image` pins the
# digest that build printed; a host with another build pins its own.
#
# THE LOAD RUNS AT THE CONTAINER'S FIRST START. TETRA has no LOAD CSV; its
# bulk loader is `tetra convert`, which writes the database file the server
# then opens. The entrypoint stages the package mounted at /dataset into the
# loader's input (dp-tetra-stage) and converts it before `tetra serve` opens
# Bolt, inside the SUT's envelope, so the adapter's start time carries the
# load and its import call only counts what the database holds.
name: tetra
system: TETRA
version: "v0"
image: localhost/dpbench-tetra@sha256:f2e7caf3623a883018810dd5fc42243221ea9bf20ab160308597b0c079849890
model: property-graph
protocols: [bolt]
query_language: cypher
# TETRA acknowledges a commit once it is on disk, by default, so commits
# are durable without settings (spec §9.2). Each statement reads a
# snapshot; every DataPower operation is one statement.
durability:
settings: {}
isolation: snapshot
# The adapter declares no secondary index, maintenance task or hand-sized
# cache. The canonical keys are uniqueness constraints on every id
# (spec §7.2), as in the Neo4j mapping.
declared_surface:
services: 1
runtime_dependencies: []
secondary_indexes: []
hand_sized_caches: []
non_default_settings: {}
maintenance_tasks: []
storage_areas: [data]
manual_steps: []
envelope:
size: S
memory_limit_gib: 8
plugin: tetra
container:
port: 7687
data_path: /data
dataset_path: /dataset
env:
TETRA_ENCRYPTION_KEY: dpbench-key
TETRA_API_KEY: dpbench-tetra
client:
user: dpbench
password: dpbench-tetra
database: neo4j
Executed DDL
CREATE CONSTRAINT place_id IF NOT EXISTS FOR (n:Place) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT person_id IF NOT EXISTS FOR (n:Person) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT organization_id IF NOT EXISTS FOR (n:Organization) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT account_id IF NOT EXISTS FOR (n:Account) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT device_id IF NOT EXISTS FOR (n:Device) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT tag_id IF NOT EXISTS FOR (n:Tag) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT post_id IF NOT EXISTS FOR (n:Post) REQUIRE n.id IS UNIQUE;
CREATE CONSTRAINT knows_id IF NOT EXISTS FOR ()-[r:KNOWS]-() REQUIRE r.id IS UNIQUE;
CREATE CONSTRAINT works_at_id IF NOT EXISTS FOR ()-[r:WORKS_AT]-() REQUIRE r.id IS UNIQUE;
CREATE CONSTRAINT uses_id IF NOT EXISTS FOR ()-[r:USES]-() REQUIRE r.id IS UNIQUE;
CREATE CONSTRAINT transfer_id IF NOT EXISTS FOR ()-[r:TRANSFER]-() REQUIRE r.id IS UNIQUE;
CREATE CONSTRAINT interested_in_id IF NOT EXISTS FOR ()-[r:INTERESTED_IN]-() REQUIRE r.id IS UNIQUE;
CREATE CONSTRAINT likes_id IF NOT EXISTS FOR ()-[r:LIKES]-() REQUIRE r.id IS UNIQUE;
MATCH (n) RETURN labels(n)[0], count(*);
MATCH ()-[r]->() RETURN type(r), count(*);
Settings that differ from a fresh container of the same image
None.
5. Queries
The adapter runs these statements, with parameters bound as $n.
S3
MATCH (p:Post)
WHERE p.language = $language AND p.created_at >= $from AND p.created_at < $to AND p.content CONTAINS $word
RETURN count(p)
J2
MATCH (:Person {id: $id})-[:KNOWS]->(:Person)<-[:OWNED_BY]-(:Account)-[t:TRANSFER]->(b:Account)
WHERE t.ts >= $from AND t.ts < $to
MATCH (b)-[:OWNED_BY]->(:Person)-[:LIVES_IN]->(:Place)-[:PART_OF]->(region:Place)
WITH region, count(t) AS n, sum(t.amount) AS total
RETURN region.name, n, total
J4
MATCH (p:Person {id: $id})-[:LIVES_IN]->(:Place)<-[:LIVES_IN]-(o:Person)
WHERE o <> p AND EXISTS { (o)-[:WORKS_AT]->() } AND EXISTS { (p)-[:INTERESTED_IN]->(:Tag)<-[:INTERESTED_IN]-(o) }
RETURN count(DISTINCT o)
J5
MATCH (:Account {id: $id})-[t1:TRANSFER]->()-[t2:TRANSFER]->()-[t3:TRANSFER]->()-[t4:TRANSFER]->()
WHERE t1.ts >= $from AND t1.ts < $to AND t2.ts > t1.ts AND t3.ts > t2.ts AND t4.ts > t3.ts
AND t4.ts < t1.ts + duration({days: 30})
RETURN count(*)
O2
MATCH (a:Account)
WHERE a.opened_at >= $from AND a.opened_at < $to AND a.balance >= $lo
RETURN a.id
J1
MATCH (p:Person {id: $id})-[:KNOWS*1..4]->(x:Person)
WHERE x <> p
RETURN count(DISTINCT x)
S2
MATCH (p:Person)
WHERE p.risk_score >= $risk AND p.birth_date >= date($from) AND p.birth_date < date($to)
RETURN p.id
S1
MATCH ()-[t:TRANSFER]->()
WHERE t.ts >= $from AND t.ts < $to AND t.channel = $channel AND t.amount >= $lo AND t.amount <= $hi
RETURN count(t), coalesce(sum(t.amount), 0)
O1
MATCH (p:Person {email: $email})
OPTIONAL MATCH (a:Account)-[:OWNED_BY]->(p)
RETURN p.id, p.first_name, p.last_name, a.id, a.balance, a.status
O3
MATCH (p:Person {last_name: $last})-[:LIVES_IN]->(:Place {id: $city})
OPTIONAL MATCH (a:Account)-[:OWNED_BY]->(p)
RETURN count(DISTINCT p), count(a), coalesce(sum(a.balance), 0)
J3
MATCH (p:Person {id: $id})-[:KNOWS]->(a:Person)-[:KNOWS]->(b:Person)-[:KNOWS]->(p)
WHERE a <> p AND b <> p AND a <> b
RETURN count(*)
S4
MATCH ()-[t:TRANSFER]->()
WHERE t.ts >= $from AND t.ts < $to
RETURN t.currency, t.channel, count(t), sum(t.amount)
R1
MATCH (p:Person {id: $id})
OPTIONAL MATCH (a:Account)-[:OWNED_BY]->(p)
RETURN p.id, p.first_name, p.last_name, a.id, a.balance, a.status
R2
MATCH (a:Account)
WHERE a.country = $country AND a.status = 'open' AND a.balance >= $lo AND a.balance <= $hi
RETURN a.id
R3
MATCH (:Person {id: $id})-[:KNOWS]->(f:Person)
OPTIONAL MATCH (a:Account)-[:OWNED_BY]->(f)
OPTIONAL MATCH (a)-[t:TRANSFER]->()
WHERE t.ts >= $from AND t.ts < $to
RETURN f.id, sum(t.amount)
R4
MATCH (s:Account {id: $id})-[ts:TRANSFER*1..3]->(x:Account)
WHERE all(t IN ts WHERE t.ts >= $from AND t.ts < $to) AND x <> s
RETURN DISTINCT x.id
R5
MATCH (a:Person {id: $src}), (b:Person {id: $dst})
MATCH p = shortestPath((a)-[:KNOWS*..6]->(b))
RETURN length(p)
R6
MATCH p = (a:Account {id: $id})-[ts:TRANSFER*3..5]->(a)
WHERE all(t IN ts WHERE t.ts >= $from AND t.ts < $to)
WITH a, nodes(p)[1..-1] AS mid
WHERE NOT a IN mid AND all(i IN range(0, size(mid) - 2) WHERE NOT mid[i] IN mid[i + 1..])
RETURN count(*)
R7
MATCH (o:Organization)<-[:HELD_AT]-(:Account)
WITH o, count(*) AS held ORDER BY held DESC, o.id ASC LIMIT 20
MATCH (o)<-[:HELD_AT]-(sa:Account)-[t:TRANSFER]->(da:Account)
WHERE t.ts >= $from AND t.ts < $to
RETURN substring(toString(t.ts), 0, 7), sa.country, da.country, sum(t.amount)
W1
CREATE (p:Person {id: $pid, first_name: $fn, last_name: $ln, birth_date: date('1990-01-01'), created_at: $ts, risk_score: 0.5})
WITH p MATCH (home:Place {id: 1}) CREATE (p)-[:LIVES_IN]->(home)
CREATE (:Account {id: $aid, opened_at: $ts, balance: 0, status: 'open', country: 'ZZ'})-[:OWNED_BY]->(p)
WITH p UNWIND $knows AS k
MATCH (d:Person {id: k.dst})
CREATE (p)-[:KNOWS {id: k.id, since: date($ts), strength: 0.5}]->(d)
W2
MATCH (s:Account {id: $src}) MATCH (d:Account {id: $dst})
CREATE (s)-[:TRANSFER {id: $id, ts: $ts, amount: $amount, currency: $currency, channel: $channel}]->(d)
W3
UNWIND $batch AS b
MATCH (s:Account {id: b.src}) MATCH (d:Account {id: b.dst})
CREATE (s)-[:TRANSFER {id: b.id, ts: b.ts, amount: b.amount, currency: b.currency, channel: b.channel}]->(d)
U1
MATCH (a:Account {id: $id}) SET a.balance = $balance, a.status = $status
U2
MATCH (p:Person {id: $id})
OPTIONAL MATCH (p)-[w:WORKS_AT]->()
DELETE w
WITH DISTINCT p
MATCH (o:Organization {id: $org})
CREATE (p)-[:WORKS_AT {id: $wid, from_date: date($ts), role: 'engineer'}]->(o)
D1
MATCH ()-[t:TRANSFER {id: $id}]->() DELETE t
D2
MATCH (p:Person {id: $id})
OPTIONAL MATCH (a:Account)-[:OWNED_BY]->(p)
OPTIONAL MATCH (post:Post)-[:HAS_AUTHOR]->(p)
WITH p, collect(DISTINCT a) + collect(DISTINCT post) AS owned
FOREACH (n IN owned | DETACH DELETE n)
DETACH DELETE p
6. Concurrency ladder, mixed
k
X ops/s
Q
X × Q
1
354.2
1.000
354.2
4 k*
581.6
0.646
375.8
16
558.4
0.366
204.5
64
552.0
0.177
97.5
7. Memory over the duty cycle
memory.current of the median repetition, sampled every 100 ms. Shaded bands are the busy windows; the rest is idle.
8. Validation
0 invalid operation instances.
Write validation read back 200 account, 400 batch, 200 person alive, 200 person deleted, 200 transfer alive, 200 transfer deleted, 200 works, with 0 kinds failing.
9. Deviations
dataset.scale: 3M is not a DP-Core scale factor (spec §6.6)
tiers: 15% off-index and 5% worst-case operations blended in; spec §9.3's mix is typical operations alone
profile: quick timings: ladders, duty cycle and warm-up are shorter than spec §8.5, §8.9 and §9.5 require
repetitions: 1; spec §9.5 publishes the median of 3
every container runs --privileged (DPBENCH_PRIVILEGED): the host's kernel has no BPF syscall, so the runtime cannot attach a cgroup v2 device filter; cpu, cpuset, memory and pids limits apply as before
warm-up before P5 runs at 16 clients: spec §9.5 says k*, which only P7 finds
10. Phase detail
Import (P2): 3,000,015 rows in 24.5 s: load 0.0 s, keys 0.0 s, indexes 0.0 s. Peak memory during load 3.19 GiB.
Repetitions (P7, P8)
n
T
k*
Q at k*
M GiB
After work GiB
1
375.8
4
0.646
1.33
0.23
Coefficient of variation of DataPower across repetitions: 0.0%.
Memory floor (P9)
Limit GiB
Q
Outcome
8
0.646
ran
4
0.463
ran
Cold (P3) and warm (P5) single-client latency, ms
Class
Operation
Cold p50
Cold p99
Warm p50
Warm p99
R1
point
0.73
12.55
0.34
2.63
R2
filter
2.64
4.96
2.88
6.18
R3
neighbourhood
0.58
17.17
0.52
0.69
R4
deep
1.35
1.43
1.23
1.60
R5
path
0.27
5.67
0.19
0.25
R6
pattern
2.31
13.52
3.12
3.94
R7
analytic
49.76
64.96
50.14
69.38
W1
insert
3.92
5.07
2.35
4.20
W2
insert edge
1.29
1.81
1.64
1.92
W3
batch
15.57
15.88
21.31
23.42
U1
modify
0.75
1.05
1.10
1.46
U2
rewire
0.88
9.99
2.81
3.86
D1
delete edge
0.90
1.28
2.52
3.17
D2
delete cascade
3.29
36.83
3.91
8.05
O1
person by email
0.59
15.91
0.44
0.84
O2
accounts by opening date
1.69
3.82
1.30
2.38
O3
people by surname and city
1.62
9.70
1.36
3.53
S1
amount band
5.18
5.64
10.92
11.50
S3
text search
4.03
5.06
3.90
4.47
J4
neighbours alike
1.04
10.51
1.02
3.54
R1w
point, worst case
0.80
0.91
0.86
1.84
R2w
filter, worst case
11.21
12.74
9.13
37.79
R3w
neighbourhood, worst case
3.43
5.95
2.39
4.92
R4w
deep, worst case
2.81
11.63
3.19
24.98
R5w
path, worst case
0.40
3.09
0.41
3.06
R6w
pattern, worst case
1.83
2.79
2.35
4.10
R7w
analytic, worst case
50.14
50.91
51.55
81.28
Ladder (P6): read
k
X ops/s
Errors
Driver CPU
1
392.4
0
4.6%
4
864.8
0
7.6%
16
813.6
0
7.8%
64
755.0
0
7.5%
Ladder (P6): insert
k
X ops/s
Errors
Driver CPU
1
257.0
0
2.3%
4
223.0
0
2.0%
16
172.2
0
1.6%
64
139.4
0
1.4%
Ladder (P6): modify-delete
k
X ops/s
Errors
Driver CPU
1
215.0
0
1.3%
4
273.2
0
1.6%
16
261.4
0
1.5%
64
275.4
0
1.7%
Ladder (P6): write
k
X ops/s
Errors
Driver CPU
1
139.4
0
1.2%
4
146.8
0
1.2%
16
138.8
0
1.2%
64
134.0
0
1.2%
11. Run timeline
The run from its first phase to its last, every second. The driver counts every operation, ramps and warm-ups included, and the probe samples the SUT's cgroup every 100 ms. Bands mark the phases; P3, the cold run, and P4, the warm-up, stand out in teal. After the duty cycle the run asks the kernel to reclaim everything the SUT holds, and the drop in memory shows what the system gives back.
ThroughputValid operations per second, ramps and warm-ups included.Latencyp99 of every operation in each second, all classes together, on a log scale.MemoryThe SUT's cgroup memory, stacked: what the processes hold, shared memory such as a buffer pool, and the page cache the kernel can reclaim. The envelope allows 8 GiB.
process (anon)shared memorypage cachekernel
CPUCores the SUT kept busy.DiskBytes the SUT read from and wrote to its block devices.
readwritten
Phase
Starts
Seconds
Operations
ops/s
CPU cores
Peak GiB
Page cache at end GiB
P0 environment check
0 s
0.8
0
0.0
0.00
0.00
0.00
P1 schema definition
1 s
106.3
0
0.0
1.83
3.19
0.15
P2 import
107 s
31.8
0
0.0
0.80
0.86
0.15
P3 cold single-client run
139 s
18.1
135
7.5
0.19
0.53
0.15
P4 warm-up
157 s
10.4
7,365
705.5
1.61
1.17
0.15
P5 warm single-client run
167 s
4.3
821
190.6
0.87
1.15
0.15
P6 read, write and modify ladders
172 s
114.7
36,735
320.2
1.37
2.16
0.17
P7 mixed ladder
286 s
288.8
64,694
224.0
0.95
2.12
0.00
P9 memory floor search
575 s
7.6
1,621
212.5
1.58
1.41
0.00
P10 validation reads
583 s
77.7
0
0.0
1.97
1.84
0.00
P11 final footprint and surface audit
661 s
107.6
0
0.0
0.01
1.81
0.00
P12 teardown
768 s
1.4
0
0.0
0.00
0.65
0.00
12. From the cold restart
P3 restarts the SUT with an empty page cache and runs every class from one client. P4 warms the system up under load, and P5 runs every class again. These charts start at the restart, so they show how long the system takes to reach its warm speed and what it holds while it gets there.
Every single-client operationEach dot is one operation, on a log scale. P3 runs every class in turn on an empty page cache; P5 runs them again after the warm-up.
P3 coldP5 warm
ThroughputValid operations per second, ramps and warm-ups included.Latencyp99 of every operation in each second, all classes together, on a log scale.MemoryThe SUT's cgroup memory, stacked: what the processes hold, shared memory such as a buffer pool, and the page cache the kernel can reclaim. The envelope allows 8 GiB.
process (anon)shared memorypage cachekernel
CPUCores the SUT kept busy.DiskBytes the SUT read from and wrote to its block devices.
readwritten
Cold and warm mediansEach class's p50 on an empty page cache (P3) and after the warm-up (P5), log scale. The longer the line, the more the class depends on a warm cache.