Skip to content

JVM wheel: Arrow vertex loads with a vector column use 1.3 to 1.4 times the memory of the 26.11.1 route (speed fixed in post2) #348

Open

Description

@tae898

While fixing the JVM wheel's Arrow vertex loads for 26.11.1.post2 (tracking in #347) I measured memory next to speed, and the memory did not improve with the speed.

Shape: insert_arrow of a vertex type with one 96-wide float32 vector column, 10 calls of 10,000 rows, JVM wheel, released 26.11.1 (A) against the post2 candidate (B), write-ahead log forced the same way on both arms, 20 clean pairs per cell, interval = 95 percent bootstrap of the median of per-round ratios (B/A above 1 is more memory for B).

WAL peak RSS B/A RssAnon B/A JVM heap used at the end, A / B (MiB)
on 1.273 [1.237, 1.341] 1.314 [1.282, 1.395] 164.2 / 308.0
off 1.387 [1.326, 1.460] 1.448 [1.377, 1.535] 161.7 / 299.9

Speed for the same cells, so the trade is visible: the WAL-off cell is a WIN at B/A 0.154 [0.150, 0.163] (time ratio, B takes that fraction of A). The other cells point the same way but were not decided by the pre-registered rule (a rerun under a written amendment is queued). This issue is about memory only: the speed change did not come with a memory change in the same direction.

Where it goes: the post2 change removed the per-row Python conversion of the vector column (one float32 matrix per batch crosses to Java instead of one boxed list per row), which an untimed profile put at about three quarters of the call. The rest of the excess is probably on the Java side (the per-row float[] copy in FloatVectors.Matrix.row, the document build, the transaction), but I have not profiled that yet.

I will look at the Java side next. If someone who knows the columnar insert path sees where the 96-float rows are held, I would take that pointer.

Activity

  1. added
    jvmThe arcadedb-jvm package (JPype build)
    performanceSpeed or memory of the bindings, with a measurement
    pythonPull requests that update python code
    vectorVector indexes and find_nearest
    on Nov 10, 2026
  2. added this to the 26.12.1 milestone on Nov 10, 2026
  3. tae898 commented on Nov 10, 2026

    @tae898
    CollaboratorAuthor

    The rerun of the A/B of the vector-conversion fix has finished (the released 26.11.1 JVM wheel against the fix, which 26.11.1.post2 carries). I wrote an amendment to the study rule after the first pass and disclosed it in the study README; this rerun is scored under it. Arrow vertex loads with a float32 vector column, the write-ahead log on and off the same way on both arms, 12 clean pairs per figure, B/A of the medians with the 95 percent interval (below 1.00 means the fix is faster):

    figure time B/A peak memory B/A
    j_e2_ar_off 0.234 [0.213, 0.254] 1.026 [0.964, 1.115]
    j_e2_ar_on 0.258 [0.230, 0.333] 1.125 [1.004, 1.197]
    j_l3d_ar_off 0.157 [0.149, 0.174] 1.420 [1.353, 1.485]
    j_l3d_ar_on 0.180 [0.175, 0.188] 1.323 [1.277, 1.447]
    j_sc_ar_off 0.341 [0.296, 0.356] 1.200 [1.131, 1.345]
    j_sc_ar_on 0.334 [0.302, 0.359] 1.005 [0.912, 1.223]

    The fix is faster in all six figures. Memory is not improved: on the vector shape (l3d) the fix stays 1.3 to 1.4 times above the released route, as in the first pass, and the other two shapes are mixed. This issue stays open for the memory side. I have not looked at the cause yet. If you want the memory to be the next fix, tell me here and I will profile the conversion.

  4. modified the milestones: 26.12.1, 27.1.1 on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

jvmThe arcadedb-jvm package (JPype build)performanceSpeed or memory of the bindings, with a measurementpythonPull requests that update python codevectorVector indexes and find_nearest

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions