Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/modules/ROOT/pages/how-to/import-export.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ NOTE: This section is about one file of documents. A file of vertices and edges

`IMPORT DATABASE` runs the same importer from SQL. `IMPORT DATABASE <url>` reads one file, and `IMPORT DATABASE WITH name = value, ...` takes the settings by name. A file of documents loads into the type `Document` unless `documentType` says another. The statement returns one row with `result` and `operation` (`"import database"`).

With the native package, a large import runs faster when the heap starts larger: see xref:installation.adoc#native-import-heap[A larger initial heap for a large import].

The URL is a `file://` URL: `path.resolve().as_uri()` makes one. `as_uri()` writes a space as `%20`, and the engine opens the text after `file://` as a plain path without decoding it. For a folder with a space or another special character in its name, use `import_documents`, which builds the URL without the escaping.

[source,python]
Expand Down
12 changes: 12 additions & 0 deletions docs/modules/ROOT/pages/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ export ARCADEDB_NATIVE_ISOLATE_ARGS="-XX:MaxRAM=4g" # a memory s

When one of these three is present, the package adds no default. Do not use `-XX:MaxRAMPercentage`. The native image does not accept it, and the isolate then fails to start with `graal_create_isolate failed (rc=22)`. The same variable also takes the engine's `-D` settings: see xref:how-to/logs.adoc[Where the logs go]. For what a native image build supports, see {arcadedb-docs-url}/how-to/operations/native-image[Native image] in the main ArcadeDB docs.

[[native-import-heap]]
==== A larger initial heap for a large import

A large `IMPORT DATABASE` runs faster when the heap starts larger. Set the initial size before the Python process starts:

[source,bash]
----
export ARCADEDB_NATIVE_ISOLATE_ARGS="-Xms1g"
----

`-Xms` sets the initial size only, so the default maximum stays. In a test of `{native-pkg-name}` 26.11.1.post4, a graph of 400,000 vertices and 2,000,000 edges imported in 72 s instead of 94 s (0.77 times the default, 95% interval 0.76 to 0.77), and a graph of 100,000 vertices in 11.8 s instead of 13.3 s. The cost is memory: the peak of the importing process rose from 824 MiB to 1,172 MiB for the larger graph. The test ran on two cores of one laptop (https://github.com/ArcadeData/arcadedb-python/issues/369[#369]), so measure on your own data.

[[native-limits]]
=== Limits of the native build

Expand Down