|
| 1 | +# Blob benchmark test |
| 2 | + |
| 3 | +In the blob benchmark test, we will focus on the performance of the basic blob |
| 4 | +operations: |
| 5 | + |
| 6 | +- `PutBlob`: Put data into local vineyard. It contains two steps: first, create a blob in vineyard, then copy the data into the blob. |
| 7 | +- `GetBlob`: Get data from local vineyard. |
| 8 | +- `PutBlobs`: Put multiple blobs into local vineyard. |
| 9 | +- `GetBlobs`: Get multiple blobs from local vineyard. |
| 10 | +- `PutRemoteBlob`: Put data into remote vineyard. Unlike `PutBlob`, the data is prepared beforehand and then copied into a Vineyard blob. Therefore, this operation avoids manual memory copying. |
| 11 | +- `GetRemoteBlob`: Get data from remote vineyard. |
| 12 | +- `PutRemoteBlobs`: Put multiple blobs into remote vineyard. |
| 13 | +- `GetRemoteBlobs`: Get multiple blobs from remote vineyard. |
| 14 | + |
| 15 | +Also, the performance is measured in terms of **throughput** and **latency**. |
| 16 | + |
| 17 | +## Build the benchmark |
| 18 | + |
| 19 | +Configure with the following arguments when building vineyard: |
| 20 | + |
| 21 | +```bash |
| 22 | +cmake .. -DBUILD_VINEYARD_BENCHMARKS=ON |
| 23 | +``` |
| 24 | + |
| 25 | +Then make the following targets: |
| 26 | + |
| 27 | +```bash |
| 28 | +make vineyard_benchmarks -j |
| 29 | +``` |
| 30 | + |
| 31 | +The artifacts will be placed under the `${CMAKE_BINARY_DIR}/bin/` directory: |
| 32 | + |
| 33 | +```bash |
| 34 | +./bin/blob_benchmark |
| 35 | +``` |
| 36 | + |
| 37 | +## Run the benchmark with customized parameters |
| 38 | + |
| 39 | +**Important** Before running the benchmark, you need to start the vineyard server first. You could refer to the [launching vineyard server guide](https://v6d.io/notes/getting-started.html#launching-vineyard-server) for more information. |
| 40 | + |
| 41 | +After that, you could get the help information by running the following command: |
| 42 | + |
| 43 | +```bash |
| 44 | +./bin/blob_benchmark --help |
| 45 | +Usage: ./bin/blob_benchmark [OPTIONS] |
| 46 | +Options: |
| 47 | + -h, --help Show this help message and exit |
| 48 | + -i, --ipc_socket=IPC_SOCKET Specify the IPC socket path (required) |
| 49 | + -r, --rpc_endpoint=RPC_ENDPOINT Specify the RPC endpoint (required) |
| 50 | + -d, --rdma_endpoint=RDMA_ENDPOINT Specify the RDMA endpoint (required) |
| 51 | + -c, --clients_num=NUM Number of clients (required) |
| 52 | + -s, --data_size=SIZE Data size (e.g., 1KB, 1MB) (required) |
| 53 | + -n, --requests_num=NUM Number of requests (required) |
| 54 | + -t, --num_threads=NUM Number of threads (required) |
| 55 | + -o, --operation=TYPE Operation type (put_blob, get_blob, put_blobs, get_blobs, put_remote_blob, get_remote_blob, put_remote_blobs, get_remote_blobs) (required) |
| 56 | +``` |
| 57 | + |
| 58 | +For example, you could run the following command to test the performance of `PutBlob`: |
| 59 | + |
| 60 | +```bash |
| 61 | +./bin/blob_benchmark -i /tmp/vineyard.sock -r "127.0.0.1:9600" -d "" -c 50 -s 8MB -n 1000 -t 10 -o "put_blob" |
| 62 | +``` |
0 commit comments