ls4154 / YCSB-cpp

YCSB written in C++ (for LevelDB, RocksDB, LMDB, WiredTiger, SQLite)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get a fixed size key benchmark?

mihir-b-shah opened this issue · comments

Hello,

Sorry if I am missing something here,

I wanted to run a benchmark on LevelDB with fixed size keys. I noticed the keys being outputted by BuildKeyName are of varying lengths from 22-24. I then tried the zero padding, but I found setting zero padding to, say, 20, which would make all the keys 24 bytes, results in kNotFound errors for all the padded keys, on workload A (I am using suggested workload A LevelDB command, on the README).

I was confused as to why this was happening, since presumably if I pad keys consistently in BuildKeyName, everything should still work as normal?

I would really appreciate any clarification!

Thank you!

Hello,
Since both load phase and run phase use the same BuildKeyName function, the same zero padded keys should be used.

Did you also put the zeropadding=20 option when executing run phase? It would be better if you specify the commands or options that you used.

Hi, oops I forgot to load and run together, I think it was using the loaded version without padding before I made my change, and running with the padded version. I changed that, and it fixed my problem. Thank you for your reply!