./run.py problem
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ ./run.py
Traceback (most recent call last):
File "./run.py", line 164, in
@zjthappy thanks for the feedback! @DarvinHarutyunyan and @mgevor, please take a look at this 🤗
@zjthappy thanks for the feedback! @DarvinHarutyunyan and @mgevor, please take a look at this hugs
it seems beacuse of the version of python,i use python3.9 instead but a new problem appear:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ sudo python3.9 run.py
Cleanup...
Traceback (most recent call last):
File "/home/zjt/ycsb/ucsb/run.py", line 221, in
File "/usr/local/lib/python3.9/site-packages/pexpect/pty_spawn.py", line 205, in init
self._spawn(command, args, preexec_fn, dimensions)
File "/usr/local/lib/python3.9/site-packages/pexpect/pty_spawn.py", line 276, in _spawn
raise ExceptionPexpect('The command was not found or was not ' +
pexpect.exceptions.ExceptionPexpect: The command was not found or was not executable: ./build_release/build/bin/ucsb_bench.
Hi @zjthappy, please pull main-dev branch.
There are some fixes there which haven't been merged into main yet.
Is there any requirement for the compiler version when compiling?
Both gcc-10 and gcc-11 are tested and compile fine.
Is there a detailed tutorial, such as how to set parameters. I want to test the performance of redis
I have merged a bunch of updates into main. As for Redis, @davvard may be the most experienced person on our side. Any specific recommendations on how to run the benchmarks?
@zjthappy, you are able to change the benchmark's parameters in the run.py script, or you can pass the parameters in the terminal.
e.g. sudo ./run.py -db redis -sz 100MB -wl Init Read
See the script for more options.
Thank you for your answers. I ran the instructions and there seems to be something wrong. The output is as follows:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ sudo python3.9 run.py -db redis -sz 100MB -wl Init,Read Failed to load workloads. path: ./bench/workloads/1.json Failed to load workloads. path: ./bench/workloads/1.json Failed to load workloads. path: ./bench/workloads/1.json Failed to load workloads. path: ./bench/workloads/1.json [✱] Dropping system caches...
And I am a bit confused, how to specify the address and port of redis
I'm sorry, it had a bug, now you can pull the fix from main-dev.
Please follow the instruction:
- Enable database in CMakeList.txt if it isn't enabled by default:
set flag
ONhere:option(UCSB_BUILD_REDIS "Build Redis for the benchmark" OFF) - Build benchmark:
./build_release.sh - Run:
sudo ./run.py -db redis -sz 100MB -wl Init Read BatchRead
@zjthappy When you run run.py with "-sz 100MB" argument, Redis is using ./bench/configs/redis/100MB.cfg config file where you can change the port.
ok Thank you all
I'll give it another try and I'll give feedback if I have any problems with it
Hey, @zjthappy ! Is it resolved now? Can we close the issue?
Hello! I pull main branch.
- I Enable Redis in CMakeList.txt
option(UCSB_BUILD_USTORE "Build USTORE for the benchmark" ON) option(UCSB_BUILD_ROCKSDB "Build RocksDB for the benchmark" ON) option(UCSB_BUILD_LEVELDB "Build LevelDB for the benchmark" ON) option(UCSB_BUILD_WIREDTIGER "Build WiredTiger for the benchmark" ON) option(UCSB_BUILD_MONGODB "Build MongoDB for the benchmark" OFF) option(UCSB_BUILD_REDIS "Build Redis for the benchmark" ON) option(UCSB_BUILD_LMDB "Build LMDB for the benchmark" OFF)
- I Build benchmark: ./build_release.sh
- Run:
zjt@zjt-ThinkBook-16-G4-IAP:~/ucsb$ sudo python3.9 ./run.py -db redis -sz 100MB -wl Init Read BatchRead Failed to create DB: redis (probably it's disabled in CMaleLists.txt)
I don't know why it fails...... my operating environment: ubuntu-20.04 gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04) Python 3.9.15
CMake caches older configs. Any chance you have previously run without Redis and hasn't cleaned the caches since?
CMake caches older configs. Any chance you have previously run without Redis and hasn't cleaned the caches since?
I tried deleting cmake's output directory build_release, and then to speed up compilation only selected redis, but it still fails
option(UCSB_BUILD_USTORE "Build USTORE for the benchmark" OFF) option(UCSB_BUILD_ROCKSDB "Build RocksDB for the benchmark" OFF) option(UCSB_BUILD_LEVELDB "Build LevelDB for the benchmark" OFF) option(UCSB_BUILD_WIREDTIGER "Build WiredTiger for the benchmark" OFF) option(UCSB_BUILD_MONGODB "Build MongoDB for the benchmark" OFF) option(UCSB_BUILD_REDIS "Build Redis for the benchmark" ON) option(UCSB_BUILD_LMDB "Build LMDB for the benchmark" OFF)
zjt@zjt-ThinkBook-16-G4-IAP:~/ucsb$ sudo python3.9 ./run.py -db redis -sz 100MB -wl Init Read BatchRead Failed to create DB: redis (probably it's disabled in CMaleLists.txt)
Then I used the compiled binary build_release/build/bin/ucsb_bench directly,another problem appears:
zjt@zjt-ThinkBook-16-G4-IAP:~/ucsb$ sudo build_release/build/bin/ucsb_bench -db redis -cfg bench/configs/redis/100MB.cfg -md ./db_main/redis/100MB/ -wl ./bench/workloads/100MB.json -res bench/results/transactional/cores_15/disks_1/redis/ +------------------------------------------------------------------------------------------------------------------------------------------------+ | Database: redis | Workload size: 97.66MB | Threads: 1 | Disks: 1 | +------------------------------------------------------------------------------------------------------------------------------------------------+ sh: 1: redis-server: not found sh: 1: redis-cli: not found std exception: Failed to connect to Redis: No such file or directory
but my redis is ok:
zjt@zjt-ThinkBook-16-G4-IAP:~$ ps -ef | grep redis zjt 7401 1987 0 09:42 ? 00:00:59 ./src/redis-server 127.0.0.1:6379
I'm sorry, it had a bug, now you can pull the fix from
main-dev.Please follow the instruction:
- Enable database in CMakeList.txt if it isn't enabled by default: set flag
ONhere:option(UCSB_BUILD_REDIS "Build Redis for the benchmark" OFF)- Build benchmark:
./build_release.sh- Run:
sudo ./run.py -db redis -sz 100MB -wl Init Read BatchRead
Update: When you make changes in the ./CMakeList.txt you need to delete ./build_release/CMakeCache.txt cache file before running ./build_release.sh script, so you don't need to delete the whole ./build_release/ folder
CMake caches older configs. Any chance you have previously run without Redis and hasn't cleaned the caches since?
I tried deleting cmake's output directory build_release, and then to speed up compilation only selected redis, but it still fails
option(UCSB_BUILD_USTORE "Build USTORE for the benchmark" OFF) option(UCSB_BUILD_ROCKSDB "Build RocksDB for the benchmark" OFF) option(UCSB_BUILD_LEVELDB "Build LevelDB for the benchmark" OFF) option(UCSB_BUILD_WIREDTIGER "Build WiredTiger for the benchmark" OFF) option(UCSB_BUILD_MONGODB "Build MongoDB for the benchmark" OFF) option(UCSB_BUILD_REDIS "Build Redis for the benchmark" ON) option(UCSB_BUILD_LMDB "Build LMDB for the benchmark" OFF)
zjt@zjt-ThinkBook-16-G4-IAP:~/ucsb$ sudo python3.9 ./run.py -db redis -sz 100MB -wl Init Read BatchRead Failed to create DB: redis (probably it's disabled in CMaleLists.txt)
Then I used the compiled binary build_release/build/bin/ucsb_bench directly,another problem appears:
zjt@zjt-ThinkBook-16-G4-IAP:~/ucsb$ sudo build_release/build/bin/ucsb_bench -db redis -cfg bench/configs/redis/100MB.cfg -md ./db_main/redis/100MB/ -wl ./bench/workloads/100MB.json -res bench/results/transactional/cores_15/disks_1/redis/ +------------------------------------------------------------------------------------------------------------------------------------------------+ | Database: redis | Workload size: 97.66MB | Threads: 1 | Disks: 1 | +------------------------------------------------------------------------------------------------------------------------------------------------+ sh: 1: redis-server: not found sh: 1: redis-cli: not found std exception: Failed to connect to Redis: No such file or directory
but my redis is ok:
zjt@zjt-ThinkBook-16-G4-IAP:~$ ps -ef | grep redis zjt 7401 1987 0 09:42 ? 00:00:59 ./src/redis-server 127.0.0.1:6379
@davvard could you please help @zjthappy to setup redis?
Hi @zjthappy! Can you please kill the redis-server process, run the "redis-server" command in your terminal, and check if it works?
Hi @zjthappy! Can you please kill the redis-server process, run the "redis-server" command in your terminal, and check if it works?
@davvard First I started redis:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ redis-server ~/redis-5.0.5/redis.conf
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ ps -ef | grep redis zjt 4370 1986 0 11:48 ? 00:00:00 redis-server *:6379 zjt 4454 2924 0 11:50 pts/2 00:00:00 grep --color=auto redis
I also modified the ucsb-redis connection configuration:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ cat ./bench/configs/redis/100MB.cfg { "connection_type": "UNIX", "path": "./db_main/redis/100MB/redis.sock", "host": "127.0.0.1", "port": 6379, "pool_size": 64, "wait_timeout": 10 }
Then I run ucsb,it fails:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ sudo python3.9 ./run.py -db redis -sz 100MB -wl Init Read BatchRead +------------------------------------------------------------------------------------------------------------------------------------------------+ | Database: redis | Workload size: 97.66MB | Threads: 1 | Disks: 1 | +------------------------------------------------------------------------------------------------------------------------------------------------+ sh: 1: redis-server: not found sh: 1: redis-cli: not found std exception: Failed to connect to Redis: No such file or directory
I try to kill redis process,and start redis again:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ kill -9 4370
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ ps -ef | grep redis zjt 4764 2924 0 11:57 pts/2 00:00:00 grep --color=auto redis
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ redis-server ~/redis-5.0.5/redis.conf
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ ps -ef | grep redis zjt 4771 1986 0 11:57 ? 00:00:00 redis-server 127.0.0.1:6379 zjt 4789 2924 0 11:57 pts/2 00:00:00 grep --color=auto redis
then try ucsb again,it still fails:
zjt@zjt-ThinkBook-16-G4-IAP:~/ycsb/ucsb$ sudo python3.9 ./run.py -db redis -sz 100MB -wl Init Read BatchRead +------------------------------------------------------------------------------------------------------------------------------------------------+ | Database: redis | Workload size: 97.66MB | Threads: 1 | Disks: 1 | +------------------------------------------------------------------------------------------------------------------------------------------------+ sh: 1: redis-server: not found sh: 1: redis-cli: not found std exception: Failed to connect to Redis: No such file or directory