Skip to content

Vertex-type loads from insert_dataframe and insert_arrow go through per-row dicts and JSON in both wheels #319

Open

Description

@tae898

This comes from a read-only audit of the tag 26.11.1 (commit 2f28a328be); everything below marked read was seen in the code with the file and line, nothing was run or timed, and no speed claim is made. Related closed work that this builds on and does not repeat: #229 (native point reads), #231 (native insert_many ragged lists), #235 (JVM insert_many cyclic GC), #243 (JVM GraphBatch property shapes), #174 (commit sizes).

Read: loading a vertex type through insert_dataframe or insert_arrow builds per-row dicts and JSON in both wheels. The Java column inserters already create vertices (BulkOps.java:140, DocumentBatcher.java:115), and the returned RIDs are discarded anyway (dataframe.py:483).

Proposal: route vertex types to insert_columns in insert_table. Two points to settle first: whether the index and bucket results are the same as through graph_batch (I did not check), and the rule that column inserts refuse to run inside a caller's transaction.

Measure first: a 1M-row vertex load through insert_dataframe, rows per second and CPU per row, warmed, before and after. Done when the vertex-type load is columnar or the reason it cannot be is written here.

Activity

  1. added
    performance
    python
    on Nov 9, 2026
  2. added this to the 26.12.1 milestone on Nov 9, 2026
  3. self-assigned this
    on Nov 9, 2026
  4. tae898 commented on Nov 12, 2026

    @tae898
    CollaboratorAuthor

    This is the A/B I ran on 2026-11-10 for this issue, and I read it as confounded, not as a result. It ran on my laptop (Intel Core Ultra X9 388H, Linux 7.0.0, Python 3.12, two cores). A is the released 26.11.1 wheel of each family and B is the candidate wheel of each (CI builds of the release/26.11.1 line before 26.11.1.post1, sha256 starting 144091c9 for native and 7cc57106 for JVM), which have PR #335 in them. B is not the published 26.11.1.post2 wheel: PR #335 is on main and in the 26.11.1.post2 tag, and I did not re-run this on the published files.

    Each cell loads a vertex type through insert_arrow (e2: 2 calls of 50,000 rows with a 64-dimension vector; l3d: 10 calls of 10,000 rows with a 96-dimension vector) or insert_dataframe (g1: 20 calls of 5,000 rows, 4 columns), 100,000 rows per cell, 14 clean pairs. Below 1.00 means B is faster.

    wheel and call A B B/A [95% CI] verdict
    native, insert_arrow, e2 3.865 s 0.347 s 0.090 [0.087, 0.090] DURABILITY-CONFOUNDED
    native, insert_arrow, l3d 5.550 s 0.403 s 0.073 [0.071, 0.074] DURABILITY-CONFOUNDED
    native, insert_dataframe, g1 0.796 s 0.590 s 0.741 [0.739, 0.744] DURABILITY-CONFOUNDED
    JVM, insert_arrow, e2 1.138 s 1.456 s 1.309 [1.215, 1.337] DURABILITY-CONFOUNDED
    JVM, insert_arrow, l3d 1.246 s 1.744 s 1.405 [1.362, 1.438] DURABILITY-CONFOUNDED
    JVM, insert_dataframe, g1 1.053 s 0.765 s 0.719 [0.630, 0.794] DURABILITY-CONFOUNDED

    The two builds do not run the same durability, which is why no row is a verdict. A goes through GraphBatch with its default of the write-ahead log off, and commits per 1,000 rows on native and per 100,000 on JVM; B goes through the columnar insert with the database's own log settings (log on) and commits per 10,000 rows, as PR #335 says. The harness recorded that route for every cell, so the rule I set before the run marks all six as DURABILITY-CONFOUNDED and never as a win or a regression.

    On the JVM wheel the log has since been matched for the same shapes, in the A/B I posted on #348 (#348 (comment)): the log on in both arms or off in both, 12 clean pairs, the released wheel against the #348 fix that 26.11.1.post2 carries. The vertex loads with a float32 vector column take 0.234 and 0.258 of the time (e2, log off and on) and 0.157 and 0.180 (l3d), and insert_dataframe of the plain 4-column rows (g1, information only) takes 0.686 and 0.681. The memory on the vector shape stays higher and is open on #348.

    Not measured: the native wheel with the log matched in both arms (the harness could not read the native database's log flag, so the 0.090 and 0.073 above are not a result either), and the 1,000,000-row insert_dataframe load this issue asks for, because every cell here holds 100,000 rows. I am leaving the issue open for those two runs.

  5. tae898 commented on Nov 14, 2026

    @tae898
    CollaboratorAuthor

    Status. #319's change is #335: insert_dataframe and insert_arrow load a vertex type through the columnar insert on both wheels. It is in 26.11.1.post1 and 26.11.1.post2 (merged 2026-11-10), and post2 also carries the JVM vector fix of #348. The two points this issue asked me to settle are settled in #335: the vertex route was read against GraphBatch.createVertices, and tests/test_vertex_load_columnar.py compares the loaded vertices with that route (every stored property, per-bucket record counts and index lookups). A vertex load still refuses to run inside a transaction the caller opened. One behaviour change is stated in #335: the write-ahead log is now on for a vertex load, as the database is configured.

    Measured: on the JVM wheel with the write-ahead log matched in both arms (the fix of #348 against 26.11.1, 12 clean pairs, B/A of time), insert_arrow e2 is 0.234 [0.213, 0.254] with the log off and 0.258 [0.230, 0.333] on, and l3d is 0.157 [0.149, 0.174] and 0.180 [0.175, 0.188]. The post1 candidate cells are DURABILITY-CONFOUNDED and carry no verdict.

    Not measured: the native wheel with the log matched (my harness cannot read the native database's log flag), and the 1,000,000-row insert_dataframe vertex load that this issue asks for. Memory on the JVM vector shape is still 1.3 to 1.4 times the old route and is open on #348. The issue stays open for those two runs.

  6. modified the milestones: 26.12.1, 27.1.1 on Nov 21, 2026
  7. tae898 commented on Nov 27, 2026

    @tae898
    CollaboratorAuthor

    I am bringing the two runs that are still open here (the native wheel with the write-ahead log matched, and the 1,000,000-row vertex load) forward from January. On 2026-11-27 I decided to run them now, on my laptop, planned for the night of 27 to 28 November (KST). I will post their rules here before the first run.

  8. tae898 commented on Nov 27, 2026

    @tae898
    CollaboratorAuthor

    I am writing the rules of these measurements down before their first run.

    Questions. (1) With the write-ahead log on in both routes, how does a vertex load of the native wheel compare before and after #335? (2) What does a 1,000,000-row insert_dataframe vertex load take before and after, on both wheels? These are the two runs that are still open on this issue.

    Arm native wheel JVM wheel route and write-ahead log
    A arcadedb 26.11.1 (PyPI) arcadedb-jvm 26.11.1 (PyPI) released route, graph_batch, with use_wal=True added to every call
    B CI build of main at f257597 arcadedb-jvm 26.11.1.post4 (PyPI) columnar route, as shipped (log on, the database default)
    Z A again (A/A control) A again as A

    Engine 26.11.1 in every arm. For the JVM B arm I use the released post4 wheel, because the CI builds of main carry a newer engine.

    figure call timed rows warm-up rows (untimed, second type)
    g1, native insert_dataframe: id LONG with a unique index, name, age, city 20 calls of 5,000 4 calls of 5,000
    e2, native insert_arrow: two integers and a 64-dimension float vector 2 calls of 50,000 50,000
    l3d, native insert_arrow: one integer and a 96-dimension float vector 10 calls of 10,000 2 calls of 10,000
    1M, native insert_dataframe, the g1 columns 1 call of 1,000,000 100,000
    1M, JVM the same 1 call of 1,000,000 100,000

    Verdict. For every figure, wall time and process CPU time are each read on their own as the median of the per-round ratios B/A with a 95% bootstrap interval (10,000 resamples, seed 1). I also report rows per second and CPU per row, and a Mann-Whitney U p.

    verdict condition
    FASTER upper end below 0.90
    NO CHANGE the interval lies inside [0.97, 1.03]
    SLOWER lower end above 1.03
    GRAY anything else

    Peak RSS and RssAnon are information only.

    Pins, validity, throttle rule, repetitions, and limits

    Pins.

    What Pin
    A native sha256 3baccb356e5b48425c7d1c7d6f916b3a646a8429cf82ae595bcecdb9e30c8c54
    B native linux x86_64 wheel of CI run 45905152816, sha256 dab39a260d90646a6e58e831898a3f36e8d074d2927e2fabad68c03ee779c4c1
    A JVM sha256 fb88664af2e9a52f0a8099e7b0e3d2bceb03437c1658f4c7fc825777b0db8934
    B JVM sha256 f36c1af14778ceff8554134aec4329446b4cd925d59014292211ad4705e7dee5
    Python 3.12, numpy 2.5.4, pyarrow 26.0.0, pandas 3.1.0, JPype1 1.7.1
    heap native: -Xmx at half of the physical memory in every arm. JVM: the package default
    log setting, JVM -Darcadedb.txWAL=true in every arm
    host my laptop (Core Ultra X9 388H, Linux), two pinned E cores, turbo on, powersave governor, editor, browser, and agent sessions held on other cores. The figures are relative only
    kit the checksum file of the scripts has sha256 4ea8a39ee0ca6ec6f5ca33eb938dc9cc1e9ba94347f24b4cbc7efceaca34ccdf

    Validity, checked before any verdict. In every process an untimed load of 500 rows takes the same call and shows (a) the route: A and Z call graph_batch with use_wal=True and never the columnar entry, B calls the columnar entry and never graph_batch; and (b) the log: bytes are appended to the database's *.wal files in every arm, and in A and Z the same probe with use_wal=False appends at most a tenth as many. A unit is INVALID when one of these fails, the engine differs between cells, the stored data differ from the generator (row count, sums, counts per value, and single records read back), or another timed job overlapped. A figure is INVALID when its A/A interval neither contains 1.00 nor lies inside [0.97, 1.03]. A figure is WEAK with fewer than 10 clean pairs for B/A or Z/A, or with an interval wider than 0.10 (above a median of 1.00: wider than a tenth of the median). INVALID and WEAK report no result.

    Throttle and interference rule. A run starts when the package is at most 70 C (after the first run of a round also at most 2 C above that run's start), after at most 180 s of waiting. A pair is dropped when the two runs' throttled share of the timed window (core throttle time of the two cores) differs by more than 1 percentage point, when their start temperatures differ by more than 5 C, or when my interference sampler marked either run (more than half a core of other work on a group of cores, other benchmark work, a camera, or a suspend).

    Repetitions and stopping. Three units run one after the other: the three native 100,000-row loads (one process per arm), the native 1M load, and the JVM 1M load. The arms run back to back in each round, the order rotated and reversed from round to round. Rounds 0 to 12 (round 0 is dropped), then 2 more while a unit is WEAK, at most 19 rounds. No round starts that is not expected to end by 06:50 KST, and the verdict is then read from the finished rounds under the same rules. No round is added because a result looks close.

    Rehearsal. Every unit runs 2 rounds at tiny sizes first. It checks the setup and is never read as a result. A unit whose rehearsal fails a check is not run.

    Reruns and changes. A GRAY is final. After INVALID or WEAK, one unchanged rerun replaces the figures that reported nothing. A change of arms, sizes, thresholds, or pins after a timed run is a new study with a new comment first.

    Limits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

performancepython

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions