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

Questions about trace files when running cachebench #306

Open
rainjuns opened this issue Apr 15, 2024 · 2 comments
Open

Questions about trace files when running cachebench #306

rainjuns opened this issue Apr 15, 2024 · 2 comments

Comments

@rainjuns
Copy link

rainjuns commented Apr 15, 2024

Hello, thank you for managing the great project!

I found that cachelib provides several traces in here and I have two questions in testing them using cachebench.

  1. Do trace files include set operations caused by misses onget operations?
  • I found that CacheLib has options (enableLookAside) for performing set operations over misses on get operations.
  • However, I wonder if such behaviors are already captured in trace files.
  1. If there are a lot of get operations before set operations, which can be captured in trace files, is a miss ratio in CacheLib still accurate?
  • Depending on how trace files are collected, only get operations can be captured and they will cause a lot of misses, increasing a miss ratio.
  • In addition, if enableLookAside is turned on, many set operations will be generated for the same key-value.
  • In production level, get operations for the same key might be queued while waiting the response from the first miss trigger.
  • Please refer to the following trace lines (the first file of kvcache/202206), key: 1665497896 will generate a lot of misses:
key,op,size,op_count,key_size
1668757755,SET,82,1,40
1668757755,GET,0,1,40
1668757805,SET,208,1,63
1668757805,GET,0,1,63
1665498006,GET,104,2,64
1666258101,GET,81,2,23
1665497896,GET,169,18,78
1665702915,SET,109,1,40
1665702915,GET,0,1,40
1665497896,GET,169,18,78
  1. For requests with the same key, what is difference between (1) a trace line with op_count larger than 1 and (2) multiple trace lines with op_count=1?
@rainjuns rainjuns changed the title Questions about trace files Questions about trace files when running cachebench Apr 15, 2024
@therealgymmy
Copy link
Contributor

1). Yes the traces include "SET" which are triggered due to misses to get operations in our systems. There're some exceptions in KV traces. Notably some clients do "SET" first and then "GET" (after some minutes or hours). These clients are basically prefetching data. They're rare in the traces compared to the regular cache set-after-a-miss workloads.

2). enableLookAside should only be used when you filter out all the "SET" operations from the original trace. This is useful when you have a cache size drastically different from the cache config, as it will enable CacheBench to behave like an actual cache instead of just replaying the original set traces. (E.g. original hit rate at 90% would have much fewer sets compared to a smaller cache at 50% but receiving the same GET workload).

3). op_count = the number of requests we have seen for this key in this "second" when we collected the traces originally. Each row in our trace represents a second worth of requests per key per operation.

@rainjuns
Copy link
Author

rainjuns commented Apr 17, 2024

@therealgymmy Thank you for the response. I appreciate it!

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