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

Can the workload rate be customized? #13

Open
WangTingZheng opened this issue Jun 12, 2023 · 6 comments
Open

Can the workload rate be customized? #13

WangTingZheng opened this issue Jun 12, 2023 · 6 comments

Comments

@WangTingZheng
Copy link

For example, we can simulate real-world workloads by customizing the number of load arrivals for each time period like this:
image

@ls4154
Copy link
Owner

ls4154 commented Jun 13, 2023

Since YCSB is usually used to measure peak throughput, it does not have a request rate customization.
I think we could add some simple constant rate limit algorithms, but simulating a workload like the graph above seems complicated. Is there any popular workload trace available that can be used as an input?

@WangTingZheng
Copy link
Author

Since YCSB is usually used to measure peak throughput, it does not have a request rate customization. I think we could add some simple constant rate limit algorithms, but simulating a workload like the graph above seems complicated. Is there any popular workload trace available that can be used as an input?

Thank you for your reply,QueryBot5000[1] has collected the number of accesses within certain intervals in certain scenarios, which might be useful?
image

[1] Ma, Lin, et al. "Query-based workload forecasting for self-driving database management systems." Proceedings of the 2018 International Conference on Management of Data. 2018.

@ls4154
Copy link
Owner

ls4154 commented Jul 3, 2023

Hi, sorry for the late reply.

I've added a way to limit the client request rate.
Check out the rate_limit branch.

A constant rate can be specified using the limit.ops option. (initial rate)

The rate can be also set from the trace file by using limit.file options. The format of the file is as follows.

20 288
30 292
40 368
50 335
60 242

An example command using the above two options would be:

./ycsb -run -db basic -P workloads/workloada  -p threadcount=4 -p basic.silent=true -p limit.ops=100 -p limit.file=rate_trace.txt -s

Rate limiting only works for the run phase.

Please let me know if you have any issues or improvement ideas :)

@WangTingZheng
Copy link
Author

Hi, sorry for the late reply.

I've added a way to limit the client request rate. Check out the rate_limit branch.

A constant rate can be specified using the limit.ops option. (initial rate)

The rate can be also set from the trace file by using limit.file options. The format of the file is as follows.

20 288
30 292
40 368
50 335
60 242

An example command using the above two options would be:

./ycsb -run -db basic -P workloads/workloada  -p threadcount=4 -p basic.silent=true -p limit.ops=100 -p limit.file=rate_trace.txt -s

Rate limiting only works for the run phase.

Please let me know if you have any issues or improvement ideas :)

thanks a lot!

@WangTingZheng
Copy link
Author

WangTingZheng commented Mar 9, 2024

how to get read throughput and latency when I set the rate limite? throughput and latency is fixed. @ls4154

@WangTingZheng WangTingZheng reopened this Mar 9, 2024
@ls4154
Copy link
Owner

ls4154 commented Jun 1, 2024

how to get read throughput and latency when I set the rate limite? throughput and latency is fixed.

If you limit the maximum rate, the rate should be fixed, unless your db is slower than limits.
Latency should not be fixed though.

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