├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── ae ├── README.md ├── collect │ ├── backends │ │ ├── kill_backend.sh │ │ ├── run_backend_wrapper.sh │ │ ├── run_backend_wrapper_pmem.sh │ │ ├── run_btree_backend.sh │ │ ├── run_btree_backend_local.sh │ │ ├── run_hashtable_backend.sh │ │ ├── run_rdma_backend.sh │ │ ├── run_smallbank_backend.sh │ │ └── run_tatp_backend.sh │ ├── common.sh │ ├── config │ │ ├── datastructure.btree.json │ │ ├── datastructure.btree.local.json │ │ ├── datastructure.hashtable.json │ │ ├── smart_config.dtx.json │ │ ├── smart_config.hashtable.json │ │ └── smart_config.shared_qp.json │ ├── fig10-dtx-scale-up.sh │ ├── fig11-dtx-scale-latency.sh │ ├── fig12abc-btree-scale-up.sh │ ├── fig12def-btree-scale-out.sh │ ├── fig13-thread-count-batch-size.sh │ ├── fig14-hashtable-conflict-bc.sh │ ├── fig14-hashtable-conflict.sh │ ├── fig3-scalability.sh │ ├── fig4-owr.sh │ ├── fig4b-owr-pcie-perf.sh │ ├── fig5-hashtable-motivation.sh │ ├── fig7-hashtable-scale-out.sh │ ├── fig8-hashtable-breakdown.sh │ ├── fig9-hashtable-latency.sh │ ├── killall.sh │ ├── runall.sh │ ├── table1.sh │ ├── test_app │ │ ├── btree-remote.sh │ │ ├── btree.sh │ │ ├── hashtable-prof.sh │ │ ├── hashtable-remote.sh │ │ ├── hashtable.sh │ │ ├── smallbank.sh │ │ └── tatp.sh │ └── test_rdma │ │ ├── multiplexed_qp_2.sh │ │ ├── multiplexed_qp_4.sh │ │ ├── per_thread_doorbell.sh │ │ ├── per_thread_qp.sh │ │ ├── shared_qp.sh │ │ └── with_work_req_throt.sh ├── figure-reference │ ├── fig10.pdf │ ├── fig11.pdf │ ├── fig12.pdf │ ├── fig13.pdf │ ├── fig14.pdf │ ├── fig3.pdf │ ├── fig4.pdf │ ├── fig5.pdf │ ├── fig7.pdf │ ├── fig8.pdf │ └── fig9.pdf ├── plot │ ├── README.md │ ├── common.py │ ├── fig10.py │ ├── fig11.py │ ├── fig12.py │ ├── fig13.py │ ├── fig14.py │ ├── fig3.py │ ├── fig4.py │ ├── fig5.py │ ├── fig7.py │ ├── fig8.py │ ├── fig9.py │ └── runall.sh └── raw-reference │ ├── fig10-smallbank.csv │ ├── fig10-tatp.csv │ ├── fig11-smallbank.csv │ ├── fig11-tatp.csv │ ├── fig12-ycsb-a.csv │ ├── fig12-ycsb-b.csv │ ├── fig12-ycsb-c.csv │ ├── fig12a-ycsb-a.csv │ ├── fig12a-ycsb-b.csv │ ├── fig12a-ycsb-c.csv │ ├── fig13a.csv │ ├── fig13b.csv │ ├── fig14.csv │ ├── fig14bc.csv │ ├── fig3a.csv │ ├── fig3b.csv │ ├── fig4-prof.csv │ ├── fig4a.csv │ ├── fig4b.csv │ ├── fig5a.csv │ ├── fig5b.csv │ ├── fig7-ycsb-a.csv │ ├── fig7-ycsb-b.csv │ ├── fig7-ycsb-c.csv │ ├── fig8-ycsb-a.csv │ ├── fig8-ycsb-b.csv │ ├── fig8-ycsb-c.csv │ ├── fig9.csv │ └── table1.csv ├── alloc_hugepage.sh ├── btree ├── CMakeLists.txt ├── backend.cpp ├── bench.cpp ├── btree.cpp └── btree.h ├── build.sh ├── config ├── backend.json ├── backend.pmem.json ├── datastructure.json ├── smart_config.json ├── test_rdma.json └── transaction.json ├── deps.sh ├── dtx ├── CMakeLists.txt ├── addr_cache.h ├── common.h ├── dtx.cpp ├── dtx.h ├── manager.h ├── memstore.h ├── smallbank │ ├── CMakeLists.txt │ ├── backend.cpp │ ├── bench.cpp │ └── smallbank.h └── tatp │ ├── CMakeLists.txt │ ├── backend.cpp │ ├── bench.cpp │ └── tatp.h ├── hashtable ├── CMakeLists.txt ├── backend.cpp ├── bench.cpp ├── hashtable.cpp └── hashtable.h ├── include ├── smart │ ├── backoff.h │ ├── benchmark.h │ ├── common.h │ ├── config.h │ ├── generic_cache.h │ ├── global_address.h │ ├── initiator.h │ ├── resource_manager.h │ ├── super_chunk.h │ ├── target.h │ ├── task.h │ ├── task_throttler.h │ └── thread.h └── util │ ├── crc.h │ ├── fcontext.h │ ├── generator.h │ ├── inlineskiplist.h │ ├── json_config.h │ ├── murmur.h │ ├── rapidjson │ ├── allocators.h │ ├── document.h │ ├── encodedstream.h │ ├── encodings.h │ ├── error │ │ ├── en.h │ │ └── error.h │ ├── filereadstream.h │ ├── filewritestream.h │ ├── internal │ │ ├── biginteger.h │ │ ├── diyfp.h │ │ ├── dtoa.h │ │ ├── ieee754.h │ │ ├── itoa.h │ │ ├── meta.h │ │ ├── pow10.h │ │ ├── stack.h │ │ ├── strfunc.h │ │ ├── strtod.h │ │ └── swap.h │ ├── memorybuffer.h │ ├── memorystream.h │ ├── msinttypes │ │ ├── inttypes.h │ │ └── stdint.h │ ├── pointer.h │ ├── prettywriter.h │ ├── rapidjson.h │ ├── reader.h │ ├── stringbuffer.h │ └── writer.h │ ├── ycsb.h │ └── zipf.h ├── killall.sh ├── patch ├── guide.md └── libmlx5.so ├── run.sh ├── smart ├── CMakeLists.txt ├── initiator.cpp ├── resource_manager.cpp ├── target.cpp ├── task.cpp └── thread.cpp ├── test ├── CMakeLists.txt ├── test_rdma.cpp └── test_rdma_dyn.cpp └── util ├── CMakeLists.txt ├── fcontext-arm64 ├── CMakeLists.txt ├── jump.S ├── make.S └── ontop.S ├── fcontext-x64 ├── CMakeLists.txt ├── jump.S ├── make.S └── ontop.S └── ycsb_gen.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | build 4 | script-old 5 | thirdparty 6 | cmake-build-debug 7 | __pycache__ 8 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | project(sds CXX ASM) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | set(CMAKE_CXX_FLAGS "-O3 -g") 6 | 7 | include_directories(include) 8 | 9 | add_subdirectory(util) 10 | add_subdirectory(smart) 11 | 12 | add_subdirectory(test) 13 | 14 | add_subdirectory(hashtable) 15 | add_subdirectory(btree) 16 | add_subdirectory(dtx) 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2022-2023 Feng Ren, Tsinghua University 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /ae/collect/backends/kill_backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clush -qS -w ${rdma_test_backend} killall -q test_rdma 3 | clush -qS -w ${hashtable_test_backends} killall -q hashtable_backend 4 | clush -qS -w ${btree_test_backends} killall -q btree_backend 5 | clush -qS -w ${dtx_test_backends} killall -q smallbank_backend 6 | clush -qS -w ${dtx_test_backends} killall -q tatp_backend -------------------------------------------------------------------------------- /ae/collect/backends/run_backend_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $2 3 | LD_PRELOAD=libmlx5.so numactl -m1 -N1 $1 4 | -------------------------------------------------------------------------------- /ae/collect/backends/run_backend_wrapper_pmem.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $2 3 | LD_PRELOAD=libmlx5.so numactl -m1 -N1 $1 ../config/backend.pmem.json 4 | -------------------------------------------------------------------------------- /ae/collect/backends/run_btree_backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clush -qS -w ${btree_test_backends} bash `pwd`/../ae/collect/backends/run_backend_wrapper.sh ./btree/btree_backend `pwd` 3 | -------------------------------------------------------------------------------- /ae/collect/backends/run_btree_backend_local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | bash `pwd`/../ae/collect/backends/run_backend_wrapper.sh ./btree/btree_backend `pwd` 3 | -------------------------------------------------------------------------------- /ae/collect/backends/run_hashtable_backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clush -qS -w ${hashtable_test_backends} bash `pwd`/../ae/collect/backends/run_backend_wrapper.sh ./hashtable/hashtable_backend `pwd` -------------------------------------------------------------------------------- /ae/collect/backends/run_rdma_backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clush -qS -w ${rdma_test_backend} bash `pwd`/../ae/collect/backends/run_backend_wrapper.sh ./test/test_rdma `pwd` 3 | -------------------------------------------------------------------------------- /ae/collect/backends/run_smallbank_backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clush -qS -w ${dtx_test_backends} bash `pwd`/../ae/collect/backends/run_backend_wrapper_pmem.sh ./dtx/smallbank/smallbank_backend `pwd` 3 | -------------------------------------------------------------------------------- /ae/collect/backends/run_tatp_backend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | clush -qS -w ${dtx_test_backends} bash `pwd`/../ae/collect/backends/run_backend_wrapper_pmem.sh ./dtx/tatp/tatp_backend `pwd` 3 | -------------------------------------------------------------------------------- /ae/collect/common.sh: -------------------------------------------------------------------------------- 1 | # Keep them consistent with ae/plot/common.py 2 | 3 | export project_directory=~/sds-ae 4 | 5 | export rdma_test_backend=optane06 6 | export hashtable_test_backends=optane06,optane07 7 | export btree_test_backends=optane06,optane07,optane08,optane00,optane01,optane03,optane04,optane02 8 | export dtx_test_backends=optane06,optane07 9 | 10 | # $client_machine should not be in $rdma_test_backend, $hashtable_test_backends or $dtx_test_backends 11 | # i.e., optane06,optane07 is not allowed. 12 | export client_machine=optane04 13 | 14 | export thread_set=(1 8 16 24 32 40 48 56 64 72 80 88 96) 15 | export max_threads=96 16 | 17 | export fig4_depth_set=(1 4 8 16 24 32) 18 | export fig4_thread_set=(12 24 36 48 60 72 84 96) 19 | 20 | export fig5_thread_set=(1 2 4 6 8 10 12 14 16) 21 | export fig5_zipfian_set=(0 40 80 90 95 99) 22 | 23 | # Six elements, with 1-6 machines respectively 24 | export fig7_compute_machine_list=(optane00 optane0[0,1] optane0[0,1,3] optane0[0,1,3,4] optane0[0,1,3,4,2] optane0[0,1,3,4,2,8]) 25 | export fig12_compute_machine_list=(optane06 optane0[6,7] optane0[6,7,8] optane0[6,7,8,0] optane0[6,7,8,0,1] optane0[6,7,8,0,1,3] optane0[6,7,8,0,1,3,4] optane0[6,7,8,0,1,3,4,2]) 26 | 27 | export fig12_thread_set=(1 8 16 24 32 40 48 56 64 72 80 88 94) 28 | export fig12_max_threads=94 29 | 30 | export fig13_depth_set=(1 4 8 12 16 20 24 28 32) 31 | export fig14_thread_set=(1 16 32 48 64 80 88 96) 32 | 33 | export interval_set=(8 16 32 64 128 256 512 1024 2048) 34 | 35 | export ae_data_path=$project_directory+'/ae/raw' 36 | export ae_figure_path=$project_directory+'/ae/figure' 37 | export build_directory=$project_directory+"/build" 38 | export script_directory=$project_directory+"/script" 39 | -------------------------------------------------------------------------------- /ae/collect/config/datastructure.btree.json: -------------------------------------------------------------------------------- 1 | { 2 | "nr_threads": 24, 3 | "tasks_per_thread": 4, 4 | "dataset": "ycsb-c", 5 | "dump_file_path": "", 6 | 7 | "nic_numa_node": 1, 8 | "cpu_nodes": 2, 9 | "cores_per_cpu": 48, 10 | 11 | "insert_before_execution": false, 12 | "max_key": 100000000, 13 | "key_length": 8, 14 | "value_length": 8, 15 | "rehash_key": false, 16 | "duration": 10, 17 | "zipfian_const": 0.99, 18 | 19 | "memory_servers": [ 20 | { 21 | "hostname": "optane06", 22 | "port": 12345 23 | }, 24 | { 25 | "hostname": "optane07", 26 | "port": 12345 27 | }, 28 | { 29 | "hostname": "optane08", 30 | "port": 12345 31 | }, 32 | { 33 | "hostname": "optane00", 34 | "port": 12345 35 | }, 36 | { 37 | "hostname": "optane01", 38 | "port": 12345 39 | }, 40 | { 41 | "hostname": "optane03", 42 | "port": 12345 43 | }, 44 | { 45 | "hostname": "optane04", 46 | "port": 12345 47 | }, 48 | { 49 | "hostname": "optane02", 50 | "port": 12345 51 | } 52 | ] 53 | } -------------------------------------------------------------------------------- /ae/collect/config/datastructure.btree.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "nr_threads": 24, 3 | "tasks_per_thread": 4, 4 | "dataset": "ycsb-c", 5 | "dump_file_path": "", 6 | 7 | "nic_numa_node": 1, 8 | "cpu_nodes": 2, 9 | "cores_per_cpu": 48, 10 | 11 | "insert_before_execution": false, 12 | "max_key": 100000000, 13 | "key_length": 8, 14 | "value_length": 8, 15 | "rehash_key": false, 16 | "duration": 10, 17 | "zipfian_const": 0.99, 18 | 19 | "memory_servers": [ 20 | { 21 | "hostname": "localhost", 22 | "port": 12345 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /ae/collect/config/datastructure.hashtable.json: -------------------------------------------------------------------------------- 1 | { 2 | "nr_threads": 24, 3 | "tasks_per_thread": 4, 4 | "dataset": "ycsb-a", 5 | "dump_file_path": "", 6 | 7 | "nic_numa_node": 1, 8 | "cpu_nodes": 2, 9 | "cores_per_cpu": 48, 10 | 11 | "insert_before_execution": false, 12 | "max_key": 100000000, 13 | "key_length": 8, 14 | "value_length": 8, 15 | "rehash_key": false, 16 | "duration": 10, 17 | "zipfian_const": 0.99, 18 | 19 | "memory_servers": [ 20 | { 21 | "hostname": "optane06", 22 | "port": 12345 23 | }, 24 | { 25 | "hostname": "optane07", 26 | "port": 12345 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /ae/collect/config/smart_config.dtx.json: -------------------------------------------------------------------------------- 1 | { 2 | "infiniband": { 3 | "name": "", 4 | "port": 1 5 | }, 6 | 7 | "qp_param": { 8 | "max_cqe_size": 128, 9 | "max_wqe_size": 128, 10 | "max_sge_size": 1, 11 | "max_inline_data": 64 12 | }, 13 | 14 | "max_nodes": 32, 15 | "initiator_cache_size": 4096, 16 | 17 | "use_thread_aware_alloc": true, 18 | "thread_aware_alloc": { 19 | "total_uuar": 100, 20 | "shared_uuar": 96, 21 | "shared_cq": true 22 | }, 23 | 24 | "use_work_req_throt": true, 25 | "work_req_throt": { 26 | "initial_credit": 4, 27 | "max_credit": 12, 28 | "credit_step": 2, 29 | "execution_epochs": 60, 30 | "sample_cycles": 19200000, 31 | "inf_credit_weight": 1.05, 32 | "auto_tuning": true 33 | }, 34 | 35 | "experimental": { 36 | "qp_sharing": false 37 | }, 38 | 39 | "use_conflict_avoidance": false, 40 | "use_speculative_lookup": false 41 | } -------------------------------------------------------------------------------- /ae/collect/config/smart_config.hashtable.json: -------------------------------------------------------------------------------- 1 | { 2 | "infiniband": { 3 | "name": "", 4 | "port": 1 5 | }, 6 | 7 | "qp_param": { 8 | "max_cqe_size": 128, 9 | "max_wqe_size": 128, 10 | "max_sge_size": 1, 11 | "max_inline_data": 64 12 | }, 13 | 14 | "max_nodes": 32, 15 | "initiator_cache_size": 1024, 16 | 17 | "use_thread_aware_alloc": true, 18 | "thread_aware_alloc": { 19 | "total_uuar": 100, 20 | "shared_uuar": 96, 21 | "shared_cq": true 22 | }, 23 | 24 | "use_work_req_throt": true, 25 | "work_req_throt": { 26 | "initial_credit": 4, 27 | "max_credit": 12, 28 | "credit_step": 2, 29 | "execution_epochs": 60, 30 | "sample_cycles": 19200000, 31 | "inf_credit_weight": 1.05, 32 | "auto_tuning": true 33 | }, 34 | 35 | "experimental": { 36 | "qp_sharing": false 37 | }, 38 | 39 | "use_conflict_avoidance": false, 40 | "use_speculative_lookup": false 41 | } -------------------------------------------------------------------------------- /ae/collect/config/smart_config.shared_qp.json: -------------------------------------------------------------------------------- 1 | { 2 | "infiniband": { 3 | "name": "", 4 | "port": 1 5 | }, 6 | 7 | "qp_param": { 8 | "max_cqe_size": 4096, 9 | "max_wqe_size": 4096, 10 | "max_sge_size": 1, 11 | "max_inline_data": 64 12 | }, 13 | 14 | "max_nodes": 128, 15 | "initiator_cache_size": 16, 16 | 17 | "use_thread_aware_alloc": false, 18 | "thread_aware_alloc": { 19 | "total_uuar": 100, 20 | "shared_uuar": 96, 21 | "shared_cq": true 22 | }, 23 | 24 | "use_work_req_throt": false, 25 | "work_req_throt": { 26 | "initial_credit": 4, 27 | "max_credit": 12, 28 | "credit_step": 2, 29 | "execution_epochs": 60, 30 | "sample_cycles": 19200000, 31 | "inf_credit_weight": 1.05, 32 | "auto_tuning": true 33 | }, 34 | 35 | "use_conflict_avoidance": false, 36 | "use_speculative_lookup": false, 37 | 38 | "experimental": { 39 | "qp_sharing": true 40 | } 41 | } -------------------------------------------------------------------------------- /ae/collect/fig10-dtx-scale-up.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export DEPTH=8 5 | export APP=smallbank 6 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.dtx.json 7 | 8 | function run_app() { 9 | bash ../ae/collect/backends/run_${APP}_backend.sh & 10 | sleep 10 11 | 12 | # FORD 13 | export DUMP_PREFIX='ford-'${APP} 14 | for threads in ${thread_set[@]}; do 15 | # The following command performs one bench and append the result to the dump file. Dump format: 16 | # dtx-smallbank, 1, 8, 0.244, 0.21, 35.272, 62.335, 0.141, 13.106, 3.2 17 | # name, threads, depth, , committed txns thrput (Mtxn/s), median latency (us), tail latency (us), other information 18 | DUMP_FILE_PATH=../ae/raw/fig10-${APP}.csv \ 19 | SMART_OPTS=None \ 20 | bash ../ae/collect/test_app/${APP}.sh ${threads} ${DEPTH} 21 | done 22 | 23 | # SMART-DTX 24 | export DUMP_PREFIX='dtx-'${APP} 25 | for threads in ${thread_set[@]}; do 26 | DUMP_FILE_PATH=../ae/raw/fig10-${APP}.csv \ 27 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 28 | bash ../ae/collect/test_app/${APP}.sh ${threads} ${DEPTH} 29 | done 30 | 31 | killall -q run_${APP}_backend.sh 32 | bash ../ae/collect/backends/kill_backend.sh 33 | } 34 | 35 | if [ ! -f test/test_rdma ]; then 36 | echo 'Please run this script under the `build` directory' 37 | exit 127 38 | fi 39 | export APP=smallbank 40 | run_app 41 | export APP=tatp 42 | run_app 43 | exit 0 44 | -------------------------------------------------------------------------------- /ae/collect/fig11-dtx-scale-latency.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../ae/collect/common.sh 4 | export THREADS=$max_threads 5 | export DEPTH=8 6 | export APP=smallbank 7 | export idle_set=(0 16 32 64 128 256 512 1024 2048 4096 8192) 8 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.dtx.json 9 | 10 | function run_app() { 11 | bash ../ae/collect/backends/run_${APP}_backend.sh & 12 | sleep 10 13 | 14 | # FORD 15 | export DUMP_PREFIX='ford-'${APP} 16 | for idle in ${idle_set[@]}; do 17 | DUMP_FILE_PATH=../ae/raw/fig11-${APP}.csv \ 18 | SMART_OPTS=None \ 19 | IDLE_USEC=${idle} \ 20 | bash ../ae/collect/test_app/${APP}.sh ${THREADS} ${DEPTH} 21 | done 22 | 23 | # SMART-DTX 24 | export DUMP_PREFIX='dtx-'${APP} 25 | for idle in ${idle_set[@]}; do 26 | DUMP_FILE_PATH=../ae/raw/fig11-${APP}.csv \ 27 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 28 | IDLE_USEC=${idle} \ 29 | bash ../ae/collect/test_app/${APP}.sh ${THREADS} ${DEPTH} 30 | done 31 | 32 | killall -q run_${APP}_backend.sh 33 | bash ../ae/collect/backends/kill_backend.sh 34 | } 35 | 36 | if [ ! -f test/test_rdma ]; then 37 | echo 'Please run this script under the `build` directory' 38 | exit 127 39 | fi 40 | export APP=smallbank 41 | run_app 42 | export APP=tatp 43 | run_app 44 | exit 0 45 | -------------------------------------------------------------------------------- /ae/collect/fig12abc-btree-scale-up.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | export MEMORY_NODES=1 4 | export DEPTH=8 5 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 6 | export USE_HOCL=1 7 | 8 | function start_backend() { 9 | bash ../ae/collect/backends/run_btree_backend_local.sh & 10 | sleep 10 11 | export MAX_THREADS=$max_threads 12 | export MY_DEPTH=1 13 | # Loading dataset 14 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.local.json \ 15 | INSERT_ONLY=1 \ 16 | bash ../ae/collect/test_app/btree.sh ${MAX_THREADS} ${MY_DEPTH} 17 | } 18 | 19 | function kill_backend() { 20 | killall -q run_btree_backend_local.sh 21 | bash ../ae/collect/backends/kill_backend.sh 22 | } 23 | 24 | function run_thread_count() { 25 | start_backend 26 | 27 | # Sherman 28 | for threads in ${fig12_thread_set[@]}; do 29 | # Dump one record per execution 30 | # The format is exactly the same as hashtable benchmarks 31 | DUMP_FILE_PATH=../ae/raw/fig12-${WORKLOAD}.csv \ 32 | SMART_OPTS=None \ 33 | DATASET_PATH=${WORKLOAD} \ 34 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.local.json \ 35 | bash ../ae/collect/test_app/btree.sh ${threads} ${DEPTH} 36 | done 37 | 38 | # Sherman with SpecLookup 39 | for threads in ${fig12_thread_set[@]}; do 40 | DUMP_FILE_PATH=../ae/raw/fig12-${WORKLOAD}.csv \ 41 | SMART_OPTS=SpecLookup \ 42 | DATASET_PATH=${WORKLOAD} \ 43 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.local.json \ 44 | bash ../ae/collect/test_app/btree.sh ${threads} ${DEPTH} 45 | done 46 | 47 | # SMART-BT 48 | for threads in ${fig12_thread_set[@]}; do 49 | DUMP_FILE_PATH=../ae/raw/fig12-${WORKLOAD}.csv \ 50 | DATASET_PATH=${WORKLOAD} \ 51 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid,SpecLookup \ 52 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.local.json \ 53 | bash ../ae/collect/test_app/btree.sh ${threads} ${DEPTH} 54 | done 55 | 56 | kill_backend 57 | } 58 | 59 | if [ ! -f test/test_rdma ]; then 60 | echo 'Please run this script under the `build` directory' 61 | exit 127 62 | fi 63 | export WORKLOAD=ycsb-a 64 | run_thread_count 65 | export WORKLOAD=ycsb-b 66 | run_thread_count 67 | export WORKLOAD=ycsb-c 68 | run_thread_count 69 | exit 0 70 | -------------------------------------------------------------------------------- /ae/collect/fig12def-btree-scale-out.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../ae/collect/common.sh 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 7 | export USE_HOCL=1 8 | 9 | function start_backend() { 10 | bash ../ae/collect/backends/run_btree_backend.sh & 11 | sleep 30 12 | export MY_DEPTH=1 13 | export MEMORY_NODES=$1 14 | # Loading dataset 15 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.json \ 16 | INSERT_ONLY=1 \ 17 | bash ../ae/collect/test_app/btree.sh ${fig12_max_threads} ${MY_DEPTH} 18 | sleep 5 19 | } 20 | 21 | function kill_backend() { 22 | sleep 5 23 | killall -q run_btree_backend.sh 24 | bash ../ae/collect/backends/kill_backend.sh 25 | sleep 5 26 | } 27 | 28 | function run_thread_count() { 29 | # Sherman 30 | declare -i idx=1 31 | for machine in ${fig12_compute_machine_list[@]}; do 32 | start_backend $idx 33 | 34 | clush -w $machine \ 35 | bash `pwd`/../ae/collect/test_app/btree-remote.sh \ 36 | `pwd` $WORKLOAD \ 37 | None $idx ${fig12_compute_machine_list[0]} 38 | 39 | let idx++ 40 | kill_backend 41 | done 42 | 43 | # Sherman with SpecLookup 44 | declare -i idx=1 45 | for machine in ${fig12_compute_machine_list[@]}; do 46 | start_backend $idx 47 | 48 | clush -w $machine \ 49 | bash `pwd`/../ae/collect/test_app/btree-remote.sh \ 50 | `pwd` $WORKLOAD \ 51 | SpecLookup $idx ${fig12_compute_machine_list[0]} 52 | 53 | let idx++ 54 | kill_backend 55 | done 56 | 57 | # SMART-BT 58 | declare -i idx=1 59 | for machine in ${fig12_compute_machine_list[@]}; do 60 | start_backend $idx 61 | 62 | clush -w $machine \ 63 | bash `pwd`/../ae/collect/test_app/btree-remote.sh \ 64 | `pwd` $WORKLOAD \ 65 | ThrdAwareAlloc,WorkReqThrot,ConflictAvoid,SpecLookup $idx \ 66 | ${fig12_compute_machine_list[0]} 67 | 68 | let idx++ 69 | kill_backend 70 | done 71 | } 72 | 73 | if [ ! -f test/test_rdma ]; then 74 | echo 'Please run this script under the `build` directory' 75 | exit 127 76 | fi 77 | export WORKLOAD=ycsb-a 78 | run_thread_count 79 | export WORKLOAD=ycsb-b 80 | run_thread_count 81 | export WORKLOAD=ycsb-c 82 | run_thread_count 83 | exit 0 84 | -------------------------------------------------------------------------------- /ae/collect/fig13-thread-count-batch-size.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export BLKSIZE=8 3 | 4 | source ../ae/collect/common.sh 5 | function start_backend() { 6 | bash ../ae/collect/backends/run_rdma_backend.sh & 7 | sleep 10 8 | } 9 | 10 | function kill_backend() { 11 | killall -q run_rdma_backend.sh 12 | bash ../ae/collect/backends/kill_backend.sh 13 | } 14 | 15 | # see fig3-scalability.sh for output format 16 | function run_thread_count() { 17 | export DUMP_FILE_PATH=../ae/raw/fig13a.csv 18 | export thread_set=(1 8 16 24 32 40 48 56 64 72 80 88 96) 19 | export DEPTH=16 20 | for threads in ${thread_set[@]}; do 21 | bash ../ae/collect/test_rdma/per_thread_qp.sh ${threads} ${DEPTH} 22 | done 23 | for threads in ${thread_set[@]}; do 24 | # +ThrdResAlloc 25 | bash ../ae/collect/test_rdma/per_thread_doorbell.sh ${threads} ${DEPTH} 26 | done 27 | for threads in ${thread_set[@]}; do 28 | # +WorkReqThrot 29 | bash ../ae/collect/test_rdma/with_work_req_throt.sh ${threads} ${DEPTH} 30 | done 31 | } 32 | 33 | function run_batch_size() { 34 | export DUMP_FILE_PATH=../ae/raw/fig13b.csv 35 | export THREAD=$max_threads 36 | export depth_set=(1 4 8 12 16 20 24 28 32) 37 | for depth in ${depth_set[@]}; do 38 | bash ../ae/collect/test_rdma/per_thread_qp.sh ${THREAD} ${depth} 39 | done 40 | for depth in ${depth_set[@]}; do 41 | # +ThrdResAlloc 42 | bash ../ae/collect/test_rdma/per_thread_doorbell.sh ${THREAD} ${depth} 43 | done 44 | for depth in ${depth_set[@]}; do 45 | # +WorkReqThrot 46 | bash ../ae/collect/test_rdma/with_work_req_throt.sh ${THREAD} ${depth} 47 | done 48 | } 49 | 50 | if [ ! -f test/test_rdma ]; then 51 | echo 'Please run this script under the `build` directory' 52 | exit 127 53 | fi 54 | kill_backend 55 | start_backend 56 | export TYPE=read 57 | run_thread_count 58 | run_batch_size 59 | kill_backend 60 | exit 0 61 | -------------------------------------------------------------------------------- /ae/collect/fig14-hashtable-conflict-bc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../ae/collect/common.sh 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 7 | 8 | function start_backend() { 9 | bash ../ae/collect/backends/run_hashtable_backend.sh & 10 | sleep 10 11 | export MAX_THREADS=$max_threads 12 | export MY_DEPTH=1 13 | # Loading dataset 14 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 15 | INSERT_ONLY=1 \ 16 | bash ../ae/collect/test_app/hashtable-prof.sh ${MAX_THREADS} ${MY_DEPTH} 17 | } 18 | 19 | function kill_backend() { 20 | killall -q run_hashtable_backend.sh 21 | bash ../ae/collect/backends/kill_backend.sh 22 | } 23 | 24 | function run_thread_count() { 25 | # w/o ConflictAvoid 26 | for threads in ${fig14_thread_set[@]}; do 27 | start_backend 28 | 29 | DUMP_FILE_PATH=../ae/raw/fig14bc.csv \ 30 | DATASET_PATH=update-only \ 31 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot \ 32 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 33 | REPORT_LATENCY=1 \ 34 | bash ../ae/collect/test_app/hashtable-prof.sh ${threads} ${DEPTH} 35 | 36 | kill_backend 37 | done 38 | 39 | # +Backoff 40 | for threads in ${fig14_thread_set[@]}; do 41 | start_backend 42 | 43 | DUMP_FILE_PATH=../ae/raw/fig14bc.csv \ 44 | DATASET_PATH=update-only \ 45 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 46 | DISABLE_CORO_THROT=1 MAX_BACKOFF_CYCLE_LOG2=-1 \ 47 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 48 | REPORT_LATENCY=1 \ 49 | bash ../ae/collect/test_app/hashtable-prof.sh ${threads} ${DEPTH} 50 | 51 | kill_backend 52 | done 53 | 54 | # +DynBackoffLimit 55 | for threads in ${fig14_thread_set[@]}; do 56 | start_backend 57 | 58 | DUMP_FILE_PATH=../ae/raw/fig14bc.csv \ 59 | DATASET_PATH=update-only \ 60 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 61 | DISABLE_CORO_THROT=1 \ 62 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 63 | REPORT_LATENCY=1 \ 64 | bash ../ae/collect/test_app/hashtable-prof.sh ${threads} ${DEPTH} 65 | 66 | kill_backend 67 | done 68 | 69 | # +CoroThrot 70 | for threads in ${fig14_thread_set[@]}; do 71 | start_backend 72 | 73 | DUMP_FILE_PATH=../ae/raw/fig14bc.csv \ 74 | DATASET_PATH=update-only \ 75 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 76 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 77 | REPORT_LATENCY=1 \ 78 | bash ../ae/collect/test_app/hashtable-prof.sh ${threads} ${DEPTH} 79 | 80 | kill_backend 81 | done 82 | } 83 | 84 | if [ ! -f test/test_rdma ]; then 85 | echo 'Please run this script under the `build` directory' 86 | exit 127 87 | fi 88 | run_thread_count 89 | exit 0 90 | 91 | # NOTE: 92 | # To collect retries count per operation (Fig 14b and 14c), 93 | # rebuild this project with #define CONFIG_STAT, then run this script again. 94 | -------------------------------------------------------------------------------- /ae/collect/fig14-hashtable-conflict.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../ae/collect/common.sh 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 7 | 8 | function start_backend() { 9 | bash ../ae/collect/backends/run_hashtable_backend.sh & 10 | sleep 10 11 | export MAX_THREADS=$max_threads 12 | export MY_DEPTH=1 13 | # Loading dataset 14 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 15 | INSERT_ONLY=1 \ 16 | bash ../ae/collect/test_app/hashtable.sh ${MAX_THREADS} ${MY_DEPTH} 17 | } 18 | 19 | function kill_backend() { 20 | killall -q run_hashtable_backend.sh 21 | bash ../ae/collect/backends/kill_backend.sh 22 | } 23 | 24 | function run_thread_count() { 25 | # w/o ConflictAvoid 26 | for threads in ${fig14_thread_set[@]}; do 27 | start_backend 28 | 29 | DUMP_FILE_PATH=../ae/raw/fig14.csv \ 30 | DATASET_PATH=update-only \ 31 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot \ 32 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 33 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 34 | 35 | kill_backend 36 | done 37 | 38 | # +Backoff 39 | for threads in ${fig14_thread_set[@]}; do 40 | start_backend 41 | 42 | DUMP_FILE_PATH=../ae/raw/fig14.csv \ 43 | DATASET_PATH=update-only \ 44 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 45 | DISABLE_CORO_THROT=1 MAX_BACKOFF_CYCLE_LOG2=-1 \ 46 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 47 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 48 | 49 | kill_backend 50 | done 51 | 52 | # +DynBackoffLimit 53 | for threads in ${fig14_thread_set[@]}; do 54 | start_backend 55 | 56 | DUMP_FILE_PATH=../ae/raw/fig14.csv \ 57 | DATASET_PATH=update-only \ 58 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 59 | DISABLE_CORO_THROT=1 \ 60 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 61 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 62 | 63 | kill_backend 64 | done 65 | 66 | # +CoroThrot 67 | for threads in ${fig14_thread_set[@]}; do 68 | start_backend 69 | 70 | DUMP_FILE_PATH=../ae/raw/fig14.csv \ 71 | DATASET_PATH=update-only \ 72 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 73 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 74 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 75 | 76 | kill_backend 77 | done 78 | } 79 | 80 | if [ ! -f test/test_rdma ]; then 81 | echo 'Please run this script under the `build` directory' 82 | exit 127 83 | fi 84 | run_thread_count 85 | exit 0 86 | 87 | # NOTE: 88 | # To collect retries count per operation (Fig 14b and 14c), 89 | # rebuild this project with #define CONFIG_STAT, then run this script again. 90 | -------------------------------------------------------------------------------- /ae/collect/fig3-scalability.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export BLKSIZE=8 5 | export DEPTH=8 6 | 7 | function start_backend() { 8 | bash ../ae/collect/backends/run_rdma_backend.sh & 9 | sleep 10 10 | } 11 | 12 | function kill_backend() { 13 | killall -q run_rdma_backend.sh 14 | bash ../ae/collect/backends/kill_backend.sh 15 | } 16 | 17 | function run() { 18 | # Lines 1-13 of fig3{a,b}.csv, each line containing the following information 19 | # e.g. #1: test_rdma, 1, 8, 8, 14.186, 1.859 20 | # program, threads, depth, blksize, throughput (MB/s), IOPS (MOP/s) 21 | for threads in ${thread_set[@]}; do 22 | bash ../ae/collect/test_rdma/shared_qp.sh ${threads} ${DEPTH} 23 | done 24 | # Lines 14-26 of fig3{a,b}.csv 25 | for threads in ${thread_set[@]}; do 26 | bash ../ae/collect/test_rdma/multiplexed_qp_4.sh ${threads} ${DEPTH} 27 | done 28 | # Lines 27-39 of fig3{a,b}.csv 29 | for threads in ${thread_set[@]}; do 30 | bash ../ae/collect/test_rdma/multiplexed_qp_2.sh ${threads} ${DEPTH} 31 | done 32 | # Lines 40-52 of fig3{a,b}.csv 33 | for threads in ${thread_set[@]}; do 34 | bash ../ae/collect/test_rdma/per_thread_qp.sh ${threads} ${DEPTH} 35 | done 36 | # Lines 53-65 of fig3{a,b}.csv 37 | for threads in ${thread_set[@]}; do 38 | bash ../ae/collect/test_rdma/per_thread_doorbell.sh ${threads} ${DEPTH} 39 | done 40 | } 41 | 42 | if [ ! -f test/test_rdma ]; then 43 | echo 'Please run this script under the `build` directory' 44 | exit 127 45 | fi 46 | kill_backend 47 | start_backend 48 | export DUMP_FILE_PATH=../ae/raw/fig3a.csv 49 | export TYPE=read 50 | run 51 | export DUMP_FILE_PATH=../ae/raw/fig3b.csv 52 | export TYPE=write 53 | run 54 | kill_backend 55 | exit 0 56 | -------------------------------------------------------------------------------- /ae/collect/fig4-owr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export BLKSIZE=8 5 | 6 | function start_backend() { 7 | bash ../ae/collect/backends/run_rdma_backend.sh & 8 | sleep 10 9 | } 10 | 11 | function kill_backend() { 12 | killall -q run_rdma_backend.sh 13 | bash ../ae/collect/backends/kill_backend.sh 14 | } 15 | 16 | function run() { 17 | for threads in ${fig4_thread_set[@]}; do 18 | for depth in ${fig4_depth_set[@]}; do 19 | # each execution produces one line of fig4{a,b}.csv 20 | # the output format has been explained in fig3-scalability.sh 21 | bash ../ae/collect/test_rdma/per_thread_doorbell.sh ${threads} ${depth} 22 | done 23 | done 24 | } 25 | 26 | if [ ! -f test/test_rdma ]; then 27 | echo 'Please run this script under the `build` directory' 28 | exit 127 29 | fi 30 | kill_backend 31 | start_backend 32 | export DUMP_FILE_PATH=../ae/raw/fig4a.csv 33 | export TYPE=read 34 | run 35 | export DUMP_FILE_PATH=../ae/raw/fig4b.csv 36 | export TYPE=write 37 | run 38 | kill_backend 39 | exit 0 40 | -------------------------------------------------------------------------------- /ae/collect/fig4b-owr-pcie-perf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export BLKSIZE=8 5 | 6 | function start_backend() { 7 | bash ../ae/collect/backends/run_rdma_backend.sh & 8 | sleep 10 9 | } 10 | 11 | function kill_backend() { 12 | killall -q run_rdma_backend.sh 13 | bash ../ae/collect/backends/kill_backend.sh 14 | } 15 | 16 | function run() { 17 | for threads in ${fig4_thread_set[@]}; do 18 | for depth in ${fig4_depth_set[@]}; do 19 | echo "Running: type=$TYPE threads=$threads depth=$depth" 20 | # Please manually profile PCIe inbound traffic using Mellanox Neohost 21 | bash ../ae/collect/test_rdma/per_thread_doorbell.sh ${threads} ${depth} 22 | read -p "Press any key to resume ..." 23 | done 24 | done 25 | } 26 | 27 | if [ ! -f test/test_rdma ]; then 28 | echo 'Please run this script under the `build` directory' 29 | exit 127 30 | fi 31 | kill_backend 32 | start_backend 33 | export DUMP_FILE_PATH=../ae/raw/fig4-prof.csv 34 | export TYPE=write 35 | run 36 | kill_backend 37 | exit 0 38 | -------------------------------------------------------------------------------- /ae/collect/fig5-hashtable-motivation.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 7 | 8 | function start_backend() { 9 | bash ../ae/collect/backends/run_hashtable_backend.sh & 10 | sleep 10 11 | export MAX_THREADS=$max_threads 12 | export MY_DEPTH=1 13 | # Loading dataset 14 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 15 | INSERT_ONLY=1 \ 16 | bash ../ae/collect/test_app/hashtable.sh ${MAX_THREADS} ${MY_DEPTH} 17 | } 18 | 19 | function kill_backend() { 20 | killall -q run_hashtable_backend.sh 21 | bash ../ae/collect/backends/kill_backend.sh 22 | } 23 | 24 | function run_thread_count() { 25 | for threads in ${fig5_thread_set[@]}; do 26 | start_backend 27 | 28 | # The following command produces one line output of fig5{a,b}.csv. 29 | # Output format: 30 | # HashTableMultiShard, update-only, 1, 8, 8, 8, 100000000, 246280, 30342, 67250 31 | # app_name, dataset-name, threads, depth, key_len, value_len, num_keys, throuhgput (OP/s), median latency(ns), tail latency(ns) 32 | # Note that if REPORT_LATENCY is NOT enabled, median latency and tail latency are marked as '-1' 33 | 34 | DUMP_FILE_PATH=../ae/raw/fig5a.csv \ 35 | SMART_OPTS=None \ 36 | DATASET_PATH=update-only \ 37 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 38 | REPORT_LATENCY=1 \ 39 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 40 | 41 | kill_backend 42 | done 43 | } 44 | 45 | function run_zipfian() { 46 | export THREADS=16 47 | for zipfian in ${fig5_zipfian_set[@]}; do 48 | start_backend 49 | 50 | # Dump one record per execution 51 | DUMP_FILE_PATH=../ae/raw/fig5b.csv \ 52 | SMART_OPTS=None \ 53 | DATASET_PATH=update-only \ 54 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 55 | ZIPFIAN_CONST=${zipfian} \ 56 | REPORT_LATENCY=1 \ 57 | bash ../ae/collect/test_app/hashtable.sh ${THREADS} ${DEPTH} 58 | 59 | kill_backend 60 | done 61 | } 62 | 63 | if [ ! -f test/test_rdma ]; then 64 | echo 'Please run this script under the `build` directory' 65 | exit 127 66 | fi 67 | run_thread_count 68 | run_zipfian 69 | exit 0 70 | -------------------------------------------------------------------------------- /ae/collect/fig7-hashtable-scale-out.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export THRAEDS=$max_threads 7 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 8 | 9 | function start_backend() { 10 | bash ../ae/collect/backends/run_hashtable_backend.sh & 11 | sleep 10 12 | export MAX_THREADS=96 13 | export MY_DEPTH=1 14 | # Loading dataset 15 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 16 | INSERT_ONLY=1 \ 17 | bash ../ae/collect/test_app/hashtable.sh ${THRAEDS} ${MY_DEPTH} 18 | } 19 | 20 | function kill_backend() { 21 | killall -q run_hashtable_backend.sh 22 | bash ../ae/collect/backends/kill_backend.sh 23 | } 24 | 25 | function run_thread_count() { 26 | # RACE 27 | declare -i idx=1 28 | for machine in ${fig7_compute_machine_list[@]}; do 29 | start_backend 30 | 31 | clush -w $machine \ 32 | bash `pwd`/../ae/collect/test_app/hashtable-remote.sh \ 33 | `pwd` $WORKLOAD \ 34 | None $idx ${fig7_compute_machine_list[0]} 35 | 36 | let idx++ 37 | kill_backend 38 | done 39 | 40 | # SMART-HT 41 | declare -i idx=1 42 | for machine in ${fig7_compute_machine_list[@]}; do 43 | start_backend 44 | 45 | clush -w $machine \ 46 | bash `pwd`/../ae/collect/test_app/hashtable-remote.sh \ 47 | `pwd` $WORKLOAD \ 48 | ThrdAwareAlloc,WorkReqThrot,ConflictAvoid $idx ${fig7_compute_machine_list[0]} 49 | 50 | let idx++ 51 | kill_backend 52 | done 53 | } 54 | 55 | if [ ! -f test/test_rdma ]; then 56 | echo 'Please run this script under the `build` directory' 57 | exit 127 58 | fi 59 | export WORKLOAD=ycsb-a 60 | run_thread_count 61 | export WORKLOAD=ycsb-b 62 | run_thread_count 63 | export WORKLOAD=ycsb-c 64 | run_thread_count 65 | exit 0 66 | -------------------------------------------------------------------------------- /ae/collect/fig8-hashtable-breakdown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 7 | 8 | function start_backend() { 9 | bash ../ae/collect/backends/run_hashtable_backend.sh & 10 | sleep 10 11 | export MAX_THREADS=$max_threads 12 | export MY_DEPTH=1 13 | # Loading dataset 14 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 15 | INSERT_ONLY=1 \ 16 | bash ../ae/collect/test_app/hashtable.sh ${MAX_THREADS} ${MY_DEPTH} 17 | } 18 | 19 | function kill_backend() { 20 | killall -q run_hashtable_backend.sh 21 | bash ../ae/collect/backends/kill_backend.sh 22 | } 23 | 24 | function run_thread_count() { 25 | # RACE 26 | for threads in ${thread_set[@]}; do 27 | start_backend 28 | 29 | DUMP_FILE_PATH=../ae/raw/fig8-${WORKLOAD}.csv \ 30 | SMART_OPTS=None \ 31 | DATASET_PATH=${WORKLOAD} \ 32 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 33 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 34 | 35 | kill_backend 36 | done 37 | 38 | # +ThrdAwareAlloc 39 | for threads in ${thread_set[@]}; do 40 | start_backend 41 | 42 | DUMP_FILE_PATH=../ae/raw/fig8-${WORKLOAD}.csv \ 43 | SMART_OPTS=ThrdAwareAlloc \ 44 | DATASET_PATH=${WORKLOAD} \ 45 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 46 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 47 | 48 | kill_backend 49 | done 50 | 51 | # +WorkReqThrot 52 | for threads in ${thread_set[@]}; do 53 | start_backend 54 | 55 | DUMP_FILE_PATH=../ae/raw/fig8-${WORKLOAD}.csv \ 56 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot \ 57 | DATASET_PATH=${WORKLOAD} \ 58 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 59 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 60 | 61 | kill_backend 62 | done 63 | 64 | # SMART-HT 65 | for threads in ${thread_set[@]}; do 66 | start_backend 67 | 68 | DUMP_FILE_PATH=../ae/raw/fig8-${WORKLOAD}.csv \ 69 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 70 | DATASET_PATH=${WORKLOAD} \ 71 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 72 | bash ../ae/collect/test_app/hashtable.sh ${threads} ${DEPTH} 73 | 74 | kill_backend 75 | done 76 | } 77 | 78 | if [ ! -f test/test_rdma ]; then 79 | echo 'Please run this script under the `build` directory' 80 | exit 127 81 | fi 82 | export WORKLOAD=ycsb-a 83 | run_thread_count 84 | export WORKLOAD=ycsb-b 85 | run_thread_count 86 | export WORKLOAD=ycsb-c 87 | run_thread_count 88 | exit 0 89 | -------------------------------------------------------------------------------- /ae/collect/fig9-hashtable-latency.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export MEMORY_NODES=2 5 | export DEPTH=8 6 | export THREADS=$max_threads 7 | export idle_set=(0 16 32 64 128 256 512 1024 2048 4096 8192) 8 | export SMART_CONFIG_PATH=../ae/collect/config/smart_config.hashtable.json 9 | 10 | function start_backend() { 11 | bash ../ae/collect/backends/run_hashtable_backend.sh & 12 | sleep 10 13 | export MY_DEPTH=1 14 | # Loading dataset 15 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 16 | INSERT_ONLY=1 \ 17 | bash ../ae/collect/test_app/hashtable.sh ${THREADS} ${MY_DEPTH} 18 | } 19 | 20 | function kill_backend() { 21 | killall -q run_hashtable_backend.sh 22 | bash ../ae/collect/backends/kill_backend.sh 23 | } 24 | 25 | function run() { 26 | # RACE 27 | for idle in ${idle_set[@]} 28 | do 29 | start_backend 30 | 31 | DUMP_FILE_PATH=../ae/raw/fig9.csv \ 32 | SMART_OPTS=None \ 33 | DATASET_PATH=ycsb-c \ 34 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 35 | REPORT_LATENCY=1 \ 36 | IDLE_USEC=${idle} \ 37 | bash ../ae/collect/test_app/hashtable.sh ${THREADS} ${DEPTH} 38 | 39 | kill_backend 40 | done 41 | 42 | # SMART-BT 43 | for idle in ${idle_set[@]} 44 | do 45 | start_backend 46 | 47 | DUMP_FILE_PATH=../ae/raw/fig9.csv \ 48 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot,ConflictAvoid \ 49 | DATASET_PATH=ycsb-c \ 50 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 51 | REPORT_LATENCY=1 \ 52 | IDLE_USEC=${idle} \ 53 | bash ../ae/collect/test_app/hashtable.sh ${THREADS} ${DEPTH} 54 | 55 | kill_backend 56 | done 57 | } 58 | 59 | if [ ! -f test/test_rdma ]; then 60 | echo 'Please run this script under the `build` directory' 61 | exit 127 62 | fi 63 | run 64 | exit 0 65 | -------------------------------------------------------------------------------- /ae/collect/killall.sh: -------------------------------------------------------------------------------- 1 | source ../ae/collect/common.sh 2 | bash ../ae/collect/backends/kill_backend.sh 3 | -------------------------------------------------------------------------------- /ae/collect/runall.sh: -------------------------------------------------------------------------------- 1 | function run() { 2 | echo $1 ' started ...' >> ../ae/raw/history 3 | date >> ../ae/raw/history 4 | bash ../ae/collect/$1.sh 5 | date >> ../ae/raw/history 6 | echo $1 ' completed ...' >> ../ae/raw/history 7 | } 8 | 9 | mkdir -p ../ae/raw 10 | run fig3-scalability 11 | run fig4-owr 12 | run fig5-hashtable-motivation 13 | run fig7-hashtable-scale-out 14 | run fig8-hashtable-breakdown 15 | run fig9-hashtable-latency 16 | run fig10-dtx-scale-up 17 | run fig11-dtx-scale-latency 18 | run fig12abc-btree-scale-up 19 | run fig12def-btree-scale-out 20 | run fig13-thread-count-batch-size 21 | run fig14-hashtable-conflict 22 | run fig14-hashtable-conflict-bc 23 | run table1 24 | -------------------------------------------------------------------------------- /ae/collect/table1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../ae/collect/common.sh 3 | 4 | export BLKSIZE=8 5 | export DEPTH=64 6 | 7 | # export sample_cycles=19200000 8 | # export execution_epochs=60 9 | 10 | function start_backend() { 11 | bash ../ae/collect/backends/run_rdma_backend.sh & 12 | sleep 10 13 | } 14 | 15 | function kill_backend() { 16 | killall -q run_rdma_backend.sh 17 | bash ../ae/collect/backends/kill_backend.sh 18 | } 19 | 20 | function run() { 21 | for interval in ${interval_set[@]}; do 22 | LD_PRELOAD=libmlx5.so \ 23 | SMART_OPTS=ThrdAwareAlloc \ 24 | DUMP_PREFIX='rdma-'${TYPE}'-per-doorbell-'${interval} \ 25 | numactl --interleave=all ./test/test_rdma_dyn ${max_threads} ${DEPTH} ${interval} 26 | done 27 | for interval in ${interval_set[@]}; do 28 | LD_PRELOAD=libmlx5.so \ 29 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot \ 30 | DUMP_PREFIX='rdma-'${TYPE}'-work-req-throt-'${interval} \ 31 | numactl --interleave=all ./test/test_rdma_dyn ${max_threads} ${DEPTH} ${interval} 32 | done 33 | } 34 | 35 | if [ ! -f test/test_rdma ]; then 36 | echo 'Please run this script under the `build` directory' 37 | exit 127 38 | fi 39 | kill_backend 40 | start_backend 41 | export DUMP_FILE_PATH=../ae/raw/table1.csv 42 | export TYPE=read 43 | run 44 | kill_backend 45 | exit 0 46 | -------------------------------------------------------------------------------- /ae/collect/test_app/btree-remote.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $1 3 | 4 | source ../ae/collect/common.sh 5 | 6 | export MEMORY_NODES=$4 7 | export COMPUTE_NODES=$4 8 | export DEPTH=8 9 | export THRAEDS=${fig12_max_threads} 10 | export USE_HOCL=1 11 | 12 | if [[ $5 == `hostname` ]]; then 13 | DUMP_FILE_PATH=../ae/raw/fig12a-$2.csv \ 14 | DATASET_PATH=$2 \ 15 | SMART_OPTS=$3 \ 16 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.json \ 17 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./btree/btree_bench $THRAEDS $DEPTH 18 | else 19 | DATASET_PATH=$2 \ 20 | SMART_OPTS=$3 \ 21 | APP_CONFIG_PATH=../ae/collect/config/datastructure.btree.json \ 22 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./btree/btree_bench $THRAEDS $DEPTH 23 | fi -------------------------------------------------------------------------------- /ae/collect/test_app/btree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./btree/btree_bench $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_app/hashtable-prof.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./hashtable/hashtable_bench_prof $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_app/hashtable-remote.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $1 3 | 4 | source ../ae/collect/common.sh 5 | 6 | export MEMORY_NODES=2 7 | export COMPUTE_NODES=$4 8 | export DEPTH=8 9 | export THRAEDS=${max_threads} 10 | 11 | if [[ $5 == `hostname` ]]; then 12 | DUMP_FILE_PATH=../ae/raw/fig7-$2.csv \ 13 | DATASET_PATH=$2 \ 14 | SMART_OPTS=$3 \ 15 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 16 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./hashtable/hashtable_bench $THRAEDS $DEPTH 17 | else 18 | DATASET_PATH=$2 \ 19 | SMART_OPTS=$3 \ 20 | APP_CONFIG_PATH=../ae/collect/config/datastructure.hashtable.json \ 21 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./hashtable/hashtable_bench $THRAEDS $DEPTH 22 | fi -------------------------------------------------------------------------------- /ae/collect/test_app/hashtable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./hashtable/hashtable_bench $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_app/smallbank.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./dtx/smallbank/smallbank_bench $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_app/tatp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so numactl --interleave=all ./dtx/tatp/tatp_bench $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_rdma/multiplexed_qp_2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so \ 3 | SMART_CONFIG_PATH=../ae/collect/config/smart_config.shared_qp.json \ 4 | QP_NUM='-2' \ 5 | DUMP_PREFIX='rdma-'${TYPE}'-mul-2' \ 6 | numactl --interleave=all ./test/test_rdma $1 $2 7 | -------------------------------------------------------------------------------- /ae/collect/test_rdma/multiplexed_qp_4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so \ 3 | SMART_CONFIG_PATH=../ae/collect/config/smart_config.shared_qp.json \ 4 | QP_NUM='-4' \ 5 | DUMP_PREFIX='rdma-'${TYPE}'-mul-4' \ 6 | numactl --interleave=all ./test/test_rdma $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_rdma/per_thread_doorbell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so \ 3 | SMART_OPTS=ThrdAwareAlloc \ 4 | DUMP_PREFIX='rdma-'${TYPE}'-per-doorbell' \ 5 | numactl --interleave=all ./test/test_rdma $1 $2 6 | -------------------------------------------------------------------------------- /ae/collect/test_rdma/per_thread_qp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so \ 3 | SMART_OPTS=None \ 4 | DUMP_PREFIX='rdma-'${TYPE}'-per-qp' \ 5 | numactl --interleave=all ./test/test_rdma $1 $2 6 | -------------------------------------------------------------------------------- /ae/collect/test_rdma/shared_qp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so \ 3 | SMART_CONFIG_PATH=../ae/collect/config/smart_config.shared_qp.json \ 4 | QP_NUM='1' \ 5 | DUMP_PREFIX='rdma-'${TYPE}'-shared-qp' \ 6 | numactl --interleave=all ./test/test_rdma $1 $2 -------------------------------------------------------------------------------- /ae/collect/test_rdma/with_work_req_throt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LD_PRELOAD=libmlx5.so \ 3 | SMART_OPTS=ThrdAwareAlloc,WorkReqThrot \ 4 | DUMP_PREFIX='rdma-'${TYPE}'-work-req-throt' \ 5 | numactl --interleave=all ./test/test_rdma $1 $2 6 | -------------------------------------------------------------------------------- /ae/figure-reference/fig10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig10.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig11.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig12.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig13.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig13.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig14.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig14.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig3.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig4.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig5.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig7.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig8.pdf -------------------------------------------------------------------------------- /ae/figure-reference/fig9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/ae/figure-reference/fig9.pdf -------------------------------------------------------------------------------- /ae/plot/README.md: -------------------------------------------------------------------------------- 1 | # Instructions of Reproduce Evaluation 2 | 3 | ## Environment Preparation 4 | 5 | ``` 6 | sudo apt-get install python3-tk 7 | pip3 install matplotlib numpy 8 | ``` 9 | 10 | You can safely ignore the following warning(s) about missing fonts 11 | ``` 12 | findfont: Generic family 'serif' not found because none of the following families were found: Arial 13 | ``` 14 | -------------------------------------------------------------------------------- /ae/plot/common.py: -------------------------------------------------------------------------------- 1 | project_directory = '/home/renfeng/sds-ae' 2 | 3 | thread_set = [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96 ] 4 | max_threads = 96 5 | 6 | fig4_depth_set = [1, 4, 8, 16, 24, 32] 7 | fig4_thread_set = [12, 24, 36, 48, 60, 72, 84, 96] 8 | 9 | fig5_thread_set = [1, 2, 4, 6, 8, 10, 12, 14, 16] 10 | fig5_zipfian_set = ["0", "0.40", "0.80", "0.90", "0.95", "0.99"] 11 | 12 | fig12_thread_set = [ 1, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 94 ] 13 | fig13_depth_set = [1, 4, 8, 12, 16, 20, 24, 28, 32] 14 | fig14_thread_set = [1, 16, 32, 48, 64, 80, 88, 96] 15 | 16 | ae_data_path = project_directory + '/ae/raw' 17 | ae_figure_path = project_directory + '/ae/figure' 18 | build_directory = project_directory + "/build" 19 | script_directory = project_directory + "/script" 20 | -------------------------------------------------------------------------------- /ae/plot/fig10.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | from matplotlib.pyplot import MultipleLocator 3 | import numpy as np 4 | import csv 5 | from matplotlib.ticker import StrMethodFormatter, NullFormatter 6 | from matplotlib import gridspec 7 | import common 8 | 9 | # Configuration 10 | threads = common.thread_set 11 | 12 | # DO NOT CHANGE BELOW 13 | def load_dataset(dataset_path): 14 | with open(dataset_path) as dataset: 15 | data_reader = csv.reader(dataset, delimiter=",") 16 | table = [] 17 | for data in data_reader: 18 | table.append(float(data[4])) 19 | return np.reshape(table, [len(table) // len(threads), len(threads)]) 20 | 21 | 22 | def set_single_plt(): 23 | fig = plt.figure(figsize=(7.5, 2.4)) 24 | plt.rcParams["xtick.direction"] = "in" 25 | plt.rcParams["ytick.direction"] = "in" 26 | plt.rcParams["axes.axisbelow"] = True 27 | plt.rcParams["font.family"] = "serif" 28 | plt.rcParams["font.serif"] = ["Arial"] 29 | plt.rcParams["mathtext.fontset"] = "cm" 30 | plt.rcParams["font.size"] = 17 31 | plt.rcParams["hatch.linewidth"] = 0.90 32 | return fig 33 | 34 | 35 | def draw_graph(path): 36 | fig = set_single_plt() 37 | gs = gridspec.GridSpec(1, 2, width_ratios=[3, 3]) 38 | ax = fig.add_subplot(gs[0]) 39 | ax.set_title("(a) SmallBank") 40 | data = load_dataset(common.ae_data_path + "/fig10-smallbank.csv") 41 | ax.plot( 42 | threads, 43 | data[1], 44 | marker="v", 45 | color="darkblue", 46 | label="SMART-DTX", 47 | linewidth=1, 48 | ms=8, 49 | markerfacecolor="white", 50 | ) 51 | ax.plot( 52 | threads, 53 | data[0], 54 | marker="D", 55 | color="purple", 56 | label="FORD+", 57 | linewidth=1, 58 | ms=8, 59 | markerfacecolor="white", 60 | ) 61 | ax.set_xlabel("Thread Count") 62 | ax.set_xlim([0, 100]) 63 | ax.set_ylabel("Throughput (MOP/s)") 64 | ax.set_ylim([0, 6]) 65 | ax.set_yticks([0, 2, 4, 6]) 66 | ax.grid(linestyle="-.") 67 | h1, l1 = ax.get_legend_handles_labels() 68 | plt.legend( 69 | h1, 70 | l1, 71 | borderaxespad=0, 72 | frameon=False, 73 | ncol=1, 74 | handletextpad=0.3, 75 | prop={"size": 17}, 76 | ) 77 | 78 | ax = fig.add_subplot(gs[1]) 79 | ax.set_title("(b) TATP") 80 | data = load_dataset(common.ae_data_path + "/fig10-tatp.csv") 81 | ax.plot( 82 | threads, 83 | data[1], 84 | marker="v", 85 | color="darkblue", 86 | label="SMART-DTX", 87 | linewidth=1, 88 | ms=8, 89 | markerfacecolor="white", 90 | ) 91 | ax.plot( 92 | threads, 93 | data[0], 94 | marker="D", 95 | color="purple", 96 | label="FORD+", 97 | linewidth=1, 98 | ms=8, 99 | markerfacecolor="white", 100 | ) 101 | ax.set_xlabel("Thread Count") 102 | ax.set_xlim([0, 100]) 103 | ax.set_ylim([0, 8]) 104 | ax.set_yticks([0, 4, 8]) 105 | ax.grid(linestyle="-.") 106 | 107 | plt.tight_layout(pad=0) 108 | plt.savefig(path, bbox_inches="tight", pad_inches=0) 109 | plt.close() 110 | 111 | 112 | draw_graph(common.ae_figure_path + "/fig10.pdf") 113 | -------------------------------------------------------------------------------- /ae/plot/fig11.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | from matplotlib.pyplot import MultipleLocator 3 | import numpy as np 4 | import csv 5 | from matplotlib.ticker import StrMethodFormatter, NullFormatter 6 | import common 7 | 8 | 9 | # DO NOT CHANGE BELOW 10 | def load_dataset(dataset_path): 11 | with open(dataset_path) as dataset: 12 | data_reader = csv.reader(dataset, delimiter=",") 13 | table = [] 14 | for data in data_reader: 15 | table.append([float(data[4]), float(data[5])]) 16 | return np.transpose(table).tolist() 17 | 18 | 19 | def set_single_plt(): 20 | fig = plt.figure(figsize=(8, 2.3)) 21 | plt.rcParams["xtick.direction"] = "in" 22 | plt.rcParams["ytick.direction"] = "in" 23 | plt.rcParams["axes.axisbelow"] = True 24 | plt.rcParams["font.family"] = "serif" 25 | plt.rcParams["font.serif"] = ["Arial"] 26 | plt.rcParams["mathtext.fontset"] = "cm" 27 | plt.rcParams["font.size"] = 18 28 | plt.rcParams["hatch.linewidth"] = 0.90 29 | return fig 30 | 31 | 32 | def plot_figure(ax, data): 33 | half = len(data[0]) // 2 34 | ax.plot( 35 | data[0][:half], 36 | data[1][:half], 37 | marker="D", 38 | color="purple", 39 | label="FORD+", 40 | linewidth=1, 41 | ms=8, 42 | markerfacecolor="white", 43 | ) 44 | ax.plot( 45 | data[0][half:], 46 | data[1][half:], 47 | marker="v", 48 | color="darkblue", 49 | label="SMART-DTX", 50 | linewidth=1, 51 | ms=8, 52 | markerfacecolor="white", 53 | ) 54 | ax.grid(linestyle="-.") 55 | 56 | 57 | def draw_graph(path): 58 | fig = set_single_plt() 59 | ax = fig.add_subplot(121) 60 | ax.set_title("(a) SmallBank") 61 | data = load_dataset(common.ae_data_path + "/fig11-smallbank.csv") 62 | plot_figure(ax, data) 63 | ax.set_ylabel("Median Latency\n($\mu$s)") 64 | ax.set_xlabel("Throughput (MOP/s)") 65 | ax.set_ylim([0, 600]) 66 | ax.set_yticks([0, 200, 400, 600]) 67 | ax.set_xlim([0, 8]) 68 | ax.set_xticks([0, 2, 4, 6, 8]) 69 | 70 | h1, l1 = ax.get_legend_handles_labels() 71 | plt.legend(h1, l1, borderaxespad=0, frameon=False, ncol=1, handletextpad=0.3) 72 | 73 | ax = fig.add_subplot(122) 74 | ax.set_title("(b) TATP") 75 | data = load_dataset(common.ae_data_path + "/fig11-tatp.csv") 76 | plot_figure(ax, data) 77 | ax.set_xlabel("Throughput (MOP/s)") 78 | ax.set_ylabel("Median Latency\n($\mu$s)") 79 | ax.set_ylim([0, 100]) 80 | ax.set_yticks([0, 25, 50, 75, 100]) 81 | ax.set_xlim([0, 8]) 82 | ax.set_xticks([0, 2, 4, 6, 8]) 83 | 84 | plt.tight_layout(pad=0) 85 | plt.savefig(path, bbox_inches="tight", pad_inches=0) 86 | plt.close() 87 | 88 | 89 | draw_graph(common.ae_figure_path + "/fig11.pdf") 90 | -------------------------------------------------------------------------------- /ae/plot/fig13.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | from matplotlib.pyplot import MultipleLocator 3 | import numpy as np 4 | import csv 5 | from matplotlib.ticker import StrMethodFormatter, NullFormatter 6 | import common 7 | 8 | threads = common.thread_set 9 | depth = common.fig13_depth_set 10 | 11 | 12 | def load_dataset(dataset_path): 13 | with open(dataset_path) as dataset: 14 | data_reader = csv.reader(dataset, delimiter=",") 15 | table = [] 16 | for data in data_reader: 17 | table.append(float(data[5])) 18 | return np.reshape(table, [len(table) // len(threads), len(threads)]) 19 | 20 | 21 | def load_dataset_b(dataset_path): 22 | with open(dataset_path) as dataset: 23 | data_reader = csv.reader(dataset, delimiter=",") 24 | table = [] 25 | for data in data_reader: 26 | table.append(float(data[5])) 27 | return np.reshape(table, [len(table) // len(depth), len(depth)]) 28 | 29 | 30 | def set_single_plt(): 31 | fig = plt.figure(figsize=(8, 3)) 32 | plt.rcParams["xtick.direction"] = "in" 33 | plt.rcParams["ytick.direction"] = "in" 34 | plt.rcParams["axes.axisbelow"] = True 35 | plt.rcParams["font.family"] = "serif" 36 | plt.rcParams["font.serif"] = ["Arial"] 37 | plt.rcParams["mathtext.fontset"] = "cm" 38 | plt.rcParams["font.size"] = 16 39 | plt.rcParams["hatch.linewidth"] = 0.90 40 | return fig 41 | 42 | 43 | def plot_figure(ax, param, data): 44 | ax.plot( 45 | param, 46 | data[0], 47 | marker="D", 48 | color="purple", 49 | label="Per-thread QP", 50 | linewidth=1, 51 | ms=8, 52 | markerfacecolor="white", 53 | ) 54 | ax.plot( 55 | param, 56 | data[1], 57 | marker="<", 58 | color="brown", 59 | label="+ThdResAlloc", 60 | linewidth=1, 61 | ms=8, 62 | markerfacecolor="white", 63 | ) 64 | ax.plot( 65 | param, 66 | data[2], 67 | marker="v", 68 | color="darkblue", 69 | label="+WorkReqThrot", 70 | linewidth=1, 71 | ms=8, 72 | markerfacecolor="white", 73 | ) 74 | ax.grid(linestyle="-.") 75 | 76 | 77 | def draw_graph(path): 78 | fig = set_single_plt() 79 | ax = fig.add_subplot(121) 80 | ax.set_title("(a)") 81 | data = load_dataset(common.ae_data_path + "/fig13a.csv") 82 | plot_figure(ax, threads, data) 83 | ax.set_xlim([0, 100]) 84 | ax.set_xlabel("Thread Count") 85 | ax.set_ylabel("Throughput (MOP/s)") 86 | ax.set_ylim([0, 150]) 87 | ax.set_yticks([0, 50, 100, 150]) 88 | 89 | h1, l1 = ax.get_legend_handles_labels() 90 | plt.legend( 91 | h1, 92 | l1, 93 | bbox_to_anchor=(0.0, 1.20, 2.2, 0.7), 94 | loc="lower left", 95 | mode="expand", 96 | borderaxespad=0, 97 | frameon=False, 98 | ncol=4, 99 | handletextpad=0.3, 100 | prop={"size": 16}, 101 | ) 102 | 103 | ax = fig.add_subplot(122) 104 | ax.set_title("(b)") 105 | data = load_dataset_b(common.ae_data_path + "/fig13b.csv") 106 | plot_figure(ax, depth, data) 107 | ax.set_xlim([0, 33]) 108 | ax.set_xticks([0, 8, 16, 24, 32]) 109 | ax.set_xlabel("Work Request Batch Size") 110 | ax.set_ylim([0, 150]) 111 | ax.set_yticks([0, 50, 100, 150]) 112 | 113 | plt.tight_layout() 114 | plt.savefig(path, bbox_inches="tight", pad_inches=0) 115 | plt.close() 116 | 117 | 118 | draw_graph(common.ae_figure_path + "/fig13.pdf") 119 | -------------------------------------------------------------------------------- /ae/plot/fig3.py: -------------------------------------------------------------------------------- 1 | import common 2 | import matplotlib.pyplot as plt 3 | from matplotlib.pyplot import MultipleLocator 4 | import numpy as np 5 | from matplotlib import gridspec 6 | import csv 7 | 8 | threads = common.thread_set 9 | 10 | def load_dataset(dataset_path): 11 | with open(dataset_path) as dataset: 12 | data_reader = csv.reader(dataset, delimiter=",") 13 | table = [] 14 | for data in data_reader: 15 | table.append(float(data[5])) 16 | return np.reshape(table, [len(table) // len(threads), len(threads)]) 17 | 18 | 19 | def set_single_plt(): 20 | fig = plt.figure(figsize=(8, 3.5)) 21 | plt.rcParams["xtick.direction"] = "in" 22 | plt.rcParams["ytick.direction"] = "in" 23 | plt.rcParams["axes.axisbelow"] = True 24 | plt.rcParams["font.family"] = "serif" 25 | plt.rcParams["font.serif"] = ["Arial"] 26 | plt.rcParams["mathtext.fontset"] = "cm" 27 | plt.rcParams["font.size"] = 17 28 | plt.rcParams["hatch.linewidth"] = 0.90 29 | return fig 30 | 31 | 32 | def plot_figure(ax, dataset): 33 | shared_qp = dataset[0] 34 | multiplexed_qp_4 = dataset[1] 35 | multiplexed_qp_2 = dataset[2] 36 | per_thread_qp = dataset[3] 37 | per_thread_doorbell = dataset[4] 38 | ax.plot( 39 | threads, 40 | shared_qp, 41 | marker="^", 42 | color="orange", 43 | label="Shared QP", 44 | linewidth=1, 45 | ms=8, 46 | markerfacecolor="white", 47 | ) 48 | ax.plot( 49 | threads, 50 | per_thread_qp, 51 | marker="D", 52 | color="black", 53 | label="Per-thread QP", 54 | linewidth=1, 55 | ms=8, 56 | markerfacecolor="white", 57 | ) 58 | ax.plot( 59 | threads, 60 | multiplexed_qp_2, 61 | marker="s", 62 | color="red", 63 | label="Multiplexed QP ($q=2$)", 64 | linewidth=1, 65 | ms=8, 66 | markerfacecolor="white", 67 | ) 68 | ax.plot( 69 | threads, 70 | multiplexed_qp_4, 71 | marker="<", 72 | color="brown", 73 | label="Multiplexed QP ($q=4$)", 74 | linewidth=1, 75 | ms=8, 76 | markerfacecolor="white", 77 | ) 78 | ax.plot( 79 | threads, 80 | per_thread_doorbell, 81 | marker=">", 82 | color="purple", 83 | label="Per-thread Doorbell", 84 | linewidth=1, 85 | ms=8, 86 | markerfacecolor="white", 87 | ) 88 | ax.grid(linestyle="-.") 89 | 90 | 91 | def draw_graph(figure_path): 92 | fig = set_single_plt() 93 | 94 | ax = fig.add_subplot(121) 95 | ax.set_title("(a) 8-byte READ", size=18) 96 | data = load_dataset(common.ae_data_path + "/fig3a.csv") 97 | plot_figure(ax, data) 98 | ax.set_xlabel("Thread Count") 99 | ax.set_xlim([0, 100]) 100 | ax.set_ylabel("Throughput (MOP/s)") 101 | ax.set_ylim([0, 120]) 102 | ax.set_yticks([0, 40, 80, 120]) 103 | plt.legend( 104 | bbox_to_anchor=(-0.2, 1.15, 2.55, 0.7), 105 | loc="lower left", 106 | mode="expand", 107 | borderaxespad=0, 108 | frameon=False, 109 | ncol=3, 110 | handletextpad=0.1, 111 | prop={"size": 16}, 112 | ) 113 | 114 | ax = fig.add_subplot(122) 115 | ax.set_title("(b) 8-byte WRITE", size=18) 116 | data = load_dataset(common.ae_data_path + "/fig3b.csv") 117 | plot_figure(ax, data) 118 | ax.set_xlabel("Thread Count") 119 | ax.set_xlim([0, 100]) 120 | ax.set_ylim([0, 100]) 121 | ax.set_yticks([0, 50, 100]) 122 | 123 | plt.tight_layout() 124 | plt.savefig(figure_path, bbox_inches="tight", pad_inches=0) 125 | plt.close() 126 | 127 | 128 | draw_graph(common.ae_figure_path + "/fig3.pdf") 129 | -------------------------------------------------------------------------------- /ae/plot/fig8.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | from matplotlib.pyplot import MultipleLocator 3 | import numpy as np 4 | import csv 5 | from matplotlib.ticker import StrMethodFormatter, NullFormatter 6 | from matplotlib import gridspec 7 | import common 8 | 9 | # Configuration 10 | threads = common.thread_set 11 | 12 | 13 | # DO NOT CHANGE BELOW 14 | def load_dataset(dataset_path): 15 | with open(dataset_path) as dataset: 16 | data_reader = csv.reader(dataset, delimiter=",") 17 | table = [] 18 | for data in data_reader: 19 | table.append(float(data[7])) 20 | return np.reshape(table, [len(table) // len(threads), len(threads)]) 21 | 22 | 23 | def set_single_plt(): 24 | fig = plt.figure(figsize=(8, 3)) 25 | plt.rcParams["xtick.direction"] = "in" 26 | plt.rcParams["ytick.direction"] = "in" 27 | plt.rcParams["axes.axisbelow"] = True 28 | plt.rcParams["font.family"] = "serif" 29 | plt.rcParams["font.serif"] = ["Arial"] 30 | plt.rcParams["mathtext.fontset"] = "cm" 31 | plt.rcParams["font.size"] = 18 32 | plt.rcParams["hatch.linewidth"] = 0.90 33 | return fig 34 | 35 | 36 | def plot_figure(ax, data): 37 | ax.plot( 38 | threads, 39 | data[0], 40 | marker="D", 41 | color="purple", 42 | label="RACE", 43 | linewidth=1, 44 | ms=8, 45 | markerfacecolor="white", 46 | ) 47 | ax.plot( 48 | threads, 49 | data[1], 50 | marker="s", 51 | color="red", 52 | label="O1: +ThdResAlloc", 53 | linewidth=1, 54 | ms=8, 55 | markerfacecolor="white", 56 | ) 57 | ax.plot( 58 | threads, 59 | data[2], 60 | marker="<", 61 | color="brown", 62 | label="O2: O1+WorkReqThrot", 63 | linewidth=1, 64 | ms=8, 65 | markerfacecolor="white", 66 | ) 67 | ax.plot( 68 | threads, 69 | data[3], 70 | marker="v", 71 | color="darkblue", 72 | label="O3: O2+ConflictAvoid", 73 | linewidth=1, 74 | ms=8, 75 | markerfacecolor="white", 76 | ) 77 | ax.set_xlim([0, 100]) 78 | ax.grid(linestyle="-.") 79 | 80 | 81 | def draw_graph(path): 82 | fig = set_single_plt() 83 | gs = gridspec.GridSpec(1, 3, width_ratios=[2, 2, 2]) 84 | ax = fig.add_subplot(gs[0]) 85 | ax.set_title("(a) Write-heavy", size=18) 86 | data = load_dataset(common.ae_data_path + "/fig8-ycsb-a.csv") 87 | plot_figure(ax, data) 88 | ax.set_ylabel("Throughput (MOP/s)") 89 | ax.set_ylim([0, 8]) 90 | ax.set_yticks([0, 4, 8]) 91 | 92 | h1, l1 = ax.get_legend_handles_labels() 93 | plt.legend( 94 | h1, 95 | l1, 96 | bbox_to_anchor=(0.05, 1.20, 3.2, 0.7), 97 | loc="lower left", 98 | mode="expand", 99 | borderaxespad=0, 100 | frameon=False, 101 | ncol=2, 102 | handletextpad=0.3, 103 | ) 104 | 105 | ax = fig.add_subplot(gs[1]) 106 | ax.set_title("(b) Read-heavy", size=18) 107 | data = load_dataset(common.ae_data_path + "/fig8-ycsb-b.csv") 108 | plot_figure(ax, data) 109 | ax.set_xlabel("Thread Count") 110 | ax.set_ylim([0, 30]) 111 | ax.set_yticks([0, 10, 20, 30]) 112 | 113 | ax = fig.add_subplot(gs[2]) 114 | ax.set_title("(c) Read-only", size=18) 115 | data = load_dataset(common.ae_data_path + "/fig8-ycsb-c.csv") 116 | plot_figure(ax, data) 117 | ax.set_ylim([0, 30]) 118 | ax.set_yticks([0, 10, 20, 30]) 119 | 120 | plt.tight_layout(pad=0) 121 | plt.savefig(path, bbox_inches="tight", pad_inches=0) 122 | plt.close() 123 | 124 | 125 | draw_graph(common.ae_figure_path + "/fig8.pdf") 126 | -------------------------------------------------------------------------------- /ae/plot/fig9.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | from matplotlib.pyplot import MultipleLocator 3 | import numpy as np 4 | import csv 5 | from matplotlib.ticker import StrMethodFormatter, NullFormatter 6 | import common 7 | 8 | # DO NOT CHANGE BELOW 9 | def load_dataset(dataset_path, type): 10 | with open(dataset_path) as dataset: 11 | data_reader = csv.reader(dataset, delimiter=",") 12 | table = [] 13 | for data in data_reader: 14 | if type == 0: 15 | table.append( 16 | [float(data[7]), float(data[8])] 17 | ) 18 | else: 19 | table.append( 20 | [float(data[7]), float(data[9])] 21 | ) 22 | return np.transpose(table).tolist() 23 | 24 | 25 | def set_single_plt(): 26 | fig = plt.figure(figsize=(8.0, 2.15)) 27 | plt.rcParams["xtick.direction"] = "in" 28 | plt.rcParams["ytick.direction"] = "in" 29 | plt.rcParams["axes.axisbelow"] = True 30 | plt.rcParams["font.family"] = "serif" 31 | plt.rcParams["font.serif"] = ["Arial"] 32 | plt.rcParams["mathtext.fontset"] = "cm" 33 | plt.rcParams["font.size"] = 17 34 | plt.rcParams["hatch.linewidth"] = 0.90 35 | return fig 36 | 37 | 38 | def plot_figure2(ax, data): 39 | half = len(data[0]) // 2 40 | ax.plot( 41 | data[0][:half], 42 | data[1][:half], 43 | marker="D", 44 | color="purple", 45 | linewidth=1, 46 | ms=8, 47 | markerfacecolor="white", 48 | ) 49 | ax.plot( 50 | data[0][half:], 51 | data[1][half:], 52 | marker="v", 53 | color="darkblue", 54 | label="SMART-HT", 55 | linewidth=1, 56 | ms=8, 57 | markerfacecolor="white", 58 | ) 59 | ax.grid(linestyle="-.") 60 | 61 | 62 | def plot_figure(ax, data): 63 | half = len(data[0]) // 2 64 | ax.plot( 65 | data[0][:half], 66 | data[1][:half], 67 | marker="D", 68 | color="purple", 69 | label="RACE", 70 | linewidth=1, 71 | ms=8, 72 | markerfacecolor="white", 73 | ) 74 | ax.plot( 75 | data[0][half:], 76 | data[1][half:], 77 | marker="v", 78 | color="darkblue", 79 | linewidth=1, 80 | ms=8, 81 | markerfacecolor="white", 82 | ) 83 | ax.grid(linestyle="-.") 84 | 85 | 86 | def draw_graph(path): 87 | fig = set_single_plt() 88 | ax = fig.add_subplot(121) 89 | data = load_dataset(common.ae_data_path + "/fig9.csv", 0) 90 | plot_figure(ax, data) 91 | ax.set_ylabel("Median Latency\n($\mu$s)") 92 | ax.set_xlabel("Throughput (MOP/s)") 93 | ax.set_ylim([0, 120]) 94 | ax.set_xlim([0, 16]) 95 | ax.set_xticks([0, 4, 8, 12, 16]) 96 | ax.set_yticks([0, 30, 60, 90, 120]) 97 | h1, l1 = ax.get_legend_handles_labels() 98 | plt.legend(h1, l1, borderaxespad=0, frameon=False, ncol=1, handletextpad=0.3) 99 | 100 | ax = fig.add_subplot(122) 101 | data = load_dataset(common.ae_data_path + "/fig9.csv", 1) 102 | plot_figure2(ax, data) 103 | ax.set_ylabel("Tail Latency\n($\mu$s)") 104 | ax.set_xlabel("Throughput (MOP/s)") 105 | ax.set_ylim([0, 400]) 106 | ax.set_xlim([0, 16]) 107 | ax.set_xticks([0, 4, 8, 12, 16]) 108 | ax.set_yticks([0, 100, 200, 300, 400]) 109 | h1, l1 = ax.get_legend_handles_labels() 110 | plt.legend(h1, l1, borderaxespad=0, frameon=False, ncol=1, handletextpad=0.3) 111 | 112 | plt.tight_layout(pad=0) 113 | plt.savefig(path, bbox_inches="tight", pad_inches=0) 114 | plt.close() 115 | 116 | 117 | draw_graph(common.ae_figure_path + "/fig9.pdf") 118 | -------------------------------------------------------------------------------- /ae/plot/runall.sh: -------------------------------------------------------------------------------- 1 | mkdir -p ../ae/figure 2 | python3 ../ae/plot/fig3.py 3 | python3 ../ae/plot/fig4.py 4 | python3 ../ae/plot/fig5.py 5 | python3 ../ae/plot/fig7.py 6 | python3 ../ae/plot/fig8.py 7 | python3 ../ae/plot/fig9.py 8 | python3 ../ae/plot/fig10.py 9 | python3 ../ae/plot/fig11.py 10 | python3 ../ae/plot/fig12.py 11 | python3 ../ae/plot/fig13.py 12 | python3 ../ae/plot/fig14.py 13 | -------------------------------------------------------------------------------- /ae/raw-reference/fig10-smallbank.csv: -------------------------------------------------------------------------------- 1 | ford-smallbank, 1, 8, 0.247, 0.212, 34.834, 61.789, 0.141, 13.107, 3.237 2 | ford-smallbank, 8, 8, 1.232, 1.044, 48.813, 96.889, 0.152, 13.049, 16.079 3 | ford-smallbank, 16, 8, 1.862, 1.559, 64.098, 130.205, 0.163, 13.007, 24.225 4 | ford-smallbank, 24, 8, 2.563, 2.120, 65.839, 139.377, 0.173, 12.976, 33.258 5 | ford-smallbank, 32, 8, 1.837, 1.505, 107.742, 275.112, 0.181, 12.965, 23.820 6 | ford-smallbank, 40, 8, 1.561, 1.269, 142.576, 468.516, 0.187, 12.973, 20.256 7 | ford-smallbank, 48, 8, 1.784, 1.433, 151.471, 484.503, 0.197, 12.945, 23.091 8 | ford-smallbank, 56, 8, 1.442, 1.147, 232.083, 717.048, 0.205, 12.931, 18.651 9 | ford-smallbank, 64, 8, 1.443, 1.139, 264.612, 881.875, 0.211, 12.943, 18.681 10 | ford-smallbank, 72, 8, 1.372, 1.071, 284.264, 1024.717, 0.219, 12.930, 17.739 11 | ford-smallbank, 80, 8, 1.272, 0.988, 329.840, 1593.117, 0.223, 12.969, 16.495 12 | ford-smallbank, 88, 8, 0.721, 0.558, 489.324, 2338.866, 0.226, 13.029, 9.398 13 | ford-smallbank, 96, 8, 1.055, 0.803, 449.839, 1645.398, 0.239, 12.954, 13.666 14 | dtx-smallbank, 1, 8, 0.238, 0.204, 34.271, 82.990, 0.143, 13.092, 3.113 15 | dtx-smallbank, 8, 8, 1.114, 0.944, 47.173, 127.068, 0.152, 13.055, 14.540 16 | dtx-smallbank, 16, 8, 2.255, 1.889, 49.046, 141.097, 0.162, 13.019, 29.361 17 | dtx-smallbank, 24, 8, 3.084, 2.550, 52.853, 130.570, 0.173, 12.976, 40.024 18 | dtx-smallbank, 32, 8, 3.738, 3.056, 61.298, 150.521, 0.183, 12.948, 48.403 19 | dtx-smallbank, 40, 8, 4.396, 3.552, 59.530, 157.885, 0.192, 12.922, 56.799 20 | dtx-smallbank, 48, 8, 4.941, 3.939, 75.058, 181.808, 0.203, 12.873, 63.608 21 | dtx-smallbank, 56, 8, 5.305, 4.190, 76.445, 192.438, 0.210, 12.868, 68.269 22 | dtx-smallbank, 64, 8, 5.470, 4.265, 87.872, 209.557, 0.220, 12.832, 70.188 23 | dtx-smallbank, 72, 8, 6.043, 4.648, 100.844, 230.794, 0.231, 12.790, 77.286 24 | dtx-smallbank, 80, 8, 6.020, 4.575, 113.274, 255.767, 0.240, 12.764, 76.830 25 | dtx-smallbank, 88, 8, 6.149, 4.618, 125.136, 278.765, 0.249, 12.739, 78.331 26 | dtx-smallbank, 96, 8, 6.236, 4.628, 137.234, 295.179, 0.258, 12.715, 79.298 27 | -------------------------------------------------------------------------------- /ae/raw-reference/fig10-tatp.csv: -------------------------------------------------------------------------------- 1 | ford-tatp, 1, 8, 0.517, 0.388, 8.744, 57.060, 0.249, 3.347, 1.730 2 | ford-tatp, 8, 8, 2.635, 1.973, 13.171, 84.720, 0.251, 3.359, 8.852 3 | ford-tatp, 16, 8, 4.366, 3.264, 14.947, 96.384, 0.252, 3.374, 14.733 4 | ford-tatp, 24, 8, 6.028, 4.501, 16.102, 104.857, 0.253, 3.393, 20.450 5 | ford-tatp, 32, 8, 5.770, 4.305, 21.639, 146.117, 0.254, 3.411, 19.680 6 | ford-tatp, 40, 8, 5.306, 3.955, 27.280, 207.407, 0.255, 3.428, 18.188 7 | ford-tatp, 48, 8, 6.236, 4.644, 28.194, 198.060, 0.255, 3.446, 21.490 8 | ford-tatp, 56, 8, 3.751, 2.792, 40.172, 461.429, 0.256, 3.467, 13.003 9 | ford-tatp, 64, 8, 4.371, 3.250, 50.852, 465.275, 0.256, 3.483, 15.222 10 | ford-tatp, 72, 8, 4.315, 3.206, 52.431, 478.620, 0.257, 3.502, 15.110 11 | ford-tatp, 80, 8, 3.293, 2.446, 76.774, 764.524, 0.257, 3.524, 11.604 12 | ford-tatp, 88, 8, 2.545, 1.890, 93.692, 1162.099, 0.257, 3.546, 9.025 13 | ford-tatp, 96, 8, 2.913, 2.160, 94.150, 913.137, 0.258, 3.558, 10.363 14 | dtx-tatp, 1, 8, 0.495, 0.370, 7.899, 60.767, 0.251, 3.324, 1.644 15 | dtx-tatp, 8, 8, 2.631, 1.967, 11.314, 84.630, 0.252, 3.350, 8.814 16 | dtx-tatp, 16, 8, 4.623, 3.453, 12.671, 92.003, 0.253, 3.369, 15.575 17 | dtx-tatp, 24, 8, 6.151, 4.590, 13.719, 99.926, 0.254, 3.389, 20.843 18 | dtx-tatp, 32, 8, 7.389, 5.510, 15.851, 117.565, 0.254, 3.409, 25.187 19 | dtx-tatp, 40, 8, 8.023, 5.978, 19.350, 141.899, 0.255, 3.427, 27.498 20 | dtx-tatp, 48, 8, 8.056, 5.998, 21.711, 202.700, 0.256, 3.458, 27.860 21 | dtx-tatp, 56, 8, 8.215, 6.111, 24.577, 221.541, 0.256, 3.471, 28.517 22 | dtx-tatp, 64, 8, 8.709, 6.474, 29.267, 221.081, 0.257, 3.486, 30.360 23 | dtx-tatp, 72, 8, 8.955, 6.653, 32.926, 249.228, 0.257, 3.507, 31.401 24 | dtx-tatp, 80, 8, 9.022, 6.696, 36.710, 278.236, 0.258, 3.524, 31.796 25 | dtx-tatp, 88, 8, 8.946, 6.634, 41.079, 309.086, 0.258, 3.543, 31.695 26 | dtx-tatp, 96, 8, 8.782, 6.504, 40.491, 728.653, 0.259, 3.631, 31.890 27 | -------------------------------------------------------------------------------- /ae/raw-reference/fig11-smallbank.csv: -------------------------------------------------------------------------------- 1 | ford-smallbank, 96, 8, 1.176, 0.893, 453.584, 1536.131, 0.241, 12.935, 15.215 2 | ford-smallbank, 96, 8, 1.223, 0.939, 385.309, 1307.117, 0.232, 13.036, 15.938 3 | ford-smallbank, 96, 8, 1.182, 0.913, 380.472, 1245.651, 0.228, 13.085, 15.470 4 | ford-smallbank, 96, 8, 1.242, 0.963, 368.263, 1288.006, 0.225, 13.123, 16.297 5 | ford-smallbank, 96, 8, 1.304, 1.028, 246.559, 1271.028, 0.212, 13.296, 17.341 6 | ford-smallbank, 96, 8, 1.141, 0.915, 198.076, 1116.707, 0.197, 13.474, 15.370 7 | ford-smallbank, 96, 8, 1.491, 1.264, 33.617, 158.092, 0.152, 14.038, 20.937 8 | ford-smallbank, 96, 8, 0.845, 0.722, 23.443, 54.536, 0.145, 14.129, 11.932 9 | ford-smallbank, 96, 8, 0.429, 0.367, 21.236, 43.116, 0.143, 14.156, 6.067 10 | ford-smallbank, 96, 8, 0.216, 0.185, 20.587, 39.874, 0.142, 14.163, 3.052 11 | ford-smallbank, 96, 8, 0.108, 0.093, 20.942, 39.877, 0.142, 14.162, 1.531 12 | dtx-smallbank, 96, 8, 6.122, 4.541, 137.484, 287.923, 0.258, 12.712, 77.822 13 | dtx-smallbank, 96, 8, 6.006, 4.585, 107.992, 269.219, 0.237, 12.974, 77.925 14 | dtx-smallbank, 96, 8, 5.759, 4.454, 96.605, 249.525, 0.227, 13.101, 75.452 15 | dtx-smallbank, 96, 8, 5.235, 4.137, 79.752, 203.970, 0.210, 13.311, 69.686 16 | dtx-smallbank, 96, 8, 4.060, 3.279, 68.907, 167.693, 0.192, 13.528, 54.925 17 | dtx-smallbank, 96, 8, 2.648, 2.179, 60.798, 138.550, 0.177, 13.716, 36.325 18 | dtx-smallbank, 96, 8, 1.557, 1.313, 32.836, 108.256, 0.156, 13.982, 21.766 19 | dtx-smallbank, 96, 8, 0.845, 0.722, 23.520, 56.947, 0.146, 14.119, 11.931 20 | dtx-smallbank, 96, 8, 0.429, 0.368, 20.034, 42.344, 0.143, 14.150, 6.072 21 | dtx-smallbank, 96, 8, 0.216, 0.185, 19.726, 42.678, 0.143, 14.159, 3.056 22 | dtx-smallbank, 96, 8, 0.108, 0.093, 19.137, 40.688, 0.142, 14.163, 1.533 23 | -------------------------------------------------------------------------------- /ae/raw-reference/fig11-tatp.csv: -------------------------------------------------------------------------------- 1 | ford-tatp, 96, 8, 3.737, 2.780, 86.495, 856.746, 0.256, 3.592, 13.423 2 | ford-tatp, 96, 8, 4.672, 3.471, 52.882, 467.998, 0.257, 3.573, 16.691 3 | ford-tatp, 96, 8, 4.338, 3.225, 50.322, 468.229, 0.257, 3.574, 15.506 4 | ford-tatp, 96, 8, 4.743, 3.530, 41.238, 297.811, 0.256, 3.581, 16.985 5 | ford-tatp, 96, 8, 4.553, 3.395, 29.796, 194.214, 0.254, 3.593, 16.361 6 | ford-tatp, 96, 8, 3.193, 2.385, 20.378, 134.282, 0.253, 3.605, 11.510 7 | ford-tatp, 96, 8, 1.870, 1.399, 12.119, 75.560, 0.252, 3.612, 6.755 8 | ford-tatp, 96, 8, 0.972, 0.727, 8.538, 53.977, 0.252, 3.613, 3.510 9 | ford-tatp, 96, 8, 0.492, 0.368, 6.701, 44.669, 0.252, 3.613, 1.779 10 | ford-tatp, 96, 8, 0.247, 0.185, 5.675, 39.821, 0.252, 3.613, 0.894 11 | ford-tatp, 96, 8, 0.124, 0.093, 5.948, 42.782, 0.252, 3.613, 0.448 12 | dtx-tatp, 96, 8, 8.835, 6.540, 43.990, 405.231, 0.260, 3.578, 31.614 13 | dtx-tatp, 96, 8, 8.023, 5.955, 36.118, 285.178, 0.258, 3.566, 28.610 14 | dtx-tatp, 96, 8, 7.393, 5.493, 36.927, 243.968, 0.257, 3.571, 26.398 15 | dtx-tatp, 96, 8, 6.332, 4.713, 32.752, 220.027, 0.256, 3.581, 22.677 16 | dtx-tatp, 96, 8, 4.944, 3.686, 27.085, 170.772, 0.254, 3.592, 17.759 17 | dtx-tatp, 96, 8, 3.275, 2.446, 19.400, 122.862, 0.253, 3.604, 11.800 18 | dtx-tatp, 96, 8, 1.857, 1.388, 12.365, 77.659, 0.252, 3.609, 6.702 19 | dtx-tatp, 96, 8, 0.973, 0.728, 7.720, 49.851, 0.252, 3.612, 3.515 20 | dtx-tatp, 96, 8, 0.492, 0.368, 6.562, 44.370, 0.252, 3.613, 1.778 21 | dtx-tatp, 96, 8, 0.247, 0.185, 5.686, 40.424, 0.252, 3.613, 0.893 22 | dtx-tatp, 96, 8, 0.124, 0.093, 5.976, 43.470, 0.252, 3.613, 0.448 23 | -------------------------------------------------------------------------------- /ae/raw-reference/fig12-ycsb-a.csv: -------------------------------------------------------------------------------- 1 | BPlusTree, ycsb-a, 1, 8, 8, 8, 100000000, 0.421, 2.377, -1.000 2 | BPlusTree, ycsb-a, 8, 8, 8, 8, 100000000, 2.928, 2.732, -1.000 3 | BPlusTree, ycsb-a, 16, 8, 8, 8, 100000000, 4.331, 3.695, -1.000 4 | BPlusTree, ycsb-a, 24, 8, 8, 8, 100000000, 4.848, 4.951, -1.000 5 | BPlusTree, ycsb-a, 32, 8, 8, 8, 100000000, 5.074, 6.306, -1.000 6 | BPlusTree, ycsb-a, 40, 8, 8, 8, 100000000, 5.072, 7.886, -1.000 7 | BPlusTree, ycsb-a, 48, 8, 8, 8, 100000000, 4.899, 9.797, -1.000 8 | BPlusTree, ycsb-a, 56, 8, 8, 8, 100000000, 4.604, 12.165, -1.000 9 | BPlusTree, ycsb-a, 64, 8, 8, 8, 100000000, 4.554, 14.053, -1.000 10 | BPlusTree, ycsb-a, 72, 8, 8, 8, 100000000, 4.448, 16.186, -1.000 11 | BPlusTree, ycsb-a, 80, 8, 8, 8, 100000000, 4.344, 18.416, -1.000 12 | BPlusTree, ycsb-a, 88, 8, 8, 8, 100000000, 4.314, 20.401, -1.000 13 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.290, 21.912, -1.000 14 | BPlusTree, ycsb-a, 1, 8, 8, 8, 100000000, 0.445, 2.249, -1.000 15 | BPlusTree, ycsb-a, 8, 8, 8, 8, 100000000, 3.135, 2.552, -1.000 16 | BPlusTree, ycsb-a, 16, 8, 8, 8, 100000000, 4.549, 3.517, -1.000 17 | BPlusTree, ycsb-a, 24, 8, 8, 8, 100000000, 5.103, 4.704, -1.000 18 | BPlusTree, ycsb-a, 32, 8, 8, 8, 100000000, 5.320, 6.015, -1.000 19 | BPlusTree, ycsb-a, 40, 8, 8, 8, 100000000, 5.264, 7.599, -1.000 20 | BPlusTree, ycsb-a, 48, 8, 8, 8, 100000000, 5.018, 9.566, -1.000 21 | BPlusTree, ycsb-a, 56, 8, 8, 8, 100000000, 4.762, 11.760, -1.000 22 | BPlusTree, ycsb-a, 64, 8, 8, 8, 100000000, 4.708, 13.593, -1.000 23 | BPlusTree, ycsb-a, 72, 8, 8, 8, 100000000, 4.639, 15.520, -1.000 24 | BPlusTree, ycsb-a, 80, 8, 8, 8, 100000000, 4.394, 18.206, -1.000 25 | BPlusTree, ycsb-a, 88, 8, 8, 8, 100000000, 4.414, 19.935, -1.000 26 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.462, 21.066, -1.000 27 | BPlusTree, ycsb-a, 1, 8, 8, 8, 100000000, 0.438, 2.282, -1.000 28 | BPlusTree, ycsb-a, 8, 8, 8, 8, 100000000, 2.918, 2.742, -1.000 29 | BPlusTree, ycsb-a, 16, 8, 8, 8, 100000000, 4.349, 3.679, -1.000 30 | BPlusTree, ycsb-a, 24, 8, 8, 8, 100000000, 5.309, 4.521, -1.000 31 | BPlusTree, ycsb-a, 32, 8, 8, 8, 100000000, 5.613, 5.701, -1.000 32 | BPlusTree, ycsb-a, 40, 8, 8, 8, 100000000, 5.637, 7.096, -1.000 33 | BPlusTree, ycsb-a, 48, 8, 8, 8, 100000000, 5.637, 8.515, -1.000 34 | BPlusTree, ycsb-a, 56, 8, 8, 8, 100000000, 5.381, 10.406, -1.000 35 | BPlusTree, ycsb-a, 64, 8, 8, 8, 100000000, 5.177, 12.362, -1.000 36 | BPlusTree, ycsb-a, 72, 8, 8, 8, 100000000, 5.120, 14.063, -1.000 37 | BPlusTree, ycsb-a, 80, 8, 8, 8, 100000000, 5.017, 15.945, -1.000 38 | BPlusTree, ycsb-a, 88, 8, 8, 8, 100000000, 5.048, 17.431, -1.000 39 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.997, 18.810, -1.000 40 | -------------------------------------------------------------------------------- /ae/raw-reference/fig12-ycsb-b.csv: -------------------------------------------------------------------------------- 1 | BPlusTree, ycsb-b, 1, 8, 8, 8, 100000000, 0.628, 1.592, -1.000 2 | BPlusTree, ycsb-b, 8, 8, 8, 8, 100000000, 4.281, 1.869, -1.000 3 | BPlusTree, ycsb-b, 16, 8, 8, 8, 100000000, 8.379, 1.909, -1.000 4 | BPlusTree, ycsb-b, 24, 8, 8, 8, 100000000, 11.432, 2.099, -1.000 5 | BPlusTree, ycsb-b, 32, 8, 8, 8, 100000000, 11.359, 2.817, -1.000 6 | BPlusTree, ycsb-b, 40, 8, 8, 8, 100000000, 11.317, 3.535, -1.000 7 | BPlusTree, ycsb-b, 48, 8, 8, 8, 100000000, 11.379, 4.218, -1.000 8 | BPlusTree, ycsb-b, 56, 8, 8, 8, 100000000, 11.398, 4.913, -1.000 9 | BPlusTree, ycsb-b, 64, 8, 8, 8, 100000000, 11.352, 5.638, -1.000 10 | BPlusTree, ycsb-b, 72, 8, 8, 8, 100000000, 11.353, 6.342, -1.000 11 | BPlusTree, ycsb-b, 80, 8, 8, 8, 100000000, 11.386, 7.026, -1.000 12 | BPlusTree, ycsb-b, 88, 8, 8, 8, 100000000, 11.400, 7.719, -1.000 13 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 11.369, 8.268, -1.000 14 | BPlusTree, ycsb-b, 1, 8, 8, 8, 100000000, 0.762, 1.312, -1.000 15 | BPlusTree, ycsb-b, 8, 8, 8, 8, 100000000, 5.250, 1.524, -1.000 16 | BPlusTree, ycsb-b, 16, 8, 8, 8, 100000000, 9.692, 1.651, -1.000 17 | BPlusTree, ycsb-b, 24, 8, 8, 8, 100000000, 13.094, 1.833, -1.000 18 | BPlusTree, ycsb-b, 32, 8, 8, 8, 100000000, 16.474, 1.942, -1.000 19 | BPlusTree, ycsb-b, 40, 8, 8, 8, 100000000, 17.588, 2.274, -1.000 20 | BPlusTree, ycsb-b, 48, 8, 8, 8, 100000000, 18.043, 2.660, -1.000 21 | BPlusTree, ycsb-b, 56, 8, 8, 8, 100000000, 18.041, 3.104, -1.000 22 | BPlusTree, ycsb-b, 64, 8, 8, 8, 100000000, 16.984, 3.768, -1.000 23 | BPlusTree, ycsb-b, 72, 8, 8, 8, 100000000, 14.854, 4.847, -1.000 24 | BPlusTree, ycsb-b, 80, 8, 8, 8, 100000000, 13.894, 5.758, -1.000 25 | BPlusTree, ycsb-b, 88, 8, 8, 8, 100000000, 13.588, 6.476, -1.000 26 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 13.586, 6.919, -1.000 27 | BPlusTree, ycsb-b, 1, 8, 8, 8, 100000000, 0.750, 1.333, -1.000 28 | BPlusTree, ycsb-b, 8, 8, 8, 8, 100000000, 5.331, 1.501, -1.000 29 | BPlusTree, ycsb-b, 16, 8, 8, 8, 100000000, 10.961, 1.460, -1.000 30 | BPlusTree, ycsb-b, 24, 8, 8, 8, 100000000, 14.853, 1.616, -1.000 31 | BPlusTree, ycsb-b, 32, 8, 8, 8, 100000000, 19.173, 1.669, -1.000 32 | BPlusTree, ycsb-b, 40, 8, 8, 8, 100000000, 20.228, 1.978, -1.000 33 | BPlusTree, ycsb-b, 48, 8, 8, 8, 100000000, 21.250, 2.259, -1.000 34 | BPlusTree, ycsb-b, 56, 8, 8, 8, 100000000, 21.165, 2.646, -1.000 35 | BPlusTree, ycsb-b, 64, 8, 8, 8, 100000000, 20.961, 3.053, -1.000 36 | BPlusTree, ycsb-b, 72, 8, 8, 8, 100000000, 20.753, 3.469, -1.000 37 | BPlusTree, ycsb-b, 80, 8, 8, 8, 100000000, 20.901, 3.828, -1.000 38 | BPlusTree, ycsb-b, 88, 8, 8, 8, 100000000, 20.803, 4.230, -1.000 39 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 20.812, 4.517, -1.000 40 | -------------------------------------------------------------------------------- /ae/raw-reference/fig12-ycsb-c.csv: -------------------------------------------------------------------------------- 1 | BPlusTree, ycsb-c, 1, 8, 8, 8, 100000000, 0.681, 1.469, -1.000 2 | BPlusTree, ycsb-c, 8, 8, 8, 8, 100000000, 4.823, 1.659, -1.000 3 | BPlusTree, ycsb-c, 16, 8, 8, 8, 100000000, 9.136, 1.751, -1.000 4 | BPlusTree, ycsb-c, 24, 8, 8, 8, 100000000, 11.715, 2.049, -1.000 5 | BPlusTree, ycsb-c, 32, 8, 8, 8, 100000000, 11.618, 2.754, -1.000 6 | BPlusTree, ycsb-c, 40, 8, 8, 8, 100000000, 11.561, 3.460, -1.000 7 | BPlusTree, ycsb-c, 48, 8, 8, 8, 100000000, 11.659, 4.117, -1.000 8 | BPlusTree, ycsb-c, 56, 8, 8, 8, 100000000, 11.662, 4.802, -1.000 9 | BPlusTree, ycsb-c, 64, 8, 8, 8, 100000000, 11.624, 5.506, -1.000 10 | BPlusTree, ycsb-c, 72, 8, 8, 8, 100000000, 11.618, 6.197, -1.000 11 | BPlusTree, ycsb-c, 80, 8, 8, 8, 100000000, 11.649, 6.867, -1.000 12 | BPlusTree, ycsb-c, 88, 8, 8, 8, 100000000, 11.574, 7.603, -1.000 13 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 11.514, 8.164, -1.000 14 | BPlusTree, ycsb-c, 1, 8, 8, 8, 100000000, 0.844, 1.185, -1.000 15 | BPlusTree, ycsb-c, 8, 8, 8, 8, 100000000, 5.968, 1.341, -1.000 16 | BPlusTree, ycsb-c, 16, 8, 8, 8, 100000000, 10.401, 1.538, -1.000 17 | BPlusTree, ycsb-c, 24, 8, 8, 8, 100000000, 13.936, 1.722, -1.000 18 | BPlusTree, ycsb-c, 32, 8, 8, 8, 100000000, 18.106, 1.767, -1.000 19 | BPlusTree, ycsb-c, 40, 8, 8, 8, 100000000, 18.818, 2.126, -1.000 20 | BPlusTree, ycsb-c, 48, 8, 8, 8, 100000000, 21.776, 2.204, -1.000 21 | BPlusTree, ycsb-c, 56, 8, 8, 8, 100000000, 20.787, 2.694, -1.000 22 | BPlusTree, ycsb-c, 64, 8, 8, 8, 100000000, 20.697, 3.092, -1.000 23 | BPlusTree, ycsb-c, 72, 8, 8, 8, 100000000, 19.216, 3.747, -1.000 24 | BPlusTree, ycsb-c, 80, 8, 8, 8, 100000000, 18.601, 4.301, -1.000 25 | BPlusTree, ycsb-c, 88, 8, 8, 8, 100000000, 17.656, 4.984, -1.000 26 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 16.806, 5.593, -1.000 27 | BPlusTree, ycsb-c, 1, 8, 8, 8, 100000000, 0.825, 1.212, -1.000 28 | BPlusTree, ycsb-c, 8, 8, 8, 8, 100000000, 5.738, 1.394, -1.000 29 | BPlusTree, ycsb-c, 16, 8, 8, 8, 100000000, 11.532, 1.387, -1.000 30 | BPlusTree, ycsb-c, 24, 8, 8, 8, 100000000, 15.608, 1.538, -1.000 31 | BPlusTree, ycsb-c, 32, 8, 8, 8, 100000000, 20.720, 1.544, -1.000 32 | BPlusTree, ycsb-c, 40, 8, 8, 8, 100000000, 23.166, 1.727, -1.000 33 | BPlusTree, ycsb-c, 48, 8, 8, 8, 100000000, 23.184, 2.070, -1.000 34 | BPlusTree, ycsb-c, 56, 8, 8, 8, 100000000, 23.296, 2.404, -1.000 35 | BPlusTree, ycsb-c, 64, 8, 8, 8, 100000000, 23.257, 2.752, -1.000 36 | BPlusTree, ycsb-c, 72, 8, 8, 8, 100000000, 23.212, 3.102, -1.000 37 | BPlusTree, ycsb-c, 80, 8, 8, 8, 100000000, 23.186, 3.450, -1.000 38 | BPlusTree, ycsb-c, 88, 8, 8, 8, 100000000, 23.262, 3.783, -1.000 39 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 23.162, 4.058, -1.000 40 | -------------------------------------------------------------------------------- /ae/raw-reference/fig12a-ycsb-a.csv: -------------------------------------------------------------------------------- 1 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 3.784, 24.838, -1.000 2 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.496, 20.906, -1.000 3 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.589, 20.485, -1.000 4 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.657, 20.183, -1.000 5 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.658, 20.181, -1.000 6 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.625, 20.326, -1.000 7 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.569, 20.576, -1.000 8 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.546, 20.679, -1.000 9 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 3.856, 24.377, -1.000 10 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.604, 20.419, -1.000 11 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.763, 19.734, -1.000 12 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.800, 19.581, -1.000 13 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.738, 19.839, -1.000 14 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.653, 20.203, -1.000 15 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.657, 20.186, -1.000 16 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.473, 21.013, -1.000 17 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.234, 22.201, -1.000 18 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.929, 19.072, -1.000 19 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.909, 19.147, -1.000 20 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 5.223, 17.998, -1.000 21 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 5.212, 18.034, -1.000 22 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 5.232, 17.965, -1.000 23 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 5.075, 18.521, -1.000 24 | BPlusTree, ycsb-a, 94, 8, 8, 8, 100000000, 4.982, 18.868, -1.000 25 | -------------------------------------------------------------------------------- /ae/raw-reference/fig12a-ycsb-b.csv: -------------------------------------------------------------------------------- 1 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 11.409, 8.239, -1.000 2 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 18.077, 5.200, -1.000 3 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 25.358, 3.707, -1.000 4 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 27.210, 3.455, -1.000 5 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 29.642, 3.171, -1.000 6 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 31.913, 2.945, -1.000 7 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 32.245, 2.915, -1.000 8 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 32.478, 2.894, -1.000 9 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 14.418, 6.519, -1.000 10 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 17.433, 5.392, -1.000 11 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 22.877, 4.109, -1.000 12 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 29.566, 3.179, -1.000 13 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 31.844, 2.952, -1.000 14 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 33.556, 2.801, -1.000 15 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 34.196, 2.749, -1.000 16 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 34.692, 2.710, -1.000 17 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 19.812, 4.745, -1.000 18 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 30.647, 3.067, -1.000 19 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 33.749, 2.785, -1.000 20 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 37.055, 2.537, -1.000 21 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 38.934, 2.414, -1.000 22 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 40.260, 2.335, -1.000 23 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 41.325, 2.275, -1.000 24 | BPlusTree, ycsb-b, 94, 8, 8, 8, 100000000, 41.884, 2.244, -1.000 25 | -------------------------------------------------------------------------------- /ae/raw-reference/fig12a-ycsb-c.csv: -------------------------------------------------------------------------------- 1 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 11.405, 8.242, -1.000 2 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 21.415, 4.390, -1.000 3 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 29.315, 3.207, -1.000 4 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 40.007, 2.350, -1.000 5 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 53.883, 1.745, -1.000 6 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 38.427, 2.446, -1.000 7 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 46.640, 2.015, -1.000 8 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 51.449, 1.827, -1.000 9 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 17.549, 5.356, -1.000 10 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 24.164, 3.890, -1.000 11 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 29.302, 3.208, -1.000 12 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 41.296, 2.276, -1.000 13 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 58.652, 1.603, -1.000 14 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 38.352, 2.451, -1.000 15 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 43.329, 2.169, -1.000 16 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 51.835, 1.813, -1.000 17 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 23.106, 4.068, -1.000 18 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 45.906, 2.048, -1.000 19 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 66.953, 1.404, -1.000 20 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 89.667, 1.048, -1.000 21 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 109.614, 0.858, -1.000 22 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 123.977, 0.758, -1.000 23 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 144.279, 0.652, -1.000 24 | BPlusTree, ycsb-c, 94, 8, 8, 8, 100000000, 159.223, 0.590, -1.000 25 | -------------------------------------------------------------------------------- /ae/raw-reference/fig13a.csv: -------------------------------------------------------------------------------- 1 | rdma-read-per-qp, 1, 16, 8, 20.681, 2.711, 1148.258 2 | rdma-read-per-qp, 8, 16, 8, 165.369, 21.675, 1172.250 3 | rdma-read-per-qp, 16, 16, 8, 316.387, 41.469, 1161.039 4 | rdma-read-per-qp, 24, 16, 8, 352.460, 46.198, 1169.756 5 | rdma-read-per-qp, 32, 16, 8, 309.364, 40.549, 1176.351 6 | rdma-read-per-qp, 40, 16, 8, 254.608, 33.372, 1181.401 7 | rdma-read-per-qp, 48, 16, 8, 221.653, 29.052, 1192.060 8 | rdma-read-per-qp, 56, 16, 8, 199.141, 26.102, 1196.735 9 | rdma-read-per-qp, 64, 16, 8, 186.924, 24.500, 1209.533 10 | rdma-read-per-qp, 72, 16, 8, 177.463, 23.260, 1212.709 11 | rdma-read-per-qp, 80, 16, 8, 175.290, 22.976, 1219.563 12 | rdma-read-per-qp, 88, 16, 8, 172.183, 22.568, 1230.003 13 | rdma-read-per-qp, 96, 16, 8, 160.113, 20.986, 1239.714 14 | rdma-read-per-doorbell, 1, 16, 8, 19.375, 2.540, 1149.732 15 | rdma-read-per-doorbell, 8, 16, 8, 159.423, 20.896, 1150.083 16 | rdma-read-per-doorbell, 16, 16, 8, 317.046, 41.556, 1162.506 17 | rdma-read-per-doorbell, 24, 16, 8, 465.562, 61.022, 1171.114 18 | rdma-read-per-doorbell, 32, 16, 8, 592.423, 77.650, 1174.245 19 | rdma-read-per-doorbell, 40, 16, 8, 685.119, 89.800, 1184.368 20 | rdma-read-per-doorbell, 48, 16, 8, 785.361, 102.939, 1190.757 21 | rdma-read-per-doorbell, 56, 16, 8, 846.098, 110.900, 1202.099 22 | rdma-read-per-doorbell, 64, 16, 8, 845.852, 110.867, 1208.723 23 | rdma-read-per-doorbell, 72, 16, 8, 821.866, 107.724, 1219.264 24 | rdma-read-per-doorbell, 80, 16, 8, 757.569, 99.296, 1228.912 25 | rdma-read-per-doorbell, 88, 16, 8, 660.561, 86.581, 1233.579 26 | rdma-read-per-doorbell, 96, 16, 8, 611.425, 80.141, 1236.309 27 | rdma-read-work-req-throt, 1, 16, 8, 19.018, 2.493, 1155.941 28 | rdma-read-work-req-throt, 8, 16, 8, 159.132, 20.858, 1153.558 29 | rdma-read-work-req-throt, 16, 16, 8, 300.764, 39.422, 1164.557 30 | rdma-read-work-req-throt, 24, 16, 8, 445.985, 58.456, 1169.413 31 | rdma-read-work-req-throt, 32, 16, 8, 581.623, 76.234, 1177.702 32 | rdma-read-work-req-throt, 40, 16, 8, 667.003, 87.425, 1184.508 33 | rdma-read-work-req-throt, 48, 16, 8, 754.349, 98.874, 1192.680 34 | rdma-read-work-req-throt, 56, 16, 8, 829.294, 108.697, 1204.961 35 | rdma-read-work-req-throt, 64, 16, 8, 838.287, 109.876, 1211.244 36 | rdma-read-work-req-throt, 72, 16, 8, 819.364, 107.396, 1218.503 37 | rdma-read-work-req-throt, 80, 16, 8, 835.167, 109.467, 1224.358 38 | rdma-read-work-req-throt, 88, 16, 8, 842.396, 110.414, 1229.923 39 | rdma-read-work-req-throt, 96, 16, 8, 835.540, 109.516, 1248.494 40 | -------------------------------------------------------------------------------- /ae/raw-reference/fig13b.csv: -------------------------------------------------------------------------------- 1 | rdma-read-per-qp, 96, 1, 8, 120.914, 15.848, 1237.472 2 | rdma-read-per-qp, 96, 4, 8, 134.541, 17.635, 1242.488 3 | rdma-read-per-qp, 96, 8, 8, 141.512, 18.548, 1244.407 4 | rdma-read-per-qp, 96, 12, 8, 155.977, 20.444, 1246.151 5 | rdma-read-per-qp, 96, 16, 8, 162.923, 21.355, 1237.948 6 | rdma-read-per-qp, 96, 20, 8, 164.110, 21.510, 1243.528 7 | rdma-read-per-qp, 96, 24, 8, 169.534, 22.221, 1233.906 8 | rdma-read-per-qp, 96, 28, 8, 179.398, 23.514, 1240.775 9 | rdma-read-per-qp, 96, 32, 8, 174.012, 22.808, 1238.909 10 | rdma-read-per-doorbell, 96, 1, 8, 250.939, 32.891, 1244.093 11 | rdma-read-per-doorbell, 96, 4, 8, 616.099, 80.753, 1240.963 12 | rdma-read-per-doorbell, 96, 8, 8, 846.534, 110.957, 1244.969 13 | rdma-read-per-doorbell, 96, 12, 8, 797.392, 104.516, 1240.173 14 | rdma-read-per-doorbell, 96, 16, 8, 606.641, 79.514, 1243.924 15 | rdma-read-per-doorbell, 96, 20, 8, 677.606, 88.815, 1241.192 16 | rdma-read-per-doorbell, 96, 24, 8, 592.946, 77.719, 1243.227 17 | rdma-read-per-doorbell, 96, 28, 8, 504.341, 66.105, 1241.668 18 | rdma-read-per-doorbell, 96, 32, 8, 419.565, 54.993, 1243.711 19 | rdma-read-work-req-throt, 96, 1, 8, 250.268, 32.803, 1241.919 20 | rdma-read-work-req-throt, 96, 4, 8, 613.764, 80.447, 1257.209 21 | rdma-read-work-req-throt, 96, 8, 8, 843.049, 110.500, 1237.184 22 | rdma-read-work-req-throt, 96, 12, 8, 816.605, 107.034, 1244.087 23 | rdma-read-work-req-throt, 96, 16, 8, 831.559, 108.994, 1248.568 24 | rdma-read-work-req-throt, 96, 20, 8, 835.736, 109.542, 1242.434 25 | rdma-read-work-req-throt, 96, 24, 8, 835.539, 109.516, 1241.546 26 | rdma-read-work-req-throt, 96, 28, 8, 832.896, 109.169, 1245.027 27 | rdma-read-work-req-throt, 96, 32, 8, 833.847, 109.294, 1247.467 28 | -------------------------------------------------------------------------------- /ae/raw-reference/fig14.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, update-only, 1, 8, 8, 8, 100000000, 0.234, 4.267, -1.000 2 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 2.351, 6.805, -1.000 3 | HashTableMultiShard, update-only, 32, 8, 8, 8, 100000000, 1.134, 28.211, -1.000 4 | HashTableMultiShard, update-only, 48, 8, 8, 8, 100000000, 0.391, 122.649, -1.000 5 | HashTableMultiShard, update-only, 64, 8, 8, 8, 100000000, 0.223, 287.473, -1.000 6 | HashTableMultiShard, update-only, 80, 8, 8, 8, 100000000, 0.178, 449.690, -1.000 7 | HashTableMultiShard, update-only, 88, 8, 8, 8, 100000000, 0.171, 514.231, -1.000 8 | HashTableMultiShard, update-only, 96, 8, 8, 8, 100000000, 0.176, 544.211, -1.000 9 | HashTableMultiShard, update-only, 1, 8, 8, 8, 100000000, 0.237, 4.220, -1.000 10 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 1.737, 9.211, -1.000 11 | HashTableMultiShard, update-only, 32, 8, 8, 8, 100000000, 1.878, 17.043, -1.000 12 | HashTableMultiShard, update-only, 48, 8, 8, 8, 100000000, 1.699, 28.259, -1.000 13 | HashTableMultiShard, update-only, 64, 8, 8, 8, 100000000, 1.506, 42.496, -1.000 14 | HashTableMultiShard, update-only, 80, 8, 8, 8, 100000000, 1.472, 54.342, -1.000 15 | HashTableMultiShard, update-only, 88, 8, 8, 8, 100000000, 1.292, 68.111, -1.000 16 | HashTableMultiShard, update-only, 96, 8, 8, 8, 100000000, 1.429, 67.190, -1.000 17 | HashTableMultiShard, update-only, 1, 8, 8, 8, 100000000, 0.246, 4.065, -1.000 18 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 2.411, 6.637, -1.000 19 | HashTableMultiShard, update-only, 32, 8, 8, 8, 100000000, 2.679, 11.946, -1.000 20 | HashTableMultiShard, update-only, 48, 8, 8, 8, 100000000, 2.643, 18.159, -1.000 21 | HashTableMultiShard, update-only, 64, 8, 8, 8, 100000000, 2.590, 24.709, -1.000 22 | HashTableMultiShard, update-only, 80, 8, 8, 8, 100000000, 2.525, 31.677, -1.000 23 | HashTableMultiShard, update-only, 88, 8, 8, 8, 100000000, 2.482, 35.455, -1.000 24 | HashTableMultiShard, update-only, 96, 8, 8, 8, 100000000, 2.445, 39.257, -1.000 25 | HashTableMultiShard, update-only, 1, 8, 8, 8, 100000000, 0.233, 4.298, -1.000 26 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 2.698, 5.931, -1.000 27 | HashTableMultiShard, update-only, 32, 8, 8, 8, 100000000, 2.962, 10.802, -1.000 28 | HashTableMultiShard, update-only, 48, 8, 8, 8, 100000000, 2.947, 16.287, -1.000 29 | HashTableMultiShard, update-only, 64, 8, 8, 8, 100000000, 2.806, 22.807, -1.000 30 | HashTableMultiShard, update-only, 80, 8, 8, 8, 100000000, 2.744, 29.160, -1.000 31 | HashTableMultiShard, update-only, 88, 8, 8, 8, 100000000, 2.716, 32.401, -1.000 32 | HashTableMultiShard, update-only, 96, 8, 8, 8, 100000000, 2.663, 36.044, -1.000 33 | -------------------------------------------------------------------------------- /ae/raw-reference/fig3a.csv: -------------------------------------------------------------------------------- 1 | rdma-read-shared-qp, 1, 8, 8, 14.520, 1.903, 80.964 2 | rdma-read-shared-qp, 8, 8, 8, 4.430, 0.581, 95.127 3 | rdma-read-shared-qp, 16, 8, 8, 3.352, 0.439, 77.300 4 | rdma-read-shared-qp, 24, 8, 8, 3.023, 0.396, 79.196 5 | rdma-read-shared-qp, 32, 8, 8, 2.607, 0.342, 77.885 6 | rdma-read-shared-qp, 40, 8, 8, 2.260, 0.296, 76.808 7 | rdma-read-shared-qp, 48, 8, 8, 2.046, 0.268, 76.193 8 | rdma-read-shared-qp, 56, 8, 8, 2.015, 0.264, 77.762 9 | rdma-read-shared-qp, 64, 8, 8, 2.012, 0.264, 78.912 10 | rdma-read-shared-qp, 72, 8, 8, 1.903, 0.249, 78.517 11 | rdma-read-shared-qp, 80, 8, 8, 1.930, 0.253, 76.473 12 | rdma-read-shared-qp, 88, 8, 8, 1.833, 0.240, 77.977 13 | rdma-read-shared-qp, 96, 8, 8, 1.946, 0.255, 81.968 14 | rdma-read-mul-4, 1, 8, 8, 14.520, 1.903, 80.364 15 | rdma-read-mul-4, 8, 8, 8, 9.585, 1.256, 81.266 16 | rdma-read-mul-4, 16, 8, 8, 19.486, 2.554, 85.796 17 | rdma-read-mul-4, 24, 8, 8, 27.680, 3.628, 90.472 18 | rdma-read-mul-4, 32, 8, 8, 38.188, 5.005, 94.324 19 | rdma-read-mul-4, 40, 8, 8, 54.301, 7.117, 103.720 20 | rdma-read-mul-4, 48, 8, 8, 59.573, 7.808, 105.989 21 | rdma-read-mul-4, 56, 8, 8, 68.535, 8.983, 115.540 22 | rdma-read-mul-4, 64, 8, 8, 69.456, 9.104, 114.336 23 | rdma-read-mul-4, 72, 8, 8, 87.720, 11.498, 124.475 24 | rdma-read-mul-4, 80, 8, 8, 78.981, 10.352, 127.800 25 | rdma-read-mul-4, 88, 8, 8, 81.289, 10.655, 131.400 26 | rdma-read-mul-4, 96, 8, 8, 92.023, 12.062, 141.822 27 | rdma-read-mul-2, 1, 8, 8, 14.513, 1.902, 79.454 28 | rdma-read-mul-2, 8, 8, 8, 24.564, 3.220, 84.762 29 | rdma-read-mul-2, 16, 8, 8, 64.865, 8.502, 92.684 30 | rdma-read-mul-2, 24, 8, 8, 109.617, 14.368, 106.740 31 | rdma-read-mul-2, 32, 8, 8, 138.503, 18.154, 115.019 32 | rdma-read-mul-2, 40, 8, 8, 148.893, 19.516, 126.184 33 | rdma-read-mul-2, 48, 8, 8, 151.951, 19.916, 132.748 34 | rdma-read-mul-2, 56, 8, 8, 165.569, 21.701, 151.374 35 | rdma-read-mul-2, 64, 8, 8, 173.800, 22.780, 154.005 36 | rdma-read-mul-2, 72, 8, 8, 181.377, 23.773, 163.660 37 | rdma-read-mul-2, 80, 8, 8, 171.820, 22.521, 185.239 38 | rdma-read-mul-2, 88, 8, 8, 155.380, 20.366, 192.586 39 | rdma-read-mul-2, 96, 8, 8, 143.953, 18.868, 194.364 40 | rdma-read-per-qp, 1, 8, 8, 14.629, 1.917, 1152.741 41 | rdma-read-per-qp, 8, 8, 8, 113.078, 14.821, 1156.233 42 | rdma-read-per-qp, 16, 8, 8, 221.524, 29.036, 1161.423 43 | rdma-read-per-qp, 24, 8, 8, 297.831, 39.037, 1172.724 44 | rdma-read-per-qp, 32, 8, 8, 298.197, 39.085, 1173.084 45 | rdma-read-per-qp, 40, 8, 8, 246.291, 32.282, 1184.314 46 | rdma-read-per-qp, 48, 8, 8, 224.555, 29.433, 1193.427 47 | rdma-read-per-qp, 56, 8, 8, 178.100, 23.344, 1200.659 48 | rdma-read-per-qp, 64, 8, 8, 175.500, 23.003, 1207.668 49 | rdma-read-per-qp, 72, 8, 8, 163.348, 21.410, 1218.185 50 | rdma-read-per-qp, 80, 8, 8, 158.981, 20.838, 1226.912 51 | rdma-read-per-qp, 88, 8, 8, 152.637, 20.006, 1236.462 52 | rdma-read-per-qp, 96, 8, 8, 146.165, 19.158, 1236.771 53 | rdma-read-per-doorbell, 1, 8, 8, 13.800, 1.809, 1157.446 54 | rdma-read-per-doorbell, 8, 8, 8, 110.894, 14.535, 1156.841 55 | rdma-read-per-doorbell, 16, 8, 8, 219.038, 28.710, 1165.508 56 | rdma-read-per-doorbell, 24, 8, 8, 321.064, 42.083, 1173.650 57 | rdma-read-per-doorbell, 32, 8, 8, 421.150, 55.201, 1181.062 58 | rdma-read-per-doorbell, 40, 8, 8, 490.589, 64.302, 1185.782 59 | rdma-read-per-doorbell, 48, 8, 8, 575.127, 75.383, 1194.428 60 | rdma-read-per-doorbell, 56, 8, 8, 645.197, 84.567, 1201.074 61 | rdma-read-per-doorbell, 64, 8, 8, 689.129, 90.325, 1209.308 62 | rdma-read-per-doorbell, 72, 8, 8, 758.528, 99.422, 1218.907 63 | rdma-read-per-doorbell, 80, 8, 8, 804.795, 105.486, 1228.487 64 | rdma-read-per-doorbell, 88, 8, 8, 838.092, 109.850, 1235.541 65 | rdma-read-per-doorbell, 96, 8, 8, 848.217, 111.177, 1245.924 66 | -------------------------------------------------------------------------------- /ae/raw-reference/fig3b.csv: -------------------------------------------------------------------------------- 1 | rdma-write-shared-qp, 1, 8, 8, 13.737, 1.800, 81.171 2 | rdma-write-shared-qp, 8, 8, 8, 4.256, 0.558, 77.195 3 | rdma-write-shared-qp, 16, 8, 8, 3.283, 0.430, 76.608 4 | rdma-write-shared-qp, 24, 8, 8, 3.012, 0.395, 77.920 5 | rdma-write-shared-qp, 32, 8, 8, 2.666, 0.349, 75.778 6 | rdma-write-shared-qp, 40, 8, 8, 2.397, 0.314, 78.161 7 | rdma-write-shared-qp, 48, 8, 8, 2.052, 0.269, 78.308 8 | rdma-write-shared-qp, 56, 8, 8, 1.962, 0.257, 77.096 9 | rdma-write-shared-qp, 64, 8, 8, 2.029, 0.266, 77.197 10 | rdma-write-shared-qp, 72, 8, 8, 1.933, 0.253, 76.506 11 | rdma-write-shared-qp, 80, 8, 8, 2.008, 0.263, 82.183 12 | rdma-write-shared-qp, 88, 8, 8, 1.944, 0.255, 77.070 13 | rdma-write-shared-qp, 96, 8, 8, 1.920, 0.252, 76.558 14 | rdma-write-mul-4, 1, 8, 8, 14.099, 1.848, 77.364 15 | rdma-write-mul-4, 8, 8, 8, 9.736, 1.276, 81.386 16 | rdma-write-mul-4, 16, 8, 8, 18.442, 2.417, 83.845 17 | rdma-write-mul-4, 24, 8, 8, 26.042, 3.413, 89.856 18 | rdma-write-mul-4, 32, 8, 8, 42.742, 5.602, 92.739 19 | rdma-write-mul-4, 40, 8, 8, 43.534, 5.706, 98.851 20 | rdma-write-mul-4, 48, 8, 8, 65.975, 8.647, 109.049 21 | rdma-write-mul-4, 56, 8, 8, 60.020, 7.867, 112.007 22 | rdma-write-mul-4, 64, 8, 8, 71.956, 9.431, 116.633 23 | rdma-write-mul-4, 72, 8, 8, 85.772, 11.242, 118.221 24 | rdma-write-mul-4, 80, 8, 8, 86.396, 11.324, 129.938 25 | rdma-write-mul-4, 88, 8, 8, 86.311, 11.313, 130.936 26 | rdma-write-mul-4, 96, 8, 8, 96.733, 12.679, 136.613 27 | rdma-write-mul-2, 1, 8, 8, 13.809, 1.810, 78.429 28 | rdma-write-mul-2, 8, 8, 8, 38.553, 5.053, 84.570 29 | rdma-write-mul-2, 16, 8, 8, 73.286, 9.606, 101.111 30 | rdma-write-mul-2, 24, 8, 8, 100.013, 13.109, 107.701 31 | rdma-write-mul-2, 32, 8, 8, 153.773, 20.155, 115.993 32 | rdma-write-mul-2, 40, 8, 8, 145.508, 19.072, 130.392 33 | rdma-write-mul-2, 48, 8, 8, 149.518, 19.598, 138.126 34 | rdma-write-mul-2, 56, 8, 8, 192.220, 25.195, 149.569 35 | rdma-write-mul-2, 64, 8, 8, 166.361, 21.805, 157.194 36 | rdma-write-mul-2, 72, 8, 8, 177.545, 23.271, 167.145 37 | rdma-write-mul-2, 80, 8, 8, 159.061, 20.848, 180.431 38 | rdma-write-mul-2, 88, 8, 8, 163.446, 21.423, 183.011 39 | rdma-write-mul-2, 96, 8, 8, 159.973, 20.968, 200.422 40 | rdma-write-per-qp, 1, 8, 8, 13.854, 1.816, 1153.429 41 | rdma-write-per-qp, 8, 8, 8, 106.671, 13.982, 1154.672 42 | rdma-write-per-qp, 16, 8, 8, 207.739, 27.229, 1161.558 43 | rdma-write-per-qp, 24, 8, 8, 274.101, 35.927, 1168.228 44 | rdma-write-per-qp, 32, 8, 8, 285.677, 37.444, 1176.018 45 | rdma-write-per-qp, 40, 8, 8, 235.933, 30.924, 1186.479 46 | rdma-write-per-qp, 48, 8, 8, 223.117, 29.244, 1191.364 47 | rdma-write-per-qp, 56, 8, 8, 177.815, 23.307, 1198.462 48 | rdma-write-per-qp, 64, 8, 8, 179.789, 23.565, 1210.413 49 | rdma-write-per-qp, 72, 8, 8, 163.762, 21.465, 1214.082 50 | rdma-write-per-qp, 80, 8, 8, 156.024, 20.450, 1223.753 51 | rdma-write-per-qp, 88, 8, 8, 150.050, 19.667, 1234.476 52 | rdma-write-per-qp, 96, 8, 8, 145.970, 19.133, 1240.179 53 | rdma-write-per-doorbell, 1, 8, 8, 12.999, 1.704, 1154.493 54 | rdma-write-per-doorbell, 8, 8, 8, 105.915, 13.882, 1157.728 55 | rdma-write-per-doorbell, 16, 8, 8, 207.945, 27.256, 1163.112 56 | rdma-write-per-doorbell, 24, 8, 8, 298.102, 39.073, 1173.267 57 | rdma-write-per-doorbell, 32, 8, 8, 383.980, 50.329, 1184.108 58 | rdma-write-per-doorbell, 40, 8, 8, 456.864, 59.882, 1186.713 59 | rdma-write-per-doorbell, 48, 8, 8, 524.765, 68.782, 1197.851 60 | rdma-write-per-doorbell, 56, 8, 8, 561.177, 73.555, 1205.741 61 | rdma-write-per-doorbell, 64, 8, 8, 598.137, 78.399, 1213.111 62 | rdma-write-per-doorbell, 72, 8, 8, 618.550, 81.075, 1216.041 63 | rdma-write-per-doorbell, 80, 8, 8, 644.235, 84.441, 1224.608 64 | rdma-write-per-doorbell, 88, 8, 8, 679.485, 89.061, 1234.703 65 | rdma-write-per-doorbell, 96, 8, 8, 690.868, 90.553, 1249.850 66 | -------------------------------------------------------------------------------- /ae/raw-reference/fig4a.csv: -------------------------------------------------------------------------------- 1 | rdma-read-per-doorbell, 12, 1, 8, 38.933, 5.103, 1168.913 2 | rdma-read-per-doorbell, 12, 4, 8, 103.691, 13.591, 1179.620 3 | rdma-read-per-doorbell, 12, 8, 8, 166.310, 21.799, 1162.109 4 | rdma-read-per-doorbell, 12, 16, 8, 237.441, 31.122, 1164.584 5 | rdma-read-per-doorbell, 12, 24, 8, 282.166, 36.984, 1162.764 6 | rdma-read-per-doorbell, 12, 32, 8, 307.978, 40.367, 1160.748 7 | rdma-read-per-doorbell, 24, 1, 8, 76.447, 10.020, 1171.543 8 | rdma-read-per-doorbell, 24, 4, 8, 198.538, 26.023, 1170.875 9 | rdma-read-per-doorbell, 24, 8, 8, 319.176, 41.835, 1173.572 10 | rdma-read-per-doorbell, 24, 16, 8, 463.583, 60.763, 1173.517 11 | rdma-read-per-doorbell, 24, 24, 8, 528.277, 69.242, 1172.909 12 | rdma-read-per-doorbell, 24, 32, 8, 587.356, 76.986, 1172.961 13 | rdma-read-per-doorbell, 36, 1, 8, 109.374, 14.336, 1180.610 14 | rdma-read-per-doorbell, 36, 4, 8, 293.403, 38.457, 1187.464 15 | rdma-read-per-doorbell, 36, 8, 8, 467.635, 61.294, 1180.979 16 | rdma-read-per-doorbell, 36, 16, 8, 658.236, 86.276, 1183.445 17 | rdma-read-per-doorbell, 36, 24, 8, 746.381, 97.830, 1183.582 18 | rdma-read-per-doorbell, 36, 32, 8, 795.053, 104.209, 1180.650 19 | rdma-read-per-doorbell, 48, 1, 8, 141.300, 18.520, 1197.137 20 | rdma-read-per-doorbell, 48, 4, 8, 371.911, 48.747, 1199.090 21 | rdma-read-per-doorbell, 48, 8, 8, 575.806, 75.472, 1195.666 22 | rdma-read-per-doorbell, 48, 16, 8, 782.080, 102.509, 1195.451 23 | rdma-read-per-doorbell, 48, 24, 8, 847.803, 111.123, 1193.071 24 | rdma-read-per-doorbell, 48, 32, 8, 793.361, 103.987, 1188.395 25 | rdma-read-per-doorbell, 60, 1, 8, 170.200, 22.309, 1203.157 26 | rdma-read-per-doorbell, 60, 4, 8, 443.661, 58.152, 1206.037 27 | rdma-read-per-doorbell, 60, 8, 8, 680.517, 89.197, 1211.641 28 | rdma-read-per-doorbell, 60, 16, 8, 847.207, 111.045, 1206.543 29 | rdma-read-per-doorbell, 60, 24, 8, 800.796, 104.962, 1203.341 30 | rdma-read-per-doorbell, 60, 32, 8, 654.108, 85.735, 1208.306 31 | rdma-read-per-doorbell, 72, 1, 8, 197.196, 25.847, 1223.200 32 | rdma-read-per-doorbell, 72, 4, 8, 510.384, 66.897, 1217.366 33 | rdma-read-per-doorbell, 72, 8, 8, 752.380, 98.616, 1227.559 34 | rdma-read-per-doorbell, 72, 16, 8, 817.417, 107.140, 1219.327 35 | rdma-read-per-doorbell, 72, 24, 8, 732.961, 96.071, 1224.762 36 | rdma-read-per-doorbell, 72, 32, 8, 558.107, 73.152, 1215.978 37 | rdma-read-per-doorbell, 84, 1, 8, 225.071, 29.500, 1235.285 38 | rdma-read-per-doorbell, 84, 4, 8, 566.682, 74.276, 1233.036 39 | rdma-read-per-doorbell, 84, 8, 8, 826.769, 108.366, 1222.899 40 | rdma-read-per-doorbell, 84, 16, 8, 703.480, 92.207, 1233.270 41 | rdma-read-per-doorbell, 84, 24, 8, 659.553, 86.449, 1231.493 42 | rdma-read-per-doorbell, 84, 32, 8, 476.439, 62.448, 1232.567 43 | rdma-read-per-doorbell, 96, 1, 8, 251.530, 32.969, 1245.571 44 | rdma-read-per-doorbell, 96, 4, 8, 622.280, 81.563, 1244.561 45 | rdma-read-per-doorbell, 96, 8, 8, 846.723, 110.982, 1246.977 46 | rdma-read-per-doorbell, 96, 16, 8, 595.940, 78.111, 1244.746 47 | rdma-read-per-doorbell, 96, 24, 8, 587.153, 76.959, 1243.501 48 | rdma-read-per-doorbell, 96, 32, 8, 420.843, 55.161, 1243.966 49 | -------------------------------------------------------------------------------- /ae/raw-reference/fig4b.csv: -------------------------------------------------------------------------------- 1 | rdma-write-per-doorbell, 12, 1, 8, 38.082, 4.991, 1172.094 2 | rdma-write-per-doorbell, 12, 4, 8, 101.068, 13.247, 1159.326 3 | rdma-write-per-doorbell, 12, 8, 8, 154.863, 20.298, 1160.286 4 | rdma-write-per-doorbell, 12, 16, 8, 225.426, 29.547, 1159.527 5 | rdma-write-per-doorbell, 12, 24, 8, 268.484, 35.191, 1160.794 6 | rdma-write-per-doorbell, 12, 32, 8, 295.570, 38.741, 1158.949 7 | rdma-write-per-doorbell, 24, 1, 8, 73.799, 9.673, 1174.039 8 | rdma-write-per-doorbell, 24, 4, 8, 193.183, 25.321, 1170.959 9 | rdma-write-per-doorbell, 24, 8, 8, 295.863, 38.779, 1174.389 10 | rdma-write-per-doorbell, 24, 16, 8, 417.668, 54.745, 1171.090 11 | rdma-write-per-doorbell, 24, 24, 8, 499.386, 65.455, 1171.573 12 | rdma-write-per-doorbell, 24, 32, 8, 553.637, 72.566, 1171.378 13 | rdma-write-per-doorbell, 36, 1, 8, 104.309, 13.672, 1185.819 14 | rdma-write-per-doorbell, 36, 4, 8, 280.816, 36.807, 1187.669 15 | rdma-write-per-doorbell, 36, 8, 8, 431.386, 56.543, 1184.036 16 | rdma-write-per-doorbell, 36, 16, 8, 606.289, 79.467, 1182.176 17 | rdma-write-per-doorbell, 36, 24, 8, 659.955, 86.502, 1185.921 18 | rdma-write-per-doorbell, 36, 32, 8, 696.986, 91.355, 1183.517 19 | rdma-write-per-doorbell, 48, 1, 8, 132.651, 17.387, 1192.165 20 | rdma-write-per-doorbell, 48, 4, 8, 349.922, 45.865, 1193.881 21 | rdma-write-per-doorbell, 48, 8, 8, 523.117, 68.566, 1205.245 22 | rdma-write-per-doorbell, 48, 16, 8, 654.850, 85.832, 1191.727 23 | rdma-write-per-doorbell, 48, 24, 8, 642.347, 84.194, 1194.539 24 | rdma-write-per-doorbell, 48, 32, 8, 533.174, 69.884, 1193.440 25 | rdma-write-per-doorbell, 60, 1, 8, 160.616, 21.052, 1207.327 26 | rdma-write-per-doorbell, 60, 4, 8, 405.302, 53.124, 1212.093 27 | rdma-write-per-doorbell, 60, 8, 8, 578.215, 75.788, 1211.077 28 | rdma-write-per-doorbell, 60, 16, 8, 707.457, 92.728, 1213.588 29 | rdma-write-per-doorbell, 60, 24, 8, 505.103, 66.205, 1207.997 30 | rdma-write-per-doorbell, 60, 32, 8, 496.729, 65.107, 1216.986 31 | rdma-write-per-doorbell, 72, 1, 8, 183.516, 24.054, 1221.375 32 | rdma-write-per-doorbell, 72, 4, 8, 452.591, 59.322, 1226.923 33 | rdma-write-per-doorbell, 72, 8, 8, 622.381, 81.577, 1218.120 34 | rdma-write-per-doorbell, 72, 16, 8, 510.982, 66.975, 1218.255 35 | rdma-write-per-doorbell, 72, 24, 8, 489.216, 64.123, 1219.374 36 | rdma-write-per-doorbell, 72, 32, 8, 485.185, 63.594, 1227.542 37 | rdma-write-per-doorbell, 84, 1, 8, 207.388, 27.183, 1232.592 38 | rdma-write-per-doorbell, 84, 4, 8, 493.936, 64.741, 1232.500 39 | rdma-write-per-doorbell, 84, 8, 8, 658.368, 86.294, 1230.665 40 | rdma-write-per-doorbell, 84, 16, 8, 491.973, 64.484, 1231.001 41 | rdma-write-per-doorbell, 84, 24, 8, 483.914, 63.428, 1237.215 42 | rdma-write-per-doorbell, 84, 32, 8, 480.218, 62.943, 1233.118 43 | rdma-write-per-doorbell, 96, 1, 8, 230.315, 30.188, 1243.157 44 | rdma-write-per-doorbell, 96, 4, 8, 543.377, 71.221, 1244.866 45 | rdma-write-per-doorbell, 96, 8, 8, 683.155, 89.542, 1238.499 46 | rdma-write-per-doorbell, 96, 16, 8, 479.027, 62.787, 1241.839 47 | rdma-write-per-doorbell, 96, 24, 8, 480.526, 62.984, 1248.264 48 | rdma-write-per-doorbell, 96, 32, 8, 481.048, 63.052, 1242.701 49 | -------------------------------------------------------------------------------- /ae/raw-reference/fig5a.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, update-only, 1, 8, 8, 8, 100000000, 0.237, 31.538, 70.006 2 | HashTableMultiShard, update-only, 2, 8, 8, 8, 100000000, 0.545, 26.312, 74.758 3 | HashTableMultiShard, update-only, 4, 8, 8, 8, 100000000, 1.116, 23.374, 130.674 4 | HashTableMultiShard, update-only, 6, 8, 8, 8, 100000000, 1.441, 23.652, 253.185 5 | HashTableMultiShard, update-only, 8, 8, 8, 8, 100000000, 1.574, 23.689, 447.885 6 | HashTableMultiShard, update-only, 10, 8, 8, 8, 100000000, 1.515, 24.845, 741.628 7 | HashTableMultiShard, update-only, 12, 8, 8, 8, 100000000, 0.949, 32.982, 1861.465 8 | HashTableMultiShard, update-only, 14, 8, 8, 8, 100000000, 0.731, 43.464, 2922.841 9 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 0.533, 60.087, 4475.455 10 | -------------------------------------------------------------------------------- /ae/raw-reference/fig5b.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 3.731, 29.492, 53.708 2 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 3.641, 30.332, 55.643 3 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 3.791, 28.891, 54.569 4 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 3.110, 29.481, 233.953 5 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 1.224, 36.629, 1255.473 6 | HashTableMultiShard, update-only, 16, 8, 8, 8, 100000000, 0.669, 46.526, 3503.948 7 | -------------------------------------------------------------------------------- /ae/raw-reference/fig7-ycsb-a.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 0.195, 491.418, -1.000 2 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 0.123, 781.728, -1.000 3 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 0.080, 1204.590, -1.000 4 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 0.068, 1405.755, -1.000 5 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 0.059, 1627.359, -1.000 6 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 0.054, 1772.063, -1.000 7 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 4.972, 19.310, -1.000 8 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 5.573, 17.226, -1.000 9 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 5.584, 17.192, -1.000 10 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 5.669, 16.935, -1.000 11 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 5.682, 16.895, -1.000 12 | HashTableMultiShard, ycsb-a, 96, 8, 8, 8, 100000000, 5.696, 16.854, -1.000 13 | -------------------------------------------------------------------------------- /ae/raw-reference/fig7-ycsb-b.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 5.055, 18.991, -1.000 2 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 1.792, 53.582, -1.000 3 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 1.073, 89.472, -1.000 4 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 0.916, 104.845, -1.000 5 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 0.790, 121.524, -1.000 6 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 0.714, 134.366, -1.000 7 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 20.265, 4.737, -1.000 8 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 32.047, 2.996, -1.000 9 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 35.034, 2.740, -1.000 10 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 35.912, 2.673, -1.000 11 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 36.852, 2.605, -1.000 12 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 37.051, 2.591, -1.000 13 | -------------------------------------------------------------------------------- /ae/raw-reference/fig7-ycsb-c.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 6.943, 13.827, -1.000 2 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 13.346, 7.193, -1.000 3 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 20.123, 4.771, -1.000 4 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 26.840, 3.577, -1.000 5 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 33.355, 2.878, -1.000 6 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 41.071, 2.337, -1.000 7 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 23.506, 4.084, -1.000 8 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 44.946, 2.136, -1.000 9 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 64.639, 1.485, -1.000 10 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 72.612, 1.322, -1.000 11 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 73.751, 1.302, -1.000 12 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 75.051, 1.279, -1.000 13 | -------------------------------------------------------------------------------- /ae/raw-reference/fig8-ycsb-b.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, ycsb-b, 1, 8, 8, 8, 100000000, 0.509, 1.964, -1.000 2 | HashTableMultiShard, ycsb-b, 8, 8, 8, 8, 100000000, 3.322, 2.408, -1.000 3 | HashTableMultiShard, ycsb-b, 16, 8, 8, 8, 100000000, 5.718, 2.798, -1.000 4 | HashTableMultiShard, ycsb-b, 24, 8, 8, 8, 100000000, 8.218, 2.920, -1.000 5 | HashTableMultiShard, ycsb-b, 32, 8, 8, 8, 100000000, 9.634, 3.322, -1.000 6 | HashTableMultiShard, ycsb-b, 40, 8, 8, 8, 100000000, 9.555, 4.186, -1.000 7 | HashTableMultiShard, ycsb-b, 48, 8, 8, 8, 100000000, 11.505, 4.172, -1.000 8 | HashTableMultiShard, ycsb-b, 56, 8, 8, 8, 100000000, 8.340, 6.715, -1.000 9 | HashTableMultiShard, ycsb-b, 64, 8, 8, 8, 100000000, 7.470, 8.568, -1.000 10 | HashTableMultiShard, ycsb-b, 72, 8, 8, 8, 100000000, 7.352, 9.794, -1.000 11 | HashTableMultiShard, ycsb-b, 80, 8, 8, 8, 100000000, 6.946, 11.518, -1.000 12 | HashTableMultiShard, ycsb-b, 88, 8, 8, 8, 100000000, 6.137, 14.340, -1.000 13 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 5.128, 18.721, -1.000 14 | HashTableMultiShard, ycsb-b, 1, 8, 8, 8, 100000000, 0.500, 1.998, -1.000 15 | HashTableMultiShard, ycsb-b, 8, 8, 8, 8, 100000000, 3.439, 2.326, -1.000 16 | HashTableMultiShard, ycsb-b, 16, 8, 8, 8, 100000000, 6.444, 2.483, -1.000 17 | HashTableMultiShard, ycsb-b, 24, 8, 8, 8, 100000000, 10.064, 2.385, -1.000 18 | HashTableMultiShard, ycsb-b, 32, 8, 8, 8, 100000000, 13.644, 2.345, -1.000 19 | HashTableMultiShard, ycsb-b, 40, 8, 8, 8, 100000000, 15.493, 2.582, -1.000 20 | HashTableMultiShard, ycsb-b, 48, 8, 8, 8, 100000000, 17.087, 2.809, -1.000 21 | HashTableMultiShard, ycsb-b, 56, 8, 8, 8, 100000000, 18.430, 3.039, -1.000 22 | HashTableMultiShard, ycsb-b, 64, 8, 8, 8, 100000000, 8.868, 7.217, -1.000 23 | HashTableMultiShard, ycsb-b, 72, 8, 8, 8, 100000000, 7.971, 9.033, -1.000 24 | HashTableMultiShard, ycsb-b, 80, 8, 8, 8, 100000000, 5.594, 14.300, -1.000 25 | HashTableMultiShard, ycsb-b, 88, 8, 8, 8, 100000000, 4.202, 20.944, -1.000 26 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 3.064, 31.336, -1.000 27 | HashTableMultiShard, ycsb-b, 1, 8, 8, 8, 100000000, 0.496, 2.017, -1.000 28 | HashTableMultiShard, ycsb-b, 8, 8, 8, 8, 100000000, 3.418, 2.341, -1.000 29 | HashTableMultiShard, ycsb-b, 16, 8, 8, 8, 100000000, 6.648, 2.407, -1.000 30 | HashTableMultiShard, ycsb-b, 24, 8, 8, 8, 100000000, 10.194, 2.354, -1.000 31 | HashTableMultiShard, ycsb-b, 32, 8, 8, 8, 100000000, 12.850, 2.490, -1.000 32 | HashTableMultiShard, ycsb-b, 40, 8, 8, 8, 100000000, 14.608, 2.738, -1.000 33 | HashTableMultiShard, ycsb-b, 48, 8, 8, 8, 100000000, 16.814, 2.855, -1.000 34 | HashTableMultiShard, ycsb-b, 56, 8, 8, 8, 100000000, 17.854, 3.137, -1.000 35 | HashTableMultiShard, ycsb-b, 64, 8, 8, 8, 100000000, 13.218, 4.842, -1.000 36 | HashTableMultiShard, ycsb-b, 72, 8, 8, 8, 100000000, 9.782, 7.360, -1.000 37 | HashTableMultiShard, ycsb-b, 80, 8, 8, 8, 100000000, 7.710, 10.376, -1.000 38 | HashTableMultiShard, ycsb-b, 88, 8, 8, 8, 100000000, 6.748, 13.040, -1.000 39 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 9.467, 10.140, -1.000 40 | HashTableMultiShard, ycsb-b, 1, 8, 8, 8, 100000000, 0.495, 2.022, -1.000 41 | HashTableMultiShard, ycsb-b, 8, 8, 8, 8, 100000000, 3.562, 2.246, -1.000 42 | HashTableMultiShard, ycsb-b, 16, 8, 8, 8, 100000000, 6.872, 2.328, -1.000 43 | HashTableMultiShard, ycsb-b, 24, 8, 8, 8, 100000000, 9.699, 2.474, -1.000 44 | HashTableMultiShard, ycsb-b, 32, 8, 8, 8, 100000000, 12.107, 2.643, -1.000 45 | HashTableMultiShard, ycsb-b, 40, 8, 8, 8, 100000000, 14.943, 2.677, -1.000 46 | HashTableMultiShard, ycsb-b, 48, 8, 8, 8, 100000000, 16.757, 2.865, -1.000 47 | HashTableMultiShard, ycsb-b, 56, 8, 8, 8, 100000000, 18.926, 2.959, -1.000 48 | HashTableMultiShard, ycsb-b, 64, 8, 8, 8, 100000000, 20.209, 3.167, -1.000 49 | HashTableMultiShard, ycsb-b, 72, 8, 8, 8, 100000000, 20.331, 3.541, -1.000 50 | HashTableMultiShard, ycsb-b, 80, 8, 8, 8, 100000000, 20.198, 3.961, -1.000 51 | HashTableMultiShard, ycsb-b, 88, 8, 8, 8, 100000000, 20.690, 4.253, -1.000 52 | HashTableMultiShard, ycsb-b, 96, 8, 8, 8, 100000000, 20.882, 4.597, -1.000 53 | -------------------------------------------------------------------------------- /ae/raw-reference/fig9.csv: -------------------------------------------------------------------------------- 1 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 5.766, 105.936, 281.874 2 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 5.945, 67.303, 195.763 3 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 6.337, 50.438, 167.677 4 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 6.233, 26.077, 96.765 5 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 4.688, 13.526, 48.375 6 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 2.668, 10.997, 24.778 7 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 1.414, 9.463, 19.386 8 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.728, 9.955, 22.583 9 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.368, 9.787, 23.381 10 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.186, 9.880, 23.647 11 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.093, 10.310, 23.874 12 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 15.641, 30.374, 57.353 13 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 14.067, 18.349, 34.057 14 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 11.604, 11.377, 31.201 15 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 7.909, 12.099, 25.478 16 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 4.804, 11.885, 21.725 17 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 2.674, 10.104, 19.272 18 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 1.411, 9.440, 18.192 19 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.727, 9.523, 21.734 20 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.369, 9.325, 22.592 21 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.186, 9.409, 22.596 22 | HashTableMultiShard, ycsb-c, 96, 8, 8, 8, 100000000, 0.093, 9.979, 23.027 23 | -------------------------------------------------------------------------------- /ae/raw-reference/table1.csv: -------------------------------------------------------------------------------- 1 | rdma-read-per-doorbell-8, 96, 64, 8, 616.157, 80.761, 1303.522 2 | rdma-read-per-doorbell-16, 96, 64, 8, 608.555, 79.765, 1250.256 3 | rdma-read-per-doorbell-32, 96, 64, 8, 605.106, 79.312, 1240.291 4 | rdma-read-per-doorbell-64, 96, 64, 8, 604.770, 79.268, 1241.939 5 | rdma-read-per-doorbell-128, 96, 64, 8, 594.590, 77.934, 1242.490 6 | rdma-read-per-doorbell-256, 96, 64, 8, 570.175, 74.734, 1243.425 7 | rdma-read-per-doorbell-512, 96, 64, 8, 562.904, 73.781, 1241.757 8 | rdma-read-per-doorbell-1024, 96, 64, 8, 548.187, 71.852, 1242.224 9 | rdma-read-per-doorbell-2048, 96, 64, 8, 501.625, 65.749, 1242.434 10 | rdma-read-work-req-throt-8, 96, 64, 8, 763.787, 100.111, 1245.515 11 | rdma-read-work-req-throt-16, 96, 64, 8, 753.954, 98.822, 1239.384 12 | rdma-read-work-req-throt-32, 96, 64, 8, 746.520, 97.848, 1237.033 13 | rdma-read-work-req-throt-64, 96, 64, 8, 725.547, 95.099, 1239.050 14 | rdma-read-work-req-throt-128, 96, 64, 8, 760.884, 99.731, 1244.446 15 | rdma-read-work-req-throt-256, 96, 64, 8, 770.496, 100.990, 1244.766 16 | rdma-read-work-req-throt-512, 96, 64, 8, 806.893, 105.761, 1243.931 17 | rdma-read-work-req-throt-1024, 96, 64, 8, 834.008, 109.315, 1244.461 18 | rdma-read-work-req-throt-2048, 96, 64, 8, 836.030, 109.580, 1243.553 19 | -------------------------------------------------------------------------------- /alloc_hugepage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo 20480 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages 3 | -------------------------------------------------------------------------------- /btree/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(btree_backend backend.cpp btree.cpp) 2 | target_link_libraries(btree_backend PUBLIC smart) 3 | 4 | add_executable(btree_bench bench.cpp btree.cpp) 5 | target_link_libraries(btree_bench PUBLIC smart) 6 | -------------------------------------------------------------------------------- /btree/backend.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "util/json_config.h" 26 | #include "smart/target.h" 27 | 28 | #include "btree.h" 29 | 30 | using namespace sds; 31 | 32 | int main(int argc, char **argv) { 33 | WritePidFile(); 34 | const char *path = ROOT_DIR "/config/backend.json"; 35 | if (argc == 2) { 36 | path = argv[1]; 37 | } 38 | JsonConfig config = JsonConfig::load_file(path); 39 | BindCore((int) config.get("nic_numa_node").get_int64()); 40 | std::string dev_dax_path = ""; // config.get("dev_dax_path").get_str(); 41 | size_t capacity = config.get("capacity").get_uint64() * kMegaBytes; 42 | uint16_t tcp_port = (uint16_t) config.get("tcp_port").get_int64(); 43 | Target target; 44 | void *mmap_addr = mapping_memory(dev_dax_path, capacity); 45 | memset(mmap_addr, 0, capacity); 46 | int rc = target.register_main_memory(mmap_addr, capacity); 47 | assert(!rc); 48 | rc = target.register_device_memory(kDeviceMemorySize); 49 | assert(!rc); 50 | RemoteBPlusTree::Setup(target); 51 | SDS_INFO("Press C to stop the memory node daemon."); 52 | target.start(tcp_port); 53 | while (getchar() != 'c') { sleep(1); } 54 | target.stop(); 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /btree/bench.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "util/json_config.h" 26 | #include "smart/benchmark.h" 27 | #include "btree.h" 28 | 29 | int main(int argc, char **argv) { 30 | using namespace sds; 31 | using namespace sds::datastructure; 32 | const char *path = ROOT_DIR "/config/datastructure.json"; 33 | if (getenv("APP_CONFIG_PATH")) { 34 | path = getenv("APP_CONFIG_PATH"); 35 | } 36 | JsonConfig config = JsonConfig::load_file(path); 37 | BenchmarkRunner runner(config, argc, argv); 38 | if (runner.spawn()) { 39 | exit(EXIT_FAILURE); 40 | } 41 | return 0; 42 | } -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mkdir build 3 | cd build 4 | cmake .. 5 | make -j 6 | cp ../patch/libmlx5.so libmlx5.so 7 | echo 'Build completed' -------------------------------------------------------------------------------- /config/backend.json: -------------------------------------------------------------------------------- 1 | { 2 | "dev_dax_path": "", 3 | "capacity": 16000, 4 | "tcp_port": 12345, 5 | "nic_numa_node": 1 6 | } -------------------------------------------------------------------------------- /config/backend.pmem.json: -------------------------------------------------------------------------------- 1 | { 2 | "dev_dax_path": "/dev/dax1.0", 3 | "capacity": 16000, 4 | "tcp_port": 12345, 5 | "nic_numa_node": 1 6 | } -------------------------------------------------------------------------------- /config/datastructure.json: -------------------------------------------------------------------------------- 1 | { 2 | "nr_threads": 24, 3 | "tasks_per_thread": 4, 4 | "dataset": "ycsb-a", 5 | "dump_file_path": "datastructure.csv", 6 | 7 | "nic_numa_node": 1, 8 | "cpu_nodes": 2, 9 | "cores_per_cpu": 48, 10 | 11 | "insert_before_execution": true, 12 | "max_key": 100000000, 13 | "key_length": 8, 14 | "value_length": 8, 15 | "rehash_key": false, 16 | "duration": 15, 17 | "zipfian_const": 0.99, 18 | 19 | "memory_servers": [ 20 | { 21 | "hostname": "optane06", 22 | "port": 12345 23 | }, 24 | { 25 | "hostname": "optane07", 26 | "port": 12345 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /config/smart_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "infiniband": { 3 | "name": "", 4 | "port": 1, 5 | "gid_idx": 1 6 | }, 7 | 8 | "qp_param": { 9 | "max_cqe_size": 256, 10 | "max_wqe_size": 256, 11 | "max_sge_size": 1, 12 | "max_inline_data": 64 13 | }, 14 | 15 | "max_nodes": 128, 16 | "initiator_cache_size": 4096, 17 | 18 | "use_thread_aware_alloc": true, 19 | "thread_aware_alloc": { 20 | "total_uuar": 100, 21 | "shared_uuar": 96, 22 | "shared_cq": true 23 | }, 24 | 25 | "use_work_req_throt": true, 26 | "work_req_throt": { 27 | "initial_credit": 4, 28 | "max_credit": 12, 29 | "credit_step": 2, 30 | "execution_epochs": 60, 31 | "sample_cycles": 19200000, 32 | "inf_credit_weight": 1.05, 33 | "auto_tuning": true 34 | }, 35 | 36 | "use_conflict_avoidance": true, 37 | "use_speculative_lookup": true, 38 | 39 | "experimental": { 40 | "qp_sharing": false 41 | } 42 | } -------------------------------------------------------------------------------- /config/test_rdma.json: -------------------------------------------------------------------------------- 1 | { 2 | "servers": [ 3 | "optane06" 4 | ], 5 | "port": 12345, 6 | "block_size": 8, 7 | "qp_num": -1, 8 | "dump_file_path": "test_rdma.csv", 9 | "type": "read" 10 | } -------------------------------------------------------------------------------- /config/transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "memory_servers": [ 3 | { 4 | "hostname": "optane06", 5 | "port": 12345 6 | }, 7 | { 8 | "hostname": "optane07", 9 | "port": 12345 10 | } 11 | ], 12 | "tpcc": { 13 | "num_warehouse": 8, 14 | "num_district_per_warehouse": 10, 15 | "num_customer_per_district": 300, 16 | "num_stock_per_warehouse": 10000 17 | }, 18 | "smallbank": { 19 | "num_accounts": 100000, 20 | "num_hot_accounts": 4000 21 | }, 22 | "tatp": { 23 | "num_subscriber": 100000 24 | }, 25 | "nr_transactions": 60000000, 26 | "dump_file_path": "dtx.csv" 27 | } -------------------------------------------------------------------------------- /deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt install python3-tk libnuma-dev clustershell 3 | pip3 install numpy matplotlib 4 | sudo bash alloc_hugepage.sh -------------------------------------------------------------------------------- /dtx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(dtx_smallbank dtx.cpp) 2 | target_compile_definitions(dtx_smallbank PUBLIC CONFIG_ITEM_SIZE=8) 3 | target_link_libraries(dtx_smallbank PUBLIC smart) 4 | 5 | add_library(dtx_tatp dtx.cpp) 6 | target_compile_definitions(dtx_tatp PUBLIC CONFIG_ITEM_SIZE=40) 7 | target_link_libraries(dtx_tatp PUBLIC smart) 8 | 9 | add_subdirectory(smallbank) 10 | add_subdirectory(tatp) 11 | -------------------------------------------------------------------------------- /dtx/addr_cache.h: -------------------------------------------------------------------------------- 1 | // Some contents of this file are derived from FORD 2 | // https://github.com/minghust/FORD 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include "common.h" 10 | #include "smart/common.h" 11 | 12 | const offset_t NOT_FOUND = -1; 13 | 14 | class AddrCache { 15 | public: 16 | void Insert(node_id_t remote_node_id, table_id_t table_id, itemkey_t key, offset_t remote_offset) { 17 | auto node_search = addr_map.find(remote_node_id); 18 | if (node_search == addr_map.end()) { 19 | addr_map[remote_node_id] = std::unordered_map>(); 20 | addr_map[remote_node_id][table_id] = std::unordered_map(); 21 | } else if (node_search->second.find(table_id) == node_search->second.end()) { 22 | addr_map[remote_node_id][table_id] = std::unordered_map(); 23 | } 24 | addr_map[remote_node_id][table_id][key] = remote_offset; 25 | } 26 | 27 | offset_t Search(node_id_t remote_node_id, table_id_t table_id, itemkey_t key) { 28 | auto node_search = addr_map.find(remote_node_id); 29 | if (node_search == addr_map.end()) return NOT_FOUND; 30 | auto table_search = node_search->second.find(table_id); 31 | if (table_search == node_search->second.end()) return NOT_FOUND; 32 | auto offset_search = table_search->second.find(key); 33 | return offset_search == table_search->second.end() ? NOT_FOUND : offset_search->second; 34 | } 35 | 36 | void Search(table_id_t query_table_id, itemkey_t query_key, node_id_t &remote_node_id, offset_t &remote_offset) { 37 | for (auto it = addr_map.begin(); it != addr_map.end(); it++) { 38 | auto table_search = it->second.find(query_table_id); 39 | if (table_search == it->second.end()) { 40 | continue; 41 | } 42 | auto offset_search = table_search->second.find(query_key); 43 | if (offset_search == table_search->second.end()) { 44 | return; 45 | } 46 | remote_node_id = it->first; 47 | remote_offset = offset_search->second; 48 | return; 49 | } 50 | } 51 | 52 | size_t TotalAddrSize() { 53 | size_t total_size = 0; 54 | for (auto it = addr_map.begin(); it != addr_map.end(); it++) { 55 | total_size += sizeof(node_id_t); 56 | for (auto it2 = it->second.begin(); it2 != it->second.end(); it2++) { 57 | total_size += sizeof(table_id_t); 58 | for (auto it3 = it2->second.begin(); it3 != it2->second.end(); it3++) { 59 | total_size += (sizeof(itemkey_t) + sizeof(offset_t)); 60 | } 61 | } 62 | } 63 | return total_size; 64 | } 65 | 66 | private: 67 | std::unordered_map>> addr_map; 68 | }; -------------------------------------------------------------------------------- /dtx/common.h: -------------------------------------------------------------------------------- 1 | // Some contents of this file are derived from FORD 2 | // https://github.com/minghust/FORD 3 | 4 | #pragma once 5 | 6 | #include // For size_t 7 | #include // For uintxx_t 8 | 9 | #include "smart/common.h" 10 | 11 | // Global specification 12 | using tx_id_t = uint64_t; // Transaction id type 13 | using t_id_t = uint32_t; // Thread id type 14 | using coro_id_t = int; // Coroutine id type 15 | using node_id_t = int; // Machine id type 16 | using table_id_t = uint64_t; // Table id type 17 | using itemkey_t = uint64_t; // Data item key type, used in DB tables 18 | using offset_t = int64_t; // Offset type. Usually used in remote offset for RDMA 19 | using version_t = uint64_t; // Version type, used in version checking 20 | using lock_t = uint64_t; // Lock type, used in remote locking 21 | 22 | // Max data item size. 23 | // 8: smallbank 24 | // 40: tatp 25 | // 664: tpcc 26 | #ifdef CONFIG_ITEM_SIZE 27 | const size_t MAX_ITEM_SIZE = (CONFIG_ITEM_SIZE); 28 | #else 29 | const size_t MAX_ITEM_SIZE = 8; 30 | #endif 31 | 32 | #define BACKUP_DEGREE 1 // Backup memory node number. MUST **NOT** BE SET TO 0 33 | 34 | // Data state 35 | #define STATE_INVISIBLE 0x8000000000000000 // Data cannot be read 36 | #define STATE_LOCKED 1 // Data cannot be written. Used for serializing transactions 37 | #define STATE_CLEAN 0 38 | 39 | // Alias 40 | #define Aligned8 __attribute__((aligned(8))) 41 | #define ALWAYS_INLINE inline __attribute__((always_inline)) 42 | 43 | // Helpful for improving condition prediction hit rate 44 | #define unlikely(x) __builtin_expect(!!(x), 0) 45 | #define likely(x) __builtin_expect(!!(x), 1) 46 | 47 | const offset_t LOG_BUFFER_SIZE = 1024 * 1024 * 1024; 48 | const node_id_t NUM_MEMORY_NODES = BACKUP_DEGREE + 1; 49 | 50 | // Remote offset to write log 51 | class LogOffsetAllocator { 52 | public: 53 | LogOffsetAllocator(t_id_t tid, t_id_t num_thread) { 54 | auto per_thread_remote_log_buffer_size = LOG_BUFFER_SIZE / num_thread; 55 | for (node_id_t i = 0; i < NUM_MEMORY_NODES; i++) { 56 | start_log_offsets[i] = tid * per_thread_remote_log_buffer_size; 57 | end_log_offsets[i] = (tid + 1) * per_thread_remote_log_buffer_size; 58 | current_log_offsets[i] = 0; 59 | } 60 | } 61 | 62 | offset_t GetNextLogOffset(node_id_t node_id, size_t log_entry_size) { 63 | if (unlikely(start_log_offsets[node_id] + current_log_offsets[node_id] + log_entry_size > 64 | end_log_offsets[node_id])) { 65 | current_log_offsets[node_id] = 0; 66 | } 67 | offset_t offset = start_log_offsets[node_id] + current_log_offsets[node_id]; 68 | current_log_offsets[node_id] += log_entry_size; 69 | return offset; 70 | } 71 | 72 | private: 73 | offset_t start_log_offsets[NUM_MEMORY_NODES]; 74 | offset_t end_log_offsets[NUM_MEMORY_NODES]; 75 | offset_t current_log_offsets[NUM_MEMORY_NODES]; 76 | }; 77 | 78 | 79 | // Alloc registered RDMA buffer for each thread 80 | class RDMABufferAllocator { 81 | public: 82 | RDMABufferAllocator(char *s, char *e) : start(s), end(e), cur_offset(0) {} 83 | 84 | char *Alloc(size_t size) { 85 | if (unlikely(start + cur_offset + size > end)) { 86 | cur_offset = 0; 87 | } 88 | char *ret = start + cur_offset; 89 | cur_offset += size; 90 | return ret; 91 | } 92 | 93 | private: 94 | char *start; 95 | char *end; 96 | uint64_t cur_offset; 97 | }; 98 | -------------------------------------------------------------------------------- /dtx/smallbank/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(smallbank_backend backend.cpp) 2 | target_link_libraries(smallbank_backend PUBLIC dtx_smallbank) 3 | 4 | add_executable(smallbank_bench bench.cpp) 5 | target_link_libraries(smallbank_bench PUBLIC dtx_smallbank) 6 | -------------------------------------------------------------------------------- /dtx/smallbank/backend.cpp: -------------------------------------------------------------------------------- 1 | // Some contents of this file are derived from FORD 2 | // https://github.com/minghust/FORD 3 | 4 | #include "util/json_config.h" 5 | #include "smart/target.h" 6 | #include "smart/thread.h" 7 | 8 | #include "../common.h" 9 | #include "../memstore.h" 10 | #include "smallbank.h" 11 | 12 | using namespace sds; 13 | 14 | void setup(Target &target) { 15 | static_assert(MAX_ITEM_SIZE == 8, ""); 16 | uint64_t hash_buf_size = 4ull * 1024 * 1024 * 1024; 17 | 18 | char *hash_buffer = (char *) target.alloc_chunk(hash_buf_size / kChunkSize); 19 | offset_t reserve_start = hash_buf_size * 0.75; 20 | char *hash_reserve_buffer = hash_buffer + reserve_start; 21 | 22 | char *log_buffer = (char *) target.alloc_chunk(LOG_BUFFER_SIZE / kChunkSize); 23 | target.set_root_entry(255, target.rel_ptr(log_buffer).raw); 24 | 25 | memset(hash_buffer, 0, hash_buf_size); 26 | memset(log_buffer, 0, LOG_BUFFER_SIZE); 27 | 28 | MemStoreAllocParam mem_store_alloc_param((char *) target.base_address(), hash_buffer, 0, hash_reserve_buffer); 29 | MemStoreReserveParam mem_store_reserve_param(hash_reserve_buffer, 0, hash_buffer + hash_buf_size); 30 | std::vector all_tables; 31 | auto smallbank = new SmallBank(); 32 | smallbank->LoadTable(&mem_store_alloc_param, &mem_store_reserve_param); 33 | all_tables = smallbank->GetHashStore(); 34 | auto *hash_meta = (HashMeta *) target.alloc_chunk((all_tables.size() * sizeof(HashMeta)) / kChunkSize + 1); 35 | int i = 0; 36 | for (auto &hash_table: all_tables) { 37 | new(&hash_meta[i]) HashMeta(hash_table->GetTableID(), (uint64_t) hash_table->GetDataPtr(), 38 | hash_table->GetBucketNum(), hash_table->GetHashNodeSize(), 39 | hash_table->GetBaseOff()); 40 | SDS_INFO("%ld: %lx %ld %ld", hash_meta[i].table_id, hash_meta[i].base_off, hash_meta[i].bucket_num, 41 | hash_meta[i].node_size); 42 | target.set_root_entry(hash_table->GetTableID(), target.rel_ptr(&hash_meta[i]).raw); 43 | ++i; 44 | } 45 | 46 | target.set_root_entry(0, i); 47 | } 48 | 49 | int main(int argc, char **argv) { 50 | WritePidFile(); 51 | const char *path = ROOT_DIR "/config/backend.json"; 52 | if (argc == 2) { 53 | path = argv[1]; 54 | } 55 | JsonConfig config = JsonConfig::load_file(path); 56 | BindCore((int) config.get("nic_numa_node").get_int64()); 57 | std::string dev_dax_path = config.get("dev_dax_path").get_str(); 58 | size_t capacity = config.get("capacity").get_uint64() * kMegaBytes; 59 | uint16_t tcp_port = (uint16_t) config.get("tcp_port").get_int64(); 60 | Target target; 61 | void *mmap_addr = mapping_memory(dev_dax_path, capacity); 62 | int rc = target.register_main_memory(mmap_addr, capacity); 63 | assert(!rc); 64 | setup(target); 65 | SDS_INFO("Press C to stop the memory node daemon."); 66 | target.start(tcp_port); 67 | while (getchar() != 'c') { sleep(1); } 68 | target.stop(); 69 | return 0; 70 | } 71 | -------------------------------------------------------------------------------- /dtx/tatp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(tatp_backend backend.cpp) 2 | target_link_libraries(tatp_backend PUBLIC dtx_tatp) 3 | 4 | add_executable(tatp_bench bench.cpp) 5 | target_link_libraries(tatp_bench PUBLIC dtx_tatp) 6 | -------------------------------------------------------------------------------- /dtx/tatp/backend.cpp: -------------------------------------------------------------------------------- 1 | // Some contents of this file are derived from FORD 2 | // https://github.com/minghust/FORD 3 | 4 | #include "util/json_config.h" 5 | #include "smart/target.h" 6 | #include "smart/thread.h" 7 | 8 | #include "../common.h" 9 | #include "../memstore.h" 10 | #include "tatp.h" 11 | 12 | using namespace sds; 13 | 14 | void setup(Target &target) { 15 | static_assert(MAX_ITEM_SIZE == 40, ""); 16 | uint64_t hash_buf_size = 4ull * 1024 * 1024 * 1024; 17 | 18 | char *hash_buffer = (char *) target.alloc_chunk(hash_buf_size / kChunkSize); 19 | offset_t reserve_start = hash_buf_size * 0.75; 20 | char *hash_reserve_buffer = hash_buffer + reserve_start; 21 | 22 | char *log_buffer = (char *) target.alloc_chunk(LOG_BUFFER_SIZE / kChunkSize); 23 | target.set_root_entry(255, target.rel_ptr(log_buffer).raw); 24 | 25 | memset(hash_buffer, 0, hash_buf_size); 26 | memset(log_buffer, 0, LOG_BUFFER_SIZE); 27 | 28 | MemStoreAllocParam mem_store_alloc_param((char *) target.base_address(), hash_buffer, 0, hash_reserve_buffer); 29 | MemStoreReserveParam mem_store_reserve_param(hash_reserve_buffer, 0, hash_buffer + hash_buf_size); 30 | std::vector all_tables; 31 | auto tatp = new TATP(); 32 | tatp->LoadTable(&mem_store_alloc_param, &mem_store_reserve_param); 33 | all_tables = tatp->GetHashStore(); 34 | auto *hash_meta = (HashMeta *) target.alloc_chunk((all_tables.size() * sizeof(HashMeta)) / kChunkSize + 1); 35 | int i = 0; 36 | for (auto &hash_table: all_tables) { 37 | new(&hash_meta[i]) HashMeta(hash_table->GetTableID(), (uint64_t) hash_table->GetDataPtr(), 38 | hash_table->GetBucketNum(), hash_table->GetHashNodeSize(), 39 | hash_table->GetBaseOff()); 40 | SDS_INFO("%ld: %lx %ld %ld", hash_meta[i].table_id, hash_meta[i].base_off, hash_meta[i].bucket_num, 41 | hash_meta[i].node_size); 42 | target.set_root_entry(hash_table->GetTableID(), target.rel_ptr(&hash_meta[i]).raw); 43 | ++i; 44 | } 45 | 46 | target.set_root_entry(0, i); 47 | } 48 | 49 | int main(int argc, char **argv) { 50 | WritePidFile(); 51 | const char *path = ROOT_DIR "/config/backend.json"; 52 | if (argc == 2) { 53 | path = argv[1]; 54 | } 55 | JsonConfig config = JsonConfig::load_file(path); 56 | BindCore((int) config.get("nic_numa_node").get_int64()); 57 | std::string dev_dax_path = config.get("dev_dax_path").get_str(); 58 | size_t capacity = config.get("capacity").get_uint64() * kMegaBytes; 59 | uint16_t tcp_port = (uint16_t) config.get("tcp_port").get_int64(); 60 | Target target; 61 | void *mmap_addr = mapping_memory(dev_dax_path, capacity); 62 | int rc = target.register_main_memory(mmap_addr, capacity); 63 | assert(!rc); 64 | setup(target); 65 | SDS_INFO("Press C to stop the memory node daemon."); 66 | target.start(tcp_port); 67 | while (getchar() != 'c') { sleep(1); } 68 | target.stop(); 69 | return 0; 70 | } 71 | -------------------------------------------------------------------------------- /hashtable/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(hashtable_backend backend.cpp) 2 | target_link_libraries(hashtable_backend PUBLIC smart) 3 | 4 | add_executable(hashtable_bench bench.cpp hashtable.cpp) 5 | target_link_libraries(hashtable_bench PUBLIC smart) 6 | 7 | add_executable(hashtable_bench_prof bench.cpp hashtable.cpp) 8 | target_compile_definitions(hashtable_bench_prof PUBLIC -DCONFIG_STAT) 9 | target_link_libraries(hashtable_bench_prof PUBLIC smart) -------------------------------------------------------------------------------- /hashtable/backend.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "util/json_config.h" 26 | #include "smart/target.h" 27 | 28 | #include "hashtable.h" 29 | 30 | using namespace sds; 31 | 32 | int main(int argc, char **argv) { 33 | WritePidFile(); 34 | const char *path = ROOT_DIR "/config/backend.json"; 35 | if (argc == 2) { 36 | path = argv[1]; 37 | } 38 | JsonConfig config = JsonConfig::load_file(path); 39 | BindCore((int) config.get("nic_numa_node").get_int64()); 40 | std::string dev_dax_path = ""; // config.get("dev_dax_path").get_str(); 41 | size_t capacity = config.get("capacity").get_uint64() * kMegaBytes; 42 | uint16_t tcp_port = (uint16_t) config.get("tcp_port").get_int64(); 43 | Target target; 44 | void *mmap_addr = mapping_memory(dev_dax_path, capacity); 45 | int rc = target.register_main_memory(mmap_addr, capacity); 46 | assert(!rc); 47 | RemoteHashTable::Setup(target); 48 | SDS_INFO("Press C to stop the memory node daemon."); 49 | target.start(tcp_port); 50 | while (getchar() != 'c') { sleep(1); } 51 | target.stop(); 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /hashtable/bench.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "util/json_config.h" 26 | #include "smart/benchmark.h" 27 | #include "hashtable.h" 28 | 29 | int main(int argc, char **argv) { 30 | using namespace sds; 31 | using namespace sds::datastructure; 32 | const char *path = ROOT_DIR "/config/datastructure.json"; 33 | if (getenv("APP_CONFIG_PATH")) { 34 | path = getenv("APP_CONFIG_PATH"); 35 | } 36 | JsonConfig config = JsonConfig::load_file(path); 37 | if (config.get("memory_servers").size() > 1) { 38 | BenchmarkRunner runner(config, argc, argv); 39 | if (runner.spawn()) { 40 | exit(EXIT_FAILURE); 41 | } 42 | } else { 43 | BenchmarkRunner runner(config, argc, argv); 44 | if (runner.spawn()) { 45 | exit(EXIT_FAILURE); 46 | } 47 | } 48 | return 0; 49 | } -------------------------------------------------------------------------------- /include/smart/global_address.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef SDS_GLOBAL_ADDRESS_H 26 | #define SDS_GLOBAL_ADDRESS_H 27 | 28 | #include 29 | 30 | namespace sds { 31 | using node_t = uint8_t; 32 | using mr_id_t = uint8_t; 33 | 34 | const static mr_id_t MAIN_MEMORY_MR_ID = 0; 35 | const static mr_id_t DEVICE_MEMORY_MR_ID = 1; 36 | const static size_t kMemoryRegions = 2; 37 | 38 | union GlobalAddress { 39 | struct { 40 | uint64_t offset: 48; 41 | uint64_t mr_id: 8; 42 | uint64_t node: 8; 43 | }; 44 | uint64_t raw; 45 | 46 | public: 47 | GlobalAddress(uint64_t raw = UINT64_MAX) noexcept: raw(raw) {} 48 | 49 | GlobalAddress(node_t node, uint64_t offset) noexcept: node(node), mr_id(MAIN_MEMORY_MR_ID), offset(offset) {} 50 | 51 | GlobalAddress(node_t node, mr_id_t mr_id, uint64_t offset) noexcept: node(node), mr_id(mr_id), offset(offset) {} 52 | 53 | GlobalAddress(const GlobalAddress &rhs) noexcept: raw(rhs.raw) {} 54 | 55 | GlobalAddress &operator=(const GlobalAddress &rhs) { 56 | this->raw = rhs.raw; 57 | return *this; 58 | } 59 | 60 | GlobalAddress operator+(uint64_t delta) const { 61 | assert(offset + delta >= offset); // prevent overflow 62 | return {raw + delta}; 63 | } 64 | 65 | bool operator==(const GlobalAddress &rhs) const { 66 | return this->raw == rhs.raw; 67 | } 68 | 69 | bool operator!=(const GlobalAddress &rhs) const { 70 | return this->raw != rhs.raw; 71 | } 72 | }; 73 | 74 | static_assert(sizeof(GlobalAddress) == sizeof(uint64_t), ""); 75 | 76 | static const GlobalAddress NULL_GLOBAL_ADDRESS; 77 | } 78 | 79 | #endif //SDS_GLOBAL_ADDRESS_H 80 | -------------------------------------------------------------------------------- /include/smart/super_chunk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef SDS_SUPER_CHUNK_H 26 | #define SDS_SUPER_CHUNK_H 27 | 28 | #include 29 | #include 30 | 31 | namespace sds { 32 | const static size_t kMaxRootEntries = 256; 33 | 34 | struct SuperChunk { 35 | uint64_t max_chunk; 36 | uint64_t alloc_chunk; 37 | uint64_t root_entries[kMaxRootEntries]; 38 | }; 39 | 40 | static_assert(sizeof(SuperChunk) <= kChunkSize, ""); 41 | } 42 | 43 | #endif //SDS_SUPER_CHUNK_H 44 | -------------------------------------------------------------------------------- /include/smart/target.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef SDS_TARGET_H 26 | #define SDS_TARGET_H 27 | 28 | #include "resource_manager.h" 29 | #include "super_chunk.h" 30 | 31 | namespace sds { 32 | class Target { 33 | public: 34 | Target(); 35 | 36 | ~Target(); 37 | 38 | Target(const Target &) = delete; 39 | 40 | Target &operator=(const Target &) = delete; 41 | 42 | public: 43 | int register_main_memory(void *addr, size_t length); 44 | 45 | int register_device_memory(size_t length); 46 | 47 | int copy_from_device_memory(void *dst_addr, uint64_t src_offset, size_t length) { 48 | return manager_.copy_from_device_memory(dst_addr, src_offset, length); 49 | } 50 | 51 | int copy_to_device_memory(uint64_t dst_offset, void *src_addr, size_t length) { 52 | return manager_.copy_to_device_memory(dst_offset, src_addr, length); 53 | } 54 | 55 | void *alloc_chunk(size_t count); 56 | 57 | const void *base_address() const { return super_; } 58 | 59 | // void free_chunk(void *ptr, size_t count); 60 | 61 | GlobalAddress rel_ptr(void *addr); 62 | 63 | void set_root_entry(uint8_t index, uint64_t value) { 64 | assert(super_); 65 | super_->root_entries[index] = value; 66 | } 67 | 68 | uint64_t get_root_entry(uint8_t index) { 69 | assert(super_); 70 | return super_->root_entries[index]; 71 | } 72 | 73 | int start(uint16_t tcp_port); 74 | 75 | int stop(); 76 | 77 | private: 78 | ResourceManager manager_; 79 | ResourceManager::Listener *listener_; 80 | SuperChunk *super_; 81 | }; 82 | } 83 | 84 | #endif //SDS_TARGET_H 85 | -------------------------------------------------------------------------------- /include/util/fcontext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #ifndef SDS_FCONTEXT_H 26 | #define SDS_FCONTEXT_H 27 | 28 | #include 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | typedef void *fcontext_t; 35 | 36 | typedef struct { 37 | fcontext_t fctx; 38 | void *data; 39 | } transfer_t; 40 | 41 | fcontext_t make_fcontext(void *sp, size_t size, void(*fn)(transfer_t)); 42 | transfer_t jump_fcontext(fcontext_t const to, void *vp); 43 | transfer_t ontop_fcontext(fcontext_t const to, void *vp, transfer_t(*fn)(transfer_t)); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif //SDS_FCONTEXT_H 50 | -------------------------------------------------------------------------------- /include/util/murmur.h: -------------------------------------------------------------------------------- 1 | // 2 | // Adapted from https://github.com/PeterScott/murmur3 3 | // 4 | // All this code is in the public domain. Murmur3 was created by Austin Appleby, 5 | // and the C port and general tidying up was done by Peter Scott. 6 | // 7 | 8 | #ifndef SDS_MURMUR_H 9 | #define SDS_MURMUR_H 10 | 11 | #include 12 | 13 | static inline uint32_t rotl32(uint32_t x, int8_t r) { 14 | return (x << r) | (x >> (32 - r)); 15 | } 16 | 17 | static inline uint32_t fmix32(uint32_t h) { 18 | h ^= h >> 16; 19 | h *= 0x85ebca6b; 20 | h ^= h >> 13; 21 | h *= 0xc2b2ae35; 22 | h ^= h >> 16; 23 | return h; 24 | } 25 | 26 | static inline uint32_t MurmurHash3_x86_32(const void *key, int len, uint32_t seed) { 27 | const uint8_t *data = (const uint8_t *) key; 28 | const int nblocks = len / 4; 29 | uint32_t h1 = seed; 30 | const uint32_t c1 = 0xcc9e2d51; 31 | const uint32_t c2 = 0x1b873593; 32 | const uint32_t *blocks = (const uint32_t *) (data + nblocks * 4); 33 | for (int i = -nblocks; i; i++) { 34 | uint32_t k1 = blocks[i]; 35 | k1 *= c1; 36 | k1 = rotl32(k1, 15); 37 | k1 *= c2; 38 | h1 ^= k1; 39 | h1 = rotl32(h1, 13); 40 | h1 = h1 * 5 + 0xe6546b64; 41 | } 42 | const uint8_t *tail = (const uint8_t *) (data + nblocks * 4); 43 | uint32_t k1 = 0; 44 | switch (len & 3) { 45 | case 3: 46 | k1 ^= tail[2] << 16; 47 | case 2: 48 | k1 ^= tail[1] << 8; 49 | case 1: 50 | k1 ^= tail[0]; 51 | k1 *= c1; 52 | k1 = rotl32(k1, 15); 53 | k1 *= c2; 54 | h1 ^= k1; 55 | } 56 | h1 ^= len; 57 | h1 = fmix32(h1); 58 | return h1; 59 | } 60 | 61 | static inline uint64_t MurmurHash64A(uint64_t key, unsigned int seed) { 62 | const uint64_t m = 0xc6a4a7935bd1e995; 63 | const int r = 47; 64 | uint64_t h = seed ^ (8 * m); 65 | const uint64_t* data = &key; 66 | const uint64_t* end = data + 1; 67 | 68 | while (data != end) { 69 | uint64_t k = *data++; 70 | k *= m; 71 | k ^= k >> r; 72 | k *= m; 73 | h ^= k; 74 | h *= m; 75 | } 76 | 77 | const unsigned char* data2 = (const unsigned char*)data; 78 | 79 | switch (8 & 7) { 80 | case 7: 81 | h ^= uint64_t(data2[6]) << 48; 82 | case 6: 83 | h ^= uint64_t(data2[5]) << 40; 84 | case 5: 85 | h ^= uint64_t(data2[4]) << 32; 86 | case 4: 87 | h ^= uint64_t(data2[3]) << 24; 88 | case 3: 89 | h ^= uint64_t(data2[2]) << 16; 90 | case 2: 91 | h ^= uint64_t(data2[1]) << 8; 92 | case 1: 93 | h ^= uint64_t(data2[0]); 94 | h *= m; 95 | }; 96 | 97 | h ^= h >> r; 98 | h *= m; 99 | h ^= h >> r; 100 | 101 | return h; 102 | } 103 | 104 | #endif //SDS_MURMUR_H 105 | -------------------------------------------------------------------------------- /include/util/rapidjson/error/en.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_ERROR_EN_H__ 16 | #define RAPIDJSON_ERROR_EN_H__ 17 | 18 | #include "error.h" 19 | 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | 23 | //! Maps error code of parsing into error message. 24 | /*! 25 | \ingroup RAPIDJSON_ERRORS 26 | \param parseErrorCode Error code obtained in parsing. 27 | \return the error message. 28 | \note User can make a copy of this function for localization. 29 | Using switch-case is safer for future modification of error codes. 30 | */ 31 | inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErrorCode) { 32 | switch (parseErrorCode) { 33 | case kParseErrorNone: return RAPIDJSON_ERROR_STRING("No error."); 34 | 35 | case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_STRING("The document is empty."); 36 | case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_STRING("The document root must not follow by other values."); 37 | 38 | case kParseErrorValueInvalid: return RAPIDJSON_ERROR_STRING("Invalid value."); 39 | 40 | case kParseErrorObjectMissName: return RAPIDJSON_ERROR_STRING("Missing a name for object member."); 41 | case kParseErrorObjectMissColon: return RAPIDJSON_ERROR_STRING("Missing a colon after a name of object member."); 42 | case kParseErrorObjectMissCommaOrCurlyBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or '}' after an object member."); 43 | 44 | case kParseErrorArrayMissCommaOrSquareBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or ']' after an array element."); 45 | 46 | case kParseErrorStringUnicodeEscapeInvalidHex: return RAPIDJSON_ERROR_STRING("Incorrect hex digit after \\u escape in string."); 47 | case kParseErrorStringUnicodeSurrogateInvalid: return RAPIDJSON_ERROR_STRING("The surrogate pair in string is invalid."); 48 | case kParseErrorStringEscapeInvalid: return RAPIDJSON_ERROR_STRING("Invalid escape character in string."); 49 | case kParseErrorStringMissQuotationMark: return RAPIDJSON_ERROR_STRING("Missing a closing quotation mark in string."); 50 | case kParseErrorStringInvalidEncoding: return RAPIDJSON_ERROR_STRING("Invalid encoding in string."); 51 | 52 | case kParseErrorNumberTooBig: return RAPIDJSON_ERROR_STRING("Number too big to be stored in double."); 53 | case kParseErrorNumberMissFraction: return RAPIDJSON_ERROR_STRING("Miss fraction part in number."); 54 | case kParseErrorNumberMissExponent: return RAPIDJSON_ERROR_STRING("Miss exponent in number."); 55 | 56 | case kParseErrorTermination: return RAPIDJSON_ERROR_STRING("Terminate parsing due to Handler error."); 57 | case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_STRING("Unspecific syntax error."); 58 | 59 | default:return RAPIDJSON_ERROR_STRING("Unknown error."); 60 | } 61 | } 62 | 63 | RAPIDJSON_NAMESPACE_END 64 | 65 | #endif // RAPIDJSON_ERROR_EN_H__ 66 | -------------------------------------------------------------------------------- /include/util/rapidjson/filereadstream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_FILEREADSTREAM_H_ 16 | #define RAPIDJSON_FILEREADSTREAM_H_ 17 | 18 | #include "rapidjson.h" 19 | #include 20 | 21 | 22 | RAPIDJSON_NAMESPACE_BEGIN 23 | 24 | //! File byte stream for input using fread(). 25 | /*! 26 | \note implements Stream concept 27 | */ 28 | class FileReadStream { 29 | public: 30 | typedef char Ch; //!< Character type (byte). 31 | 32 | //! Constructor. 33 | /*! 34 | \param fp File pointer opened for read. 35 | \param buffer user-supplied buffer. 36 | \param bufferSize size of buffer in bytes. Must >=4 bytes. 37 | */ 38 | FileReadStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { 39 | RAPIDJSON_ASSERT(fp_ != 0); 40 | RAPIDJSON_ASSERT(bufferSize >= 4); 41 | Read(); 42 | } 43 | 44 | Ch Peek() const { return *current_; } 45 | Ch Take() { 46 | Ch c = *current_; 47 | Read(); 48 | return c; 49 | } 50 | size_t Tell() const { return count_ + static_cast(current_ - buffer_); } 51 | 52 | // Not implemented 53 | void Put(Ch) { RAPIDJSON_ASSERT(false); } 54 | void Flush() { RAPIDJSON_ASSERT(false); } 55 | Ch* PutBegin() { 56 | RAPIDJSON_ASSERT(false); 57 | return 0; 58 | } 59 | size_t PutEnd(Ch*) { 60 | RAPIDJSON_ASSERT(false); 61 | return 0; 62 | } 63 | 64 | // For encoding detection only. 65 | const Ch* Peek4() const { 66 | return (current_ + 4 <= bufferLast_) ? current_ : 0; 67 | } 68 | 69 | private: 70 | void Read() { 71 | if (current_ < bufferLast_) 72 | ++current_; 73 | else if (!eof_) { 74 | count_ += readCount_; 75 | readCount_ = fread(buffer_, 1, bufferSize_, fp_); 76 | bufferLast_ = buffer_ + readCount_ - 1; 77 | current_ = buffer_; 78 | 79 | if (readCount_ < bufferSize_) { 80 | buffer_[readCount_] = '\0'; 81 | ++bufferLast_; 82 | eof_ = true; 83 | } 84 | } 85 | } 86 | 87 | std::FILE* fp_; 88 | Ch* buffer_; 89 | size_t bufferSize_; 90 | Ch* bufferLast_; 91 | Ch* current_; 92 | size_t readCount_; 93 | size_t count_; //!< Number of characters read 94 | bool eof_; 95 | }; 96 | 97 | RAPIDJSON_NAMESPACE_END 98 | 99 | #endif // RAPIDJSON_FILESTREAM_H_ 100 | -------------------------------------------------------------------------------- /include/util/rapidjson/filewritestream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_FILEWRITESTREAM_H_ 16 | #define RAPIDJSON_FILEWRITESTREAM_H_ 17 | 18 | #include "rapidjson.h" 19 | #include 20 | 21 | 22 | RAPIDJSON_NAMESPACE_BEGIN 23 | 24 | //! Wrapper of C file stream for input using fread(). 25 | /*! 26 | \note implements Stream concept 27 | */ 28 | class FileWriteStream { 29 | public: 30 | typedef char Ch; //!< Character type. Only support char. 31 | 32 | FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) { 33 | RAPIDJSON_ASSERT(fp_ != 0); 34 | } 35 | 36 | void Put(char c) { 37 | if (current_ >= bufferEnd_) 38 | Flush(); 39 | 40 | *current_++ = c; 41 | } 42 | 43 | void PutN(char c, size_t n) { 44 | size_t avail = static_cast(bufferEnd_ - current_); 45 | while (n > avail) { 46 | std::memset(current_, c, avail); 47 | current_ += avail; 48 | Flush(); 49 | n -= avail; 50 | avail = static_cast(bufferEnd_ - current_); 51 | } 52 | 53 | if (n > 0) { 54 | std::memset(current_, c, n); 55 | current_ += n; 56 | } 57 | } 58 | 59 | void Flush() { 60 | if (current_ != buffer_) { 61 | size_t result = fwrite(buffer_, 1, static_cast(current_ - buffer_), fp_); 62 | if (result < static_cast(current_ - buffer_)) { 63 | // failure deliberately ignored at this time 64 | // added to avoid warn_unused_result build errors 65 | } 66 | current_ = buffer_; 67 | } 68 | } 69 | 70 | // Not implemented 71 | char Peek() const { 72 | RAPIDJSON_ASSERT(false); 73 | return 0; 74 | } 75 | char Take() { 76 | RAPIDJSON_ASSERT(false); 77 | return 0; 78 | } 79 | size_t Tell() const { 80 | RAPIDJSON_ASSERT(false); 81 | return 0; 82 | } 83 | char* PutBegin() { 84 | RAPIDJSON_ASSERT(false); 85 | return 0; 86 | } 87 | size_t PutEnd(char*) { 88 | RAPIDJSON_ASSERT(false); 89 | return 0; 90 | } 91 | 92 | private: 93 | // Prohibit copy constructor & assignment operator. 94 | FileWriteStream(const FileWriteStream&); 95 | FileWriteStream& operator=(const FileWriteStream&); 96 | 97 | std::FILE* fp_; 98 | char* buffer_; 99 | char* bufferEnd_; 100 | char* current_; 101 | }; 102 | 103 | //! Implement specialized version of PutN() with memset() for better performance. 104 | template <> 105 | inline void PutN(FileWriteStream& stream, char c, size_t n) { 106 | stream.PutN(c, n); 107 | } 108 | 109 | RAPIDJSON_NAMESPACE_END 110 | 111 | #endif // RAPIDJSON_FILESTREAM_H_ 112 | -------------------------------------------------------------------------------- /include/util/rapidjson/internal/ieee754.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_IEEE754_ 16 | #define RAPIDJSON_IEEE754_ 17 | 18 | #include "util/rapidjson/rapidjson.h" 19 | 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | namespace internal { 23 | 24 | class Double { 25 | public: 26 | Double() {} 27 | Double(double d) : d_(d) {} 28 | Double(uint64_t u) : u_(u) {} 29 | 30 | double Value() const { return d_; } 31 | uint64_t Uint64Value() const { return u_; } 32 | 33 | double NextPositiveDouble() const { 34 | RAPIDJSON_ASSERT(!Sign()); 35 | return Double(u_ + 1).Value(); 36 | } 37 | 38 | bool Sign() const { return (u_ & kSignMask) != 0; } 39 | uint64_t Significand() const { return u_ & kSignificandMask; } 40 | int Exponent() const { return static_cast(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); } 41 | 42 | bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; } 43 | bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; } 44 | bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; } 45 | bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; } 46 | 47 | uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); } 48 | int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; } 49 | uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; } 50 | 51 | static unsigned EffectiveSignificandSize(int order) { 52 | if (order >= -1021) 53 | return 53; 54 | else if (order <= -1074) 55 | return 0; 56 | else 57 | return (unsigned) order + 1074; 58 | } 59 | 60 | private: 61 | static const int kSignificandSize = 52; 62 | static const int kExponentBias = 0x3FF; 63 | static const int kDenormalExponent = 1 - kExponentBias; 64 | static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000); 65 | static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); 66 | static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); 67 | static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); 68 | 69 | union { 70 | double d_; 71 | uint64_t u_; 72 | }; 73 | }; 74 | 75 | } // namespace internal 76 | RAPIDJSON_NAMESPACE_END 77 | 78 | #endif // RAPIDJSON_IEEE754_ 79 | -------------------------------------------------------------------------------- /include/util/rapidjson/internal/pow10.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_POW10_ 16 | #define RAPIDJSON_POW10_ 17 | 18 | #include "util/rapidjson/rapidjson.h" 19 | 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | namespace internal { 23 | 24 | //! Computes integer powers of 10 in double (10.0^n). 25 | /*! This function uses lookup table for fast and accurate results. 26 | \param n non-negative exponent. Must <= 308. 27 | \return 10.0^n 28 | */ 29 | inline double Pow10(int n) { 30 | static const double e[] = { // 1e-0...1e308: 309 * 8 bytes = 2472 bytes 31 | 1e+0, 32 | 1e+1, 1e+2, 1e+3, 1e+4, 1e+5, 1e+6, 1e+7, 1e+8, 1e+9, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, 33 | 1e+21, 1e+22, 1e+23, 1e+24, 1e+25, 1e+26, 1e+27, 1e+28, 1e+29, 1e+30, 1e+31, 1e+32, 1e+33, 1e+34, 1e+35, 1e+36, 1e+37, 1e+38, 1e+39, 1e+40, 34 | 1e+41, 1e+42, 1e+43, 1e+44, 1e+45, 1e+46, 1e+47, 1e+48, 1e+49, 1e+50, 1e+51, 1e+52, 1e+53, 1e+54, 1e+55, 1e+56, 1e+57, 1e+58, 1e+59, 1e+60, 35 | 1e+61, 1e+62, 1e+63, 1e+64, 1e+65, 1e+66, 1e+67, 1e+68, 1e+69, 1e+70, 1e+71, 1e+72, 1e+73, 1e+74, 1e+75, 1e+76, 1e+77, 1e+78, 1e+79, 1e+80, 36 | 1e+81, 1e+82, 1e+83, 1e+84, 1e+85, 1e+86, 1e+87, 1e+88, 1e+89, 1e+90, 1e+91, 1e+92, 1e+93, 1e+94, 1e+95, 1e+96, 1e+97, 1e+98, 1e+99, 1e+100, 37 | 1e+101, 1e+102, 1e+103, 1e+104, 1e+105, 1e+106, 1e+107, 1e+108, 1e+109, 1e+110, 1e+111, 1e+112, 1e+113, 1e+114, 1e+115, 1e+116, 1e+117, 1e+118, 1e+119, 1e+120, 38 | 1e+121, 1e+122, 1e+123, 1e+124, 1e+125, 1e+126, 1e+127, 1e+128, 1e+129, 1e+130, 1e+131, 1e+132, 1e+133, 1e+134, 1e+135, 1e+136, 1e+137, 1e+138, 1e+139, 1e+140, 39 | 1e+141, 1e+142, 1e+143, 1e+144, 1e+145, 1e+146, 1e+147, 1e+148, 1e+149, 1e+150, 1e+151, 1e+152, 1e+153, 1e+154, 1e+155, 1e+156, 1e+157, 1e+158, 1e+159, 1e+160, 40 | 1e+161, 1e+162, 1e+163, 1e+164, 1e+165, 1e+166, 1e+167, 1e+168, 1e+169, 1e+170, 1e+171, 1e+172, 1e+173, 1e+174, 1e+175, 1e+176, 1e+177, 1e+178, 1e+179, 1e+180, 41 | 1e+181, 1e+182, 1e+183, 1e+184, 1e+185, 1e+186, 1e+187, 1e+188, 1e+189, 1e+190, 1e+191, 1e+192, 1e+193, 1e+194, 1e+195, 1e+196, 1e+197, 1e+198, 1e+199, 1e+200, 42 | 1e+201, 1e+202, 1e+203, 1e+204, 1e+205, 1e+206, 1e+207, 1e+208, 1e+209, 1e+210, 1e+211, 1e+212, 1e+213, 1e+214, 1e+215, 1e+216, 1e+217, 1e+218, 1e+219, 1e+220, 43 | 1e+221, 1e+222, 1e+223, 1e+224, 1e+225, 1e+226, 1e+227, 1e+228, 1e+229, 1e+230, 1e+231, 1e+232, 1e+233, 1e+234, 1e+235, 1e+236, 1e+237, 1e+238, 1e+239, 1e+240, 44 | 1e+241, 1e+242, 1e+243, 1e+244, 1e+245, 1e+246, 1e+247, 1e+248, 1e+249, 1e+250, 1e+251, 1e+252, 1e+253, 1e+254, 1e+255, 1e+256, 1e+257, 1e+258, 1e+259, 1e+260, 45 | 1e+261, 1e+262, 1e+263, 1e+264, 1e+265, 1e+266, 1e+267, 1e+268, 1e+269, 1e+270, 1e+271, 1e+272, 1e+273, 1e+274, 1e+275, 1e+276, 1e+277, 1e+278, 1e+279, 1e+280, 46 | 1e+281, 1e+282, 1e+283, 1e+284, 1e+285, 1e+286, 1e+287, 1e+288, 1e+289, 1e+290, 1e+291, 1e+292, 1e+293, 1e+294, 1e+295, 1e+296, 1e+297, 1e+298, 1e+299, 1e+300, 47 | 1e+301, 1e+302, 1e+303, 1e+304, 1e+305, 1e+306, 1e+307, 1e+308 48 | }; 49 | RAPIDJSON_ASSERT(n >= 0 && n <= 308); 50 | return e[n]; 51 | } 52 | 53 | } // namespace internal 54 | RAPIDJSON_NAMESPACE_END 55 | 56 | #endif // RAPIDJSON_POW10_ 57 | -------------------------------------------------------------------------------- /include/util/rapidjson/internal/strfunc.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ 16 | #define RAPIDJSON_INTERNAL_STRFUNC_H_ 17 | 18 | #include "util/rapidjson/rapidjson.h" 19 | 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | namespace internal { 23 | 24 | //! Custom strlen() which works on different character types. 25 | /*! \tparam Ch Character type (e.g. char, wchar_t, short) 26 | \param s Null-terminated input string. 27 | \return Number of characters in the string. 28 | \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. 29 | */ 30 | template 31 | inline SizeType StrLen(const Ch* s) { 32 | const Ch* p = s; 33 | while (*p) ++p; 34 | return SizeType(p - s); 35 | } 36 | 37 | } // namespace internal 38 | RAPIDJSON_NAMESPACE_END 39 | 40 | #endif // RAPIDJSON_INTERNAL_STRFUNC_H_ 41 | -------------------------------------------------------------------------------- /include/util/rapidjson/internal/swap.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_INTERNAL_SWAP_H_ 16 | #define RAPIDJSON_INTERNAL_SWAP_H_ 17 | 18 | #include "util/rapidjson/rapidjson.h" 19 | 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | namespace internal { 23 | 24 | //! Custom swap() to avoid dependency on C++ header 25 | /*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only. 26 | \note This has the same semantics as std::swap(). 27 | */ 28 | template 29 | inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT { 30 | T tmp = a; 31 | a = b; 32 | b = tmp; 33 | } 34 | 35 | } // namespace internal 36 | RAPIDJSON_NAMESPACE_END 37 | 38 | #endif // RAPIDJSON_INTERNAL_SWAP_H_ 39 | -------------------------------------------------------------------------------- /include/util/rapidjson/memorybuffer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYBUFFER_H_ 16 | #define RAPIDJSON_MEMORYBUFFER_H_ 17 | 18 | #include "rapidjson.h" 19 | #include "util/rapidjson/internal/stack.h" 20 | 21 | 22 | RAPIDJSON_NAMESPACE_BEGIN 23 | 24 | //! Represents an in-memory output byte stream. 25 | /*! 26 | This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream. 27 | 28 | It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file. 29 | 30 | Differences between MemoryBuffer and StringBuffer: 31 | 1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer. 32 | 2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator. 33 | 34 | \tparam Allocator type for allocating memory buffer. 35 | \note implements Stream concept 36 | */ 37 | template 38 | struct GenericMemoryBuffer { 39 | typedef char Ch; // byte 40 | 41 | GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} 42 | 43 | void Put(Ch c) { *stack_.template Push() = c; } 44 | void Flush() {} 45 | 46 | void Clear() { stack_.Clear(); } 47 | void ShrinkToFit() { stack_.ShrinkToFit(); } 48 | Ch* Push(size_t count) { return stack_.template Push(count); } 49 | void Pop(size_t count) { stack_.template Pop(count); } 50 | 51 | const Ch* GetBuffer() const { 52 | return stack_.template Bottom(); 53 | } 54 | 55 | size_t GetSize() const { return stack_.GetSize(); } 56 | 57 | static const size_t kDefaultCapacity = 256; 58 | mutable internal::Stack stack_; 59 | }; 60 | 61 | typedef GenericMemoryBuffer<> MemoryBuffer; 62 | 63 | //! Implement specialized version of PutN() with memset() for better performance. 64 | template <> 65 | inline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) { 66 | std::memset(memoryBuffer.stack_.Push(n), c, n * sizeof(c)); 67 | } 68 | 69 | RAPIDJSON_NAMESPACE_END 70 | 71 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 72 | -------------------------------------------------------------------------------- /include/util/rapidjson/memorystream.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_MEMORYSTREAM_H_ 16 | #define RAPIDJSON_MEMORYSTREAM_H_ 17 | 18 | #include "rapidjson.h" 19 | 20 | 21 | RAPIDJSON_NAMESPACE_BEGIN 22 | 23 | //! Represents an in-memory input byte stream. 24 | /*! 25 | This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream. 26 | 27 | It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file. 28 | 29 | Differences between MemoryStream and StringStream: 30 | 1. StringStream has encoding but MemoryStream is a byte stream. 31 | 2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source. 32 | 3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4(). 33 | \note implements Stream concept 34 | */ 35 | struct MemoryStream { 36 | typedef char Ch; // byte 37 | 38 | MemoryStream(const Ch* src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {} 39 | 40 | Ch Peek() const { return (src_ == end_) ? '\0' : *src_; } 41 | Ch Take() { return (src_ == end_) ? '\0' : *src_++; } 42 | size_t Tell() const { return static_cast(src_ - begin_); } 43 | 44 | Ch* PutBegin() { 45 | RAPIDJSON_ASSERT(false); 46 | return 0; 47 | } 48 | void Put(Ch) { RAPIDJSON_ASSERT(false); } 49 | void Flush() { RAPIDJSON_ASSERT(false); } 50 | size_t PutEnd(Ch*) { 51 | RAPIDJSON_ASSERT(false); 52 | return 0; 53 | } 54 | 55 | // For encoding detection only. 56 | const Ch* Peek4() const { 57 | return Tell() + 4 <= size_ ? src_ : 0; 58 | } 59 | 60 | const Ch* src_; //!< Current read position. 61 | const Ch* begin_; //!< Original head of the string. 62 | const Ch* end_; //!< End of stream. 63 | size_t size_; //!< Size of the stream. 64 | }; 65 | 66 | RAPIDJSON_NAMESPACE_END 67 | 68 | #endif // RAPIDJSON_MEMORYBUFFER_H_ 69 | -------------------------------------------------------------------------------- /include/util/rapidjson/stringbuffer.h: -------------------------------------------------------------------------------- 1 | // Tencent is pleased to support the open source community by making RapidJSON available. 2 | // 3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 4 | // 5 | // Licensed under the MIT License (the "License"); you may not use this file except 6 | // in compliance with the License. You may obtain a copy of the License at 7 | // 8 | // http://opensource.org/licenses/MIT 9 | // 10 | // Unless required by applicable law or agreed to in writing, software distributed 11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 13 | // specific language governing permissions and limitations under the License. 14 | 15 | #ifndef RAPIDJSON_STRINGBUFFER_H_ 16 | #define RAPIDJSON_STRINGBUFFER_H_ 17 | 18 | #include "rapidjson.h" 19 | 20 | 21 | #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 22 | 23 | #include // std::move 24 | 25 | 26 | #endif 27 | 28 | #include "util/rapidjson/internal/stack.h" 29 | 30 | 31 | RAPIDJSON_NAMESPACE_BEGIN 32 | 33 | //! Represents an in-memory output stream. 34 | /*! 35 | \tparam Encoding Encoding of the stream. 36 | \tparam Allocator type for allocating memory buffer. 37 | \note implements Stream concept 38 | */ 39 | template 40 | class GenericStringBuffer { 41 | public: 42 | typedef typename Encoding::Ch Ch; 43 | 44 | GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} 45 | 46 | #if RAPIDJSON_HAS_CXX11_RVALUE_REFS 47 | GenericStringBuffer(GenericStringBuffer&& rhs) : stack_(std::move(rhs.stack_)) {} 48 | GenericStringBuffer& operator=(GenericStringBuffer&& rhs) { 49 | if (&rhs != this) 50 | stack_ = std::move(rhs.stack_); 51 | return *this; 52 | } 53 | #endif 54 | 55 | void Put(Ch c) { *stack_.template Push() = c; } 56 | void Flush() {} 57 | 58 | void Clear() { stack_.Clear(); } 59 | void ShrinkToFit() { 60 | // Push and pop a null terminator. This is safe. 61 | *stack_.template Push() = '\0'; 62 | stack_.ShrinkToFit(); 63 | stack_.template Pop(1); 64 | } 65 | Ch* Push(size_t count) { return stack_.template Push(count); } 66 | void Pop(size_t count) { stack_.template Pop(count); } 67 | 68 | const Ch* GetString() const { 69 | // Push and pop a null terminator. This is safe. 70 | *stack_.template Push() = '\0'; 71 | stack_.template Pop(1); 72 | 73 | return stack_.template Bottom(); 74 | } 75 | 76 | size_t GetSize() const { return stack_.GetSize(); } 77 | 78 | static const size_t kDefaultCapacity = 256; 79 | mutable internal::Stack stack_; 80 | 81 | private: 82 | // Prohibit copy constructor & assignment operator. 83 | GenericStringBuffer(const GenericStringBuffer&); 84 | GenericStringBuffer& operator=(const GenericStringBuffer&); 85 | }; 86 | 87 | //! String buffer with UTF8 encoding 88 | typedef GenericStringBuffer > StringBuffer; 89 | 90 | //! Implement specialized version of PutN() with memset() for better performance. 91 | template <> 92 | inline void PutN(GenericStringBuffer >& stream, char c, size_t n) { 93 | std::memset(stream.stack_.Push(n), c, n * sizeof(c)); 94 | } 95 | 96 | RAPIDJSON_NAMESPACE_END 97 | 98 | #endif // RAPIDJSON_STRINGBUFFER_H_ 99 | -------------------------------------------------------------------------------- /killall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ae/collect/common.sh 4 | if [ $HOSTNAME != $client_machine ] 5 | then 6 | echo "You must run this script in $client_machine" 7 | echo "Hint: you may check out the field 'client_machine' in ae/collect/common.sh" 8 | exit 1 9 | fi 10 | 11 | cd build 12 | bash ../ae/collect/killall.sh 13 | -------------------------------------------------------------------------------- /patch/guide.md: -------------------------------------------------------------------------------- 1 | By default, the RDMA driver allows **at most** 12 median-latency 2 | doorbell registers per RDMA context, which make our 3 | optimiazation impractial. To remove such restriction, we have hacked the rdma-core library used for our test platform. 4 | 5 | You may have to recompile the rdma-core library and preload it when executing the application. 6 | 7 | 1. Fetch the source code of the latest rdma-core library, and install it to your system. 8 | 9 | 2. Edit the file `rdma-core/providers/mlx5/mlx5.c`, starting from Line 554. 10 | 11 | ```c 12 | static int get_num_low_lat_uuars(int tot_uuars) 13 | { 14 | char *env; 15 | int num = 4; 16 | 17 | env = getenv("MLX5_NUM_LOW_LAT_UUARS"); 18 | if (env) 19 | num = atoi(env); 20 | 21 | if (num < 0) 22 | return -EINVAL; 23 | 24 | // PLEASE REMOVE THE NEXT LINE 25 | // num = max(num, tot_uuars - MLX5_MED_BFREGS_TSHOLD); 26 | return num; 27 | } 28 | ``` 29 | 30 | 3. Recompile the rdma-core library 31 | 32 | 4. Copy the new `libmlx5.so` to the binary path (i.e., `smart/build/`) 33 | 34 | 5. Execute our application : 35 | ``` 36 | LD_PRELOAD=libmlx5.so test_application 37 | ``` 38 | If preloading is unsuccessful, a warning message will be printed to stderr. 39 | -------------------------------------------------------------------------------- /patch/libmlx5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madsys-dev/smart/eee09bbc78bb0fdf17f9ebc51229dc988c88fb15/patch/libmlx5.so -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ae/collect/common.sh 4 | if [ $HOSTNAME != $client_machine ] 5 | then 6 | echo "You must run this script in $client_machine" 7 | echo "Hint: you may check out the field 'client_machine' in ae/collect/common.sh" 8 | exit 1 9 | fi 10 | 11 | cd build 12 | bash ../ae/collect/runall.sh 13 | bash ../ae/plot/runall.sh 14 | -------------------------------------------------------------------------------- /smart/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(smart initiator.cpp target.cpp resource_manager.cpp task.cpp thread.cpp) 2 | target_link_libraries(smart PUBLIC numa pthread fcontext ibverbs mlx5) 3 | -------------------------------------------------------------------------------- /smart/target.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "smart/target.h" 26 | 27 | namespace sds { 28 | Target::Target() : listener_(nullptr), super_(nullptr) {} 29 | 30 | Target::~Target() { 31 | stop(); 32 | } 33 | 34 | int Target::register_main_memory(void *addr, size_t length) { 35 | if (manager_.register_main_memory(addr, length, MR_FULL_PERMISSION)) { 36 | return -1; 37 | } 38 | super_ = (SuperChunk *) addr; 39 | memset(super_, 0, kChunkSize); 40 | super_->max_chunk = length / kChunkSize; 41 | super_->alloc_chunk = 1; // chunk 0 is used as the super chunk 42 | return 0; 43 | } 44 | 45 | int Target::register_device_memory(size_t length) { 46 | return manager_.register_device_memory(length, MR_FULL_PERMISSION); 47 | } 48 | 49 | void *Target::alloc_chunk(size_t count) { 50 | assert(super_); 51 | if (super_->alloc_chunk + count > super_->max_chunk) { 52 | return nullptr; 53 | } 54 | uint64_t old_alloc_chunks = __sync_fetch_and_add(&super_->alloc_chunk, count); 55 | sfence(); 56 | if (old_alloc_chunks + count <= super_->max_chunk) { 57 | return (char *) super_ + old_alloc_chunks * kChunkSize; 58 | } else { 59 | __sync_fetch_and_sub(&super_->alloc_chunk, count); 60 | return nullptr; 61 | } 62 | } 63 | 64 | GlobalAddress Target::rel_ptr(void *addr) { 65 | assert(super_); 66 | if ((uint64_t) addr >= (uint64_t) super_ && 67 | (uint64_t) addr < (uint64_t) super_ + super_->max_chunk * kChunkSize) { 68 | return GlobalAddress(0, MAIN_MEMORY_MR_ID, (uint64_t) addr - (uint64_t) super_); 69 | } 70 | SDS_INFO("cannot find relative address"); 71 | return NULL_GLOBAL_ADDRESS; 72 | } 73 | 74 | int Target::start(uint16_t tcp_port) { 75 | using namespace std::placeholders; 76 | if (listener_) { 77 | return -1; 78 | } 79 | listener_ = ResourceManager::Listener::Start(&manager_, tcp_port, 80 | [](ResourceManager::RemoteNode *) -> int { return 0; }); 81 | if (!listener_) { 82 | return -1; 83 | } 84 | return 0; 85 | } 86 | 87 | int Target::stop() { 88 | if (listener_) { 89 | listener_->stop(); 90 | delete listener_; 91 | listener_ = nullptr; 92 | } 93 | return 0; 94 | } 95 | } -------------------------------------------------------------------------------- /smart/task.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "smart/task.h" 26 | #include "smart/common.h" 27 | 28 | namespace sds { 29 | thread_local bool tl_task_pool_enabled = false; 30 | transfer_t TaskPool::g_empty_transfer; 31 | } -------------------------------------------------------------------------------- /smart/thread.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "smart/thread.h" 26 | 27 | namespace sds { 28 | thread_local ThreadCheckInCheckOut tl_tcico{}; 29 | 30 | ThreadRegistry gThreadRegistry{}; 31 | 32 | int gBindToCore[kMaxThreads] = {0}; 33 | int gBindToSocket[kMaxThreads] = {0}; 34 | 35 | void thread_registry_deregister_thread(const int tid) { 36 | gThreadRegistry.deregister_thread(tid); 37 | } 38 | 39 | StatInfo tl_stat[kMaxThreads]; 40 | } -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(test_rdma test_rdma.cpp) 2 | target_link_libraries(test_rdma PUBLIC smart) 3 | 4 | add_executable(test_rdma_dyn test_rdma_dyn.cpp) 5 | target_link_libraries(test_rdma_dyn PUBLIC smart) 6 | -------------------------------------------------------------------------------- /util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(ycsb_gen ycsb_gen.cpp) 2 | target_link_libraries(ycsb_gen PUBLIC pthread smart) 3 | 4 | if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64") 5 | add_subdirectory(fcontext-arm64) 6 | else() 7 | add_subdirectory(fcontext-x64) 8 | endif() 9 | -------------------------------------------------------------------------------- /util/fcontext-arm64/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(fcontext STATIC 2 | jump.S 3 | make.S 4 | ontop.S) 5 | -------------------------------------------------------------------------------- /util/fcontext-arm64/make.S: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Edward Nevill + Oliver Kowalke 2015 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | /******************************************************* 8 | * * 9 | * ------------------------------------------------- * 10 | * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * 11 | * ------------------------------------------------- * 12 | * | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| * 13 | * ------------------------------------------------- * 14 | * | d8 | d9 | d10 | d11 | * 15 | * ------------------------------------------------- * 16 | * ------------------------------------------------- * 17 | * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * 18 | * ------------------------------------------------- * 19 | * | 0x20| 0x24| 0x28| 0x2c| 0x30| 0x34| 0x38| 0x3c| * 20 | * ------------------------------------------------- * 21 | * | d12 | d13 | d14 | d15 | * 22 | * ------------------------------------------------- * 23 | * ------------------------------------------------- * 24 | * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * 25 | * ------------------------------------------------- * 26 | * | 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58| 0x5c| * 27 | * ------------------------------------------------- * 28 | * | x19 | x20 | x21 | x22 | * 29 | * ------------------------------------------------- * 30 | * ------------------------------------------------- * 31 | * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * 32 | * ------------------------------------------------- * 33 | * | 0x60| 0x64| 0x68| 0x6c| 0x70| 0x74| 0x78| 0x7c| * 34 | * ------------------------------------------------- * 35 | * | x23 | x24 | x25 | x26 | * 36 | * ------------------------------------------------- * 37 | * ------------------------------------------------- * 38 | * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * 39 | * ------------------------------------------------- * 40 | * | 0x80| 0x84| 0x88| 0x8c| 0x90| 0x94| 0x98| 0x9c| * 41 | * ------------------------------------------------- * 42 | * | x27 | x28 | FP | LR | * 43 | * ------------------------------------------------- * 44 | * ------------------------------------------------- * 45 | * | 40 | 41 | 42 | 43 | | | * 46 | * ------------------------------------------------- * 47 | * | 0xa0| 0xa4| 0xa8| 0xac| | | * 48 | * ------------------------------------------------- * 49 | * | PC | align | | | * 50 | * ------------------------------------------------- * 51 | * * 52 | *******************************************************/ 53 | 54 | .file "make_arm64_aapcs_elf_gas.S" 55 | .text 56 | .align 2 57 | .global make_fcontext 58 | .type make_fcontext, %function 59 | make_fcontext: 60 | # shift address in x0 (allocated stack) to lower 16 byte boundary 61 | and x0, x0, ~0xF 62 | 63 | # reserve space for context-data on context-stack 64 | sub x0, x0, #0xb0 65 | 66 | # third arg of make_fcontext() == address of context-function 67 | # store address as a PC to jump in 68 | str x2, [x0, #0xa0] 69 | 70 | # save address of finish as return-address for context-function 71 | # will be entered after context-function returns (LR register) 72 | adr x1, finish 73 | str x1, [x0, #0x98] 74 | 75 | ret x30 // return pointer to context-data (x0) 76 | 77 | finish: 78 | # exit code is zero 79 | mov x0, #0 80 | # exit application 81 | bl _exit 82 | 83 | .size make_fcontext,.-make_fcontext 84 | # Mark that we don't need executable stack. 85 | .section .note.GNU-stack,"",%progbits -------------------------------------------------------------------------------- /util/fcontext-x64/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(fcontext STATIC 2 | jump.S 3 | make.S 4 | ontop.S) 5 | -------------------------------------------------------------------------------- /util/fcontext-x64/jump.S: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Oliver Kowalke 2009. 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | /**************************************************************************************** 9 | * * 10 | * ---------------------------------------------------------------------------------- * 11 | * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * 12 | * ---------------------------------------------------------------------------------- * 13 | * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * 14 | * ---------------------------------------------------------------------------------- * 15 | * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * 16 | * ---------------------------------------------------------------------------------- * 17 | * ---------------------------------------------------------------------------------- * 18 | * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * 19 | * ---------------------------------------------------------------------------------- * 20 | * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * 21 | * ---------------------------------------------------------------------------------- * 22 | * | R15 | RBX | RBP | RIP | * 23 | * ---------------------------------------------------------------------------------- * 24 | * * 25 | ****************************************************************************************/ 26 | 27 | .text 28 | .globl jump_fcontext 29 | .type jump_fcontext,@function 30 | .align 16 31 | jump_fcontext: 32 | leaq -0x38(%rsp), %rsp /* prepare stack */ 33 | 34 | #if !defined(BOOST_USE_TSX) 35 | stmxcsr (%rsp) /* save MMX control- and status-word */ 36 | fnstcw 0x4(%rsp) /* save x87 control-word */ 37 | #endif 38 | 39 | movq %r12, 0x8(%rsp) /* save R12 */ 40 | movq %r13, 0x10(%rsp) /* save R13 */ 41 | movq %r14, 0x18(%rsp) /* save R14 */ 42 | movq %r15, 0x20(%rsp) /* save R15 */ 43 | movq %rbx, 0x28(%rsp) /* save RBX */ 44 | movq %rbp, 0x30(%rsp) /* save RBP */ 45 | 46 | /* store RSP (pointing to context-data) in RAX */ 47 | movq %rsp, %rax 48 | 49 | /* restore RSP (pointing to context-data) from RDI */ 50 | movq %rdi, %rsp 51 | 52 | movq 0x38(%rsp), %r8 /* restore return-address */ 53 | 54 | #if !defined(BOOST_USE_TSX) 55 | ldmxcsr (%rsp) /* restore MMX control- and status-word */ 56 | fldcw 0x4(%rsp) /* restore x87 control-word */ 57 | #endif 58 | 59 | movq 0x8(%rsp), %r12 /* restore R12 */ 60 | movq 0x10(%rsp), %r13 /* restore R13 */ 61 | movq 0x18(%rsp), %r14 /* restore R14 */ 62 | movq 0x20(%rsp), %r15 /* restore R15 */ 63 | movq 0x28(%rsp), %rbx /* restore RBX */ 64 | movq 0x30(%rsp), %rbp /* restore RBP */ 65 | 66 | leaq 0x40(%rsp), %rsp /* prepare stack */ 67 | 68 | /* return transfer_t from jump */ 69 | /* RAX == fctx, RDX == data */ 70 | movq %rsi, %rdx 71 | /* pass transfer_t as first arg in context function */ 72 | /* RDI == fctx, RSI == data */ 73 | movq %rax, %rdi 74 | 75 | /* indirect jump to context */ 76 | jmp *%r8 77 | .size jump_fcontext,.-jump_fcontext 78 | 79 | /* Mark that we don't need executable stack. */ 80 | .section .note.GNU-stack,"",%progbits -------------------------------------------------------------------------------- /util/fcontext-x64/make.S: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Oliver Kowalke 2009. 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | /**************************************************************************************** 9 | * * 10 | * ---------------------------------------------------------------------------------- * 11 | * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * 12 | * ---------------------------------------------------------------------------------- * 13 | * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * 14 | * ---------------------------------------------------------------------------------- * 15 | * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * 16 | * ---------------------------------------------------------------------------------- * 17 | * ---------------------------------------------------------------------------------- * 18 | * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * 19 | * ---------------------------------------------------------------------------------- * 20 | * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * 21 | * ---------------------------------------------------------------------------------- * 22 | * | R15 | RBX | RBP | RIP | * 23 | * ---------------------------------------------------------------------------------- * 24 | * * 25 | ****************************************************************************************/ 26 | 27 | .text 28 | .globl make_fcontext 29 | .type make_fcontext,@function 30 | .align 16 31 | make_fcontext: 32 | /* first arg of make_fcontext() == top of context-stack */ 33 | movq %rdi, %rax 34 | 35 | /* shift address in RAX to lower 16 byte boundary */ 36 | andq $-16, %rax 37 | 38 | /* reserve space for context-data on context-stack */ 39 | /* on context-function entry: (RSP -0x8) % 16 == 0 */ 40 | leaq -0x40(%rax), %rax 41 | 42 | /* third arg of make_fcontext() == address of context-function */ 43 | /* stored in RBX */ 44 | movq %rdx, 0x28(%rax) 45 | 46 | /* save MMX control- and status-word */ 47 | stmxcsr (%rax) 48 | /* save x87 control-word */ 49 | fnstcw 0x4(%rax) 50 | 51 | /* compute abs address of label trampoline */ 52 | leaq trampoline(%rip), %rcx 53 | /* save address of trampoline as return-address for context-function */ 54 | /* will be entered after calling jump_fcontext() first time */ 55 | movq %rcx, 0x38(%rax) 56 | 57 | /* compute abs address of label finish */ 58 | leaq finish(%rip), %rcx 59 | /* save address of finish as return-address for context-function */ 60 | /* will be entered after context-function returns */ 61 | movq %rcx, 0x30(%rax) 62 | 63 | ret /* return pointer to context-data */ 64 | 65 | trampoline: 66 | /* store return address on stack */ 67 | /* fix stack alignment */ 68 | push %rbp 69 | /* jump to context-function */ 70 | jmp *%rbx 71 | 72 | finish: 73 | /* exit code is zero */ 74 | xorq %rdi, %rdi 75 | /* exit application */ 76 | call _exit@PLT 77 | hlt 78 | .size make_fcontext,.-make_fcontext 79 | 80 | /* Mark that we don't need executable stack. */ 81 | .section .note.GNU-stack,"",%progbits -------------------------------------------------------------------------------- /util/fcontext-x64/ontop.S: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Oliver Kowalke 2009. 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | /**************************************************************************************** 9 | * * 10 | * ---------------------------------------------------------------------------------- * 11 | * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * 12 | * ---------------------------------------------------------------------------------- * 13 | * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * 14 | * ---------------------------------------------------------------------------------- * 15 | * | fc_mxcsr|fc_x87_cw| R12 | R13 | R14 | * 16 | * ---------------------------------------------------------------------------------- * 17 | * ---------------------------------------------------------------------------------- * 18 | * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * 19 | * ---------------------------------------------------------------------------------- * 20 | * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * 21 | * ---------------------------------------------------------------------------------- * 22 | * | R15 | RBX | RBP | RIP | * 23 | * ---------------------------------------------------------------------------------- * 24 | * * 25 | ****************************************************************************************/ 26 | 27 | .text 28 | .globl ontop_fcontext 29 | .type ontop_fcontext,@function 30 | .align 16 31 | ontop_fcontext: 32 | /* preserve ontop-function in R8 */ 33 | movq %rdx, %r8 34 | 35 | leaq -0x38(%rsp), %rsp /* prepare stack */ 36 | 37 | #if !defined(BOOST_USE_TSX) 38 | stmxcsr (%rsp) /* save MMX control- and status-word */ 39 | fnstcw 0x4(%rsp) /* save x87 control-word */ 40 | #endif 41 | 42 | movq %r12, 0x8(%rsp) /* save R12 */ 43 | movq %r13, 0x10(%rsp) /* save R13 */ 44 | movq %r14, 0x18(%rsp) /* save R14 */ 45 | movq %r15, 0x20(%rsp) /* save R15 */ 46 | movq %rbx, 0x28(%rsp) /* save RBX */ 47 | movq %rbp, 0x30(%rsp) /* save RBP */ 48 | 49 | /* store RSP (pointing to context-data) in RAX */ 50 | movq %rsp, %rax 51 | 52 | /* restore RSP (pointing to context-data) from RDI */ 53 | movq %rdi, %rsp 54 | 55 | #if !defined(BOOST_USE_TSX) 56 | ldmxcsr (%rsp) /* restore MMX control- and status-word */ 57 | fldcw 0x4(%rsp) /* restore x87 control-word */ 58 | #endif 59 | 60 | movq 0x8(%rsp), %r12 /* restore R12 */ 61 | movq 0x10(%rsp), %r13 /* restore R13 */ 62 | movq 0x18(%rsp), %r14 /* restore R14 */ 63 | movq 0x20(%rsp), %r15 /* restore R15 */ 64 | movq 0x28(%rsp), %rbx /* restore RBX */ 65 | movq 0x30(%rsp), %rbp /* restore RBP */ 66 | 67 | leaq 0x38(%rsp), %rsp /* prepare stack */ 68 | 69 | /* return transfer_t from jump */ 70 | /* RAX == fctx, RDX == data */ 71 | movq %rsi, %rdx 72 | /* pass transfer_t as first arg in context function */ 73 | /* RDI == fctx, RSI == data */ 74 | movq %rax, %rdi 75 | 76 | /* keep return-address on stack */ 77 | 78 | /* indirect jump to context */ 79 | jmp *%r8 80 | .size ontop_fcontext,.-ontop_fcontext 81 | 82 | /* Mark that we don't need executable stack. */ 83 | .section .note.GNU-stack,"",%progbits -------------------------------------------------------------------------------- /util/ycsb_gen.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (C) 2022-2023 Feng Ren, Tsinghua University 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | #include "util/ycsb.h" 26 | 27 | #include 28 | 29 | using namespace sds::util; 30 | 31 | int main(int argc, char **argv) { 32 | if (argc < 5) { 33 | fprintf(stderr, "Usage: %s \n", argv[0]); 34 | exit(EXIT_FAILURE); 35 | } 36 | 37 | int initial_elements = atoi(argv[2]); 38 | int record_count = atoi(argv[3]); 39 | 40 | WorkloadBuilder *builder = WorkloadBuilder::Create(argv[1], initial_elements, 0.99); 41 | OpRecord *records = new OpRecord[record_count]; 42 | if (!builder) { 43 | exit(EXIT_FAILURE); 44 | } 45 | 46 | FILE *fout = fopen(argv[4], "wb"); 47 | if (!fout) { 48 | perror("fopen"); 49 | exit(EXIT_FAILURE); 50 | } 51 | 52 | const static int kThreads = 8; 53 | std::thread workers[kThreads]; 54 | for (int i = 0; i < kThreads; ++i) { 55 | workers[i] = std::thread([&](int tid) { 56 | int start_off = record_count / kThreads * tid; 57 | int stop_off = std::min(start_off + record_count / kThreads, record_count); 58 | for (int off = start_off; off < stop_off; ++off) { 59 | builder->fill_record(records[off]); 60 | } 61 | }, i); 62 | } 63 | 64 | for (int i = 0; i < kThreads; ++i) { 65 | workers[i].join(); 66 | } 67 | 68 | if (fwrite(records, sizeof(OpRecord), record_count, fout) != record_count) { 69 | perror("fwrite"); 70 | } 71 | 72 | fclose(fout); 73 | delete builder; 74 | return 0; 75 | } 76 | --------------------------------------------------------------------------------