Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set zero lookup rate? #14

Closed
WangTingZheng opened this issue Aug 7, 2023 · 2 comments
Closed

How to set zero lookup rate? #14

WangTingZheng opened this issue Aug 7, 2023 · 2 comments

Comments

@WangTingZheng
Copy link

The meaning of "zero look rate" is the proportion of keys in queries that are not present in the database during the query process, Some paper, such as Elasticbf need this.

@ls4154
Copy link
Owner

ls4154 commented Aug 19, 2023

Since YCSB performs transactions (update, read) only for already inserted keys, zero lookup is not supported. But it can be achieved by using a higher recordcount in the run phase than recordcount used in the load phase.

For example, if you load with recordcount=10000 and do the run phase with recordcount=20000, the zero lookup rate will be 50%.

$ ./ycsb -load -db leveldb -P workloads/workloada -P leveldb/leveldb.properties -p recordcount=10000 -p threadcount=1 -s
2023-08-19 18:15:54 0 sec: 0 operations;
2023-08-19 18:15:54 0 sec: 10000 operations; [INSERT: Count=10000 Max=40.29 Min=1.71 Avg=3.33 90=5.21 99=7.56 99.9=19.63 99.99=28.93]
Load runtime(sec): 0.212605
Load operations(ops): 10000
Load throughput(ops/sec): 47035.5

$ ./ycsb -run -db leveldb -P workloads/workloada -P leveldb/leveldb.properties -p recordcount=20000 -p threadcount=1 -s
2023-08-19 18:16:03 0 sec: 0 operations;
2023-08-19 18:16:03 0 sec: 10000 operations; 
[READ: Count=2490 Max=49.25 Min=2.47 Avg=3.63 90=4.09 99=6.46 99.9=10.21 99.99=49.25] 
[UPDATE: Count=2415 Max=35.84 Min=4.56 Avg=6.29 90=7.29 99=9.54 99.9=23.41 99.99=35.84] 
[READ-FAILED: Count=2506 Max=15.86 Min=0.29 Avg=0.91 90=1.06 99=1.35 99.9=1.77 99.99=15.86]
[UPDATE-FAILED: Count=2589 Max=24.13 Min=0.56 Avg=0.93 90=1.06 99=1.32 99.9=3.59 99.99=24.13]
Run runtime(sec): 0.128209
Run operations(ops): 10000
Run throughput(ops/sec): 77997.9

Adding that feature might not be difficult. However, from what I have read, the elasticbf paper simply presents zero lookup ratio. In order to implement it, we need information about the distribution of non-existent keys.

@ls4154
Copy link
Owner

ls4154 commented Dec 3, 2023

Closed due to inactivity.

@ls4154 ls4154 closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants