From d8a4517b527be481bf51ea138c09732589b632c3 Mon Sep 17 00:00:00 2001 From: qishipengqsp Date: Mon, 23 Dec 2024 14:09:07 +0800 Subject: [PATCH 1/3] add dataset links --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index a08c767..78e55bd 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,23 @@ This repo has multiple modules for reference. Please refer to the README in each # Reference +## FinBench Datasets + +- [SF 0.1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz.md5sum) +- [SF 1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz.md5sum) +- [SF 3](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz.md5sum) +- [SF 10](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz.md5sum) +- [SF 30](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz.md5sum) +- [SF 100](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz.md5sum) + +## Related repositories of FinBench + - FinBench Specification: https://github.com/ldbc/ldbc_finbench_docs - FinBench DataGen: https://github.com/ldbc/ldbc_finbench_datagen - FinBench Driver: https://github.com/ldbc/ldbc_finbench_driver From a60b4dece5e5d8b84b588a2d994641e6ca108a61 Mon Sep 17 00:00:00 2001 From: qishipengqsp Date: Tue, 24 Dec 2024 18:09:26 +0800 Subject: [PATCH 2/3] simplify temporal experiment --- misc/experiments.md | 164 ++++++++++++++++++++------------------------ 1 file changed, 73 insertions(+), 91 deletions(-) diff --git a/misc/experiments.md b/misc/experiments.md index e0bcb59..a11f150 100644 --- a/misc/experiments.md +++ b/misc/experiments.md @@ -1,54 +1,48 @@ # README -This README elaborates how to reproduce the experiments for choke-points analysis. +This README elaborates how to run the experiments for choke-points analysis. -Note: These two experiments are conducted in docker. +## Experiments Environment -Docker image: tugraph/tugraph-compile-centos8:1.3.1 +These two experiments are conducted in docker. +- Docker image: `tugraph/tugraph-compile-centos8:1.3.1` +- Hardware: Alibaba Cloud `ecs.r6.8xlarge`, 32xIntel Xeon Platinum 8269CY vCPUs, 256GiB RAM -Hardware: Alibaba Cloud ecs.r6.8xlarge 32xIntel Xeon Platinum 8269CY vCPUs, 256GiB RAM +## FinBench Datasets -# Temporal Locality in Storage +- [SF 0.1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz.md5sum) +- [SF 1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz.md5sum) +- [SF 3](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz.md5sum) +- [SF 10](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz.md5sum) +- [SF 30](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz.md5sum) +- [SF 100](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz) with [md5 + checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz.md5sum) -The temporal loacality experiment is executed on TuGraph-DB with FinBench SF100 dataset. +## Temporal Locality in Storage -## Resources - -- Package: https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/datasets/finbench/v0.2.0/experiments/temporal_locality.zip - -- Datasets: https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz - -## Experiment Steps - -Execute following steps under current doc's directory, `ldbc_finbench_transaction_impls/misc`. +The temporal locality experiment is executed on TuGraph-DB with FinBench SF100 dataset. The following steps show how to reproduce the temporal locality experiment. Execute following steps under current doc's directory `ldbc_finbench_transaction_impls/misc`. ### Download Experiment Resources -#### Download Experiment Package -Download temporal locality experiment package into current directory. +Download temporal locality experiment package into current directory and download the FinBench sf100 dataset into experiment package directory. ```shell $ wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/datasets/finbench/v0.2.0/experiments/temporal_locality.zip $ unzip temporal_locality.zip -``` - -#### Download FinBench SF100 Dataset -Download the FinBench sf100 dataset into experiment package directory - -```shell $ cd ./temporal_locality $ wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz $ tar -xf ./sf100.tar.xz $ cd .. ``` -### Run Experiment - -The following steps show how to reproduce the temporal locality experiment. +### Update Source Code in Query Implementation -#### Update Source Code and Compile Benchmark - -The temporal locality experiment uses procedure instead of cypher to execute ComplexRead1, this requires a modification in the source code of tugraph's implementation. Please update the ComplexRead1Handler in `ldbc_finbench_transaction_impls/tugraph/src/main/java/org/ldbcouncil/finbench/impls/tugraph/TuGraphTransactionDb.java`(start from line: 100) with the following code. +The experiment uses procedure to execute `ComplexRead1` instead of Cypher, which requires a modification in the `ComplexRead1Handler` in `ldbc_finbench_transaction_impls/tugraph/src/main/java/org/ldbcouncil/finbench/impls/tugraph/TuGraphTransactionDb.java:100` with the following code. ```java public static class ComplexRead1Handler implements OperationHandler { @@ -90,7 +84,9 @@ public static class ComplexRead1Handler implements OperationHandler temporal_locality.log +$ cd ../misc ``` -#### Start TuGraph-DB +The execution and iteration time in `ComplexRead1` is recorded in `temporal_locality.log`. +Collect and analyze the elapsed time with `./temporal_locality/log_data_collector.py` + +```shell +$ cd ./temporal_locality +$ python log_data_collector.py ../../tugraph/temporal_locality.log +$ cd .. +``` -Start tugraph-db server. +Stop tugraph-db server. ```shell $ docker exec -it finbench_temporal_loaclity /bin/bash $ cd /root/temporal_locality/ -$ lgraph_server -c /root/temporal_locality/lgraph_sf100.json -d start +$ lgraph_server -d stop $ exit ``` -#### Load Procedure +### Run Optimized Version -Load ComplexRead1's procedure for temporal locality experiment. First copy `load_procedure_temporal.sh` to `ldbc_finbench_transaction_impls/tugraph/scripts` +Import SF100 dataset with temporal sorting feature enabled. Then start TuGraph-DB server. ```shell -$ cp ./temporal_locality/load_procedure_temporal.sh ../tugraph/scripts -$ chmod u+x ../tugraph/scripts/load_procedure_temporal.sh -``` - -##### Load Baseline Procedure - -```shell -$ cp ./temporal_locality/baseline/tcr1.cpp ../tugraph/procedures/cpp -$ ../tugraph/scripts/load_procedure_temporal.sh +$ docker exec -it finbench_temporal_loaclity /bin/bash +$ cd /root/temporal_locality/sf100/snapshot +$ lgraph_import -c /root/temporal_locality/optimized/import.conf --overwrite 1 --dir /root/lgraph_db_sf100 --delimiter "|" --v3 0 +$ cd /root/temporal_locality/ +$ lgraph_server -c /root/temporal_locality/lgraph_sf100.json -d start +$ exit # exit from the container ``` -##### Load Optimized Procedure +Load `ComplexRead1` procedure (optimized version) for optimized experiment. Then link sf100 dataset to `./data` directory, then run temporal locality benchmark. ```shell +$ cp ./temporal_locality/load_procedure_temporal.sh ../tugraph/scripts +$ chmod u+x ../tugraph/scripts/load_procedure_temporal.sh $ cp ./temporal_locality/optimized/tcr1.cpp ../tugraph/procedures/cpp $ ../tugraph/scripts/load_procedure_temporal.sh -``` - -#### Run Benchmark - -Go to `ldbc_finbench_transaction_impls/tugraph`, link sf100 dataset to `./data` directory, then run temporal locality benchmark - -```shell $ cd ../tugraph/ $ cd ./data $ ln -s ../../misc/temporal_locality/sf100 ./sf100 @@ -217,9 +202,8 @@ $ bash run.sh ../misc/temporal_locality/benchmark.properties > temporal_locality $ cd ../misc ``` -#### Collect Log Data - -The execution time and iteration time in ComplexRead1 is recorded in `temporal_locality.log`, collect and analyze the information with `./temporal_locality/log_data_collector.py` +The execution and iteration time in `ComplexRead1` is recorded in `temporal_locality.log`. +Collect and analyze the information with `./temporal_locality/log_data_collector.py` ```shell $ cd ./temporal_locality @@ -227,8 +211,6 @@ $ python log_data_collector.py ../../tugraph/temporal_locality.log $ cd .. ``` -#### Stop TuGraph-DB - Stop tugraph-db server. ```shell From b3c155e70a6f12b0453fe63cf16f825dcca21e8c Mon Sep 17 00:00:00 2001 From: qishipengqsp Date: Tue, 24 Dec 2024 22:22:32 +0800 Subject: [PATCH 3/3] simplify experiment 2 --- README.md | 18 ++--- misc/experiments.md | 174 ++++++++++++-------------------------------- 2 files changed, 53 insertions(+), 139 deletions(-) diff --git a/README.md b/README.md index 78e55bd..9abdae1 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,12 @@ This repo has multiple modules for reference. Please refer to the README in each ## FinBench Datasets -- [SF 0.1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz.md5sum) -- [SF 1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz.md5sum) -- [SF 3](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz.md5sum) -- [SF 10](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz.md5sum) -- [SF 30](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz.md5sum) -- [SF 100](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz.md5sum) +- [SF 0.1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz.md5sum) +- [SF 1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz.md5sum) +- [SF 3](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz.md5sum) +- [SF 10](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz.md5sum) +- [SF 30](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz.md5sum) +- [SF 100](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz.md5sum) ## Related repositories of FinBench diff --git a/misc/experiments.md b/misc/experiments.md index a11f150..bb964b7 100644 --- a/misc/experiments.md +++ b/misc/experiments.md @@ -1,33 +1,26 @@ # README -This README elaborates how to run the experiments for choke-points analysis. +This document elaborates how to run the experiments for choke-points analysis. -## Experiments Environment +## Environment and Datasets These two experiments are conducted in docker. - Docker image: `tugraph/tugraph-compile-centos8:1.3.1` - Hardware: Alibaba Cloud `ecs.r6.8xlarge`, 32xIntel Xeon Platinum 8269CY vCPUs, 256GiB RAM -## FinBench Datasets +FinBench Datasets: +- [SF 0.1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz.md5sum) +- [SF 1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz.md5sum) +- [SF 3](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz.md5sum) +- [SF 10](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz.md5sum) +- [SF 30](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz.md5sum) +- [SF 100](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz) with [md5 checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz.md5sum) -- [SF 0.1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf0.1/sf0.1.tar.xz.md5sum) -- [SF 1](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf1/sf1.tar.xz.md5sum) -- [SF 3](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf3/sf3.tar.xz.md5sum) -- [SF 10](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf10/sf10.tar.xz.md5sum) -- [SF 30](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf30/sf30.tar.xz.md5sum) -- [SF 100](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz) with [md5 - checksum](oss://tugraph-web/tugraph/datasets/finbench/v0.2.0/sf100/sf100.tar.xz.md5sum) - -## Temporal Locality in Storage +## Experiment 1: Temporal Locality in Storage The temporal locality experiment is executed on TuGraph-DB with FinBench SF100 dataset. The following steps show how to reproduce the temporal locality experiment. Execute following steps under current doc's directory `ldbc_finbench_transaction_impls/misc`. -### Download Experiment Resources +### 1. Download Experiment Resources Download temporal locality experiment package into current directory and download the FinBench sf100 dataset into experiment package directory. @@ -40,7 +33,7 @@ $ tar -xf ./sf100.tar.xz $ cd .. ``` -### Update Source Code in Query Implementation +### 2. Update Source Code in Query Implementation The experiment uses procedure to execute `ComplexRead1` instead of Cypher, which requires a modification in the `ComplexRead1Handler` in `ldbc_finbench_transaction_impls/tugraph/src/main/java/org/ldbcouncil/finbench/impls/tugraph/TuGraphTransactionDb.java:100` with the following code. @@ -80,13 +73,12 @@ public static class ComplexRead1Handler implements OperationHandler