Follow these steps to install SDKMAN, Java 17, and Maven on your system.
-
Open a terminal and run the following command to install SDKMAN:
curl -s "https://get.sdkman.io" | bash
-
Follow the on-screen instructions. Restart your terminal or run:
source "$HOME/.sdkman/bin/sdkman-init.sh"
-
Install Java 17 and set it as default:
sdk install java 17.0.13-tem sdk default java 17.0.13-tem
-
Install Maven:
sdk install maven
Build the project by running the following command:
mvn clean install -DskipTestsThe above compiles all the required dependencies for Tuskflow. See the tests for examples of partitioning, reservations using the deterministic protocol, tx execution over the in-memory storage, and tracking metadata.
You can find the scripts for running the benchmarks and plotting the results of the paper in the scripts folder. Before running any benchmark, edit the example-neo4j.env file and set the USER_HOME, JAVA_HOME, and current project's home (NEO4J_HOME). You can also edit the maximum throughput ratio of tx/s for different workloads. For example, LDBC_80_RATIO=40 means that each client thread will submit 40 tx/s for the LDBC workload with a read ratio of 80%.
After setting the appropriate parameters, run
source scripts/example-neo4j.envYou can then run the benchmarks scripts as:
./scripts/comparison_with_locking/run-locking-vs-epochs.shDownload the datasets required for the experiments from the following sources:
Example datasets:
After downloading the datasets, update the path to the datasets folders by setting the DATASET_FOLDER variable.
To run the experiments, the following configuration parameters are required. Parameters should be provided as key-value pairs in the format --key value.
| Parameter | Description | Example |
|---|---|---|
--clients <number> |
Number of clients (max: 1,000,000). | --clients 100 |
--client-tx-per-sec <number> |
Transactions per second per client (max: 1,000,000). | --client-tx-per-sec 100 |
--read-ratio <number> |
Percentage of read operations (0-100). | --read-ratio 80 |
--dataset <name> |
Dataset to use (e.g., LDBC, WIKITALK). |
--dataset WIKITALK |
| Parameter | Description | Example |
|---|---|---|
--execute-long-running <true/false> |
Execute long-running transactions. | --execute-long-running true |
--async-clients <true/false> |
Use asynchronous clients. | --async-clients true |
--use-epochs <true/false> |
Use the epoch-based protocol. | --use-epochs true |
--use-reordering <true/false> |
Use the reordering optimization. | --use-reordering true |
--use-tagging <true/false> |
Use the tagging optimization. | --use-tagging true |
--use-partitions <true/false> |
Enable partitioning. | --use-partitions false |
--use-reservations <true/false> |
Use reservation tables (default: true). | --use-reservations true |
--use-zipf <true/false> |
Use Zipf distribution for workloads. | --use-zipf false |
--use-zipf-shuffled <true/false> |
Use shuffled Zipf distribution. | --use-zipf-shuffled true |
--use-traversals <true/false> |
Enable graph traversal operations. | --use-traversals false |
--use-mixed-workload <true/false> |
Use mixed workloads (multi-hop queries). | --use-mixed-workload false |
| Parameter | Description | Example |
|---|---|---|
--partitioner-type <type> |
Specify the partitioner type. | --partitioner-type serial |
--epoch-size <number> |
Size of each epoch (max: 1,000,000). | --epoch-size 50000 |
--long-running-budget <number> |
Budget for long-running tasks (max: 16,000,000). | --long-running-budget 2000000 |
--long-running-tasks <number> |
Number of parallel long-running tasks (1-256). | --long-running-tasks 16 |
--sf <number> |
Scale factor for dataset (max: 30). | --sf 10 |
--ldbc-query <number> |
Type of LDBC query (0-2). | --ldbc-query 1 |
--ops <number> |
Number of operations per task (max: 1,000). | --ops 10 |
--hops <number> |
Number of hops for traversal (max: 10). | --hops 1 |
--duration <number> |
Duration of the experiment in milliseconds. | --duration 60000 |
--lr-delay <number> |
Delay between long-running transactions (ms). | --lr-delay 30000 |
--latency-delay <number> |
Delay before measuring latency (ms). | --latency-delay 5000 |
--tracking-threshold <number> |
Threshold for tracking accesses (max: 100). | --tracking-threshold 40 |
--tracking-accesses-together <true\false> |
Track all accesses together. | --tracking-accesses-together true |
--repartition-delay <number> |
Delay before repartitioning (ms). | --repartition-delay 600000 |
Here’s an example of how to run the PrototypeBenchmark class:
java -Xms56g -Xmx56g \
-cp target/longrunning-5.16.0.jar org.neo4j.longrunning.benchmarks.PrototypeBenchmark \
--clients 100 \
--client-tx-per-sec 100 \
--read-ratio 80 \
--dataset WIKITALK \
--execute-long-running true \
--async-clients true \
--use-epochs true \
--use-partitions true \
--partitioner-type serial \
--epoch-size 50000 \
--long-running-budget 2000000 \
--lr-delay 30000 \
--tracking-threshold 40 \
--duration 100000 \
--long-running-tasks 16 \
--use-reservations true \
--use-zipf false \
--use-zipf-shuffled false \
--hops 1 \
--use-traversals trueSet --use-epochs false to run with locks.
If you encounter an exception related to jdk.javadoc.internal.tool, resolve it by adding the following VM option to your run configuration:
--add-exports jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED