Two-tier-memory-project / tiered-buffer-pool

5 stars 1 forks source link

How to reproduce `test.db.load` for `cargo bench` testing #2

Open NewtonVan opened 4 weeks ago

NewtonVan commented 4 weeks ago

Hi @XiangpengHao ,

I encountered an issue while running cargo bench --bench in the project. The process panicked with the following error message:

thread 'main' panicked at /home/hyc/ustc-design/tiered-buffer-pool/btree/src/buffer_pool/vfs/direct_file.rs:95:13:
Failed to open file /mnt/ramdisk/test.db.load: Permission denied (os error 13)

It seems that the benchmarking process is trying to access test.db.load located in /mnt/ramdisk/. However, this file is not present, and I couldn't find details on how to generate or configure it for the test to run correctly.

Could you please provide guidance on how to create or reproduce test.db.load? Any additional setup instructions or configuration tips to ensure the benchmark runs smoothly would be greatly appreciated.

Thanks in advance for your help!

XiangpengHao commented 2 weeks ago

Hi @NewtonVan sorry for the late reply! You'll need to create a /ramdisk folder on /mnt/ and create a ramdisk that mount to that folder.

NewtonVan commented 2 weeks ago

Hi @XiangpengHao

New Issue Summary

I'm experiencing issues when running the benchmark with the following command:

cargo bench --bench tatp

The benchmark runs for a short period (about 24ms) before it panics with multiple errors. Here's the relevant output:

============================================================
Loading data...
finished in 24.03ms
============================================================
Running benchmark for 20 seconds with 4 threads: tatpconfig-basic-10000-128
thread '<unnamed>' panicked at src/bench/tatp.rs:92:13:
Index out of range for bit. Valid range is 1 to 10.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at <path>/tiered-buffer-pool/src/one_tree.rs:246:13:
index out of bounds: the len is 0 but the index is 0
...
Benchmark thread ThreadId(4) panicked, terminating all other threads...
Benchmark thread ThreadId(3) panicked, terminating all other threads...
Benchmark thread ThreadId(5) error: bench failed, to rerun pass `--bench tatp`

Additionally, I've followed the instructions to mount the ramdisk, but noticed that the test.db.load file is empty. This seems to be causing the panic, as the benchmark is likely trying to access data that does not exist.

Questions

Thanks in advance for any advice or suggestions you can provide!