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

[Question] Would running with --threads=1 and --rate=N cause backpressure, if the database can't keep up with the rate? #515

Open
oatmealb opened this issue Sep 15, 2023 · 0 comments

Comments

@oatmealb
Copy link

oatmealb commented Sep 15, 2023

Firstly, thank you and all the contributors for this awesome tool.

Goal: to simulate SQL queries from an application, where users may not wait for a query "A" to finish, and immediately trigger one more query "B", producing even more (IO-bound) load on the database (DB).

Questions:

  1. Would running with --threads=1 and executing a slow SQL query mean that the next query following would be waiting on it? That is, would DB effectively push back and back-pressure against any further load? The queue_time is included in the elapsed time measurement, which is good. But even more realistic would be if a user/thread would be able to pile on additional load to the DB at will.
    I think the answer to the above lies in the code on these 2 lines (I'm bit rusty on pthreads):

  2. Would you use --threads=20 --rate=20 to simulate 20 concurrent users, each producing 1 QPS? Does one have to also consider number of CPU cores (and/or hyperthreads), or anything else, when choosing these flags?

Using sysbench 1.1.0-2ca9e3f (using bundled LuaJIT 2.1.0-beta3).

@oatmealb oatmealb changed the title [Question] Why does benchmarking a single SELECT 1 returns twice as many queries as the transactions? [Question] Could running with --threads=1 and --rate=N cause backpressure, if the database can't keep up with the rate? Sep 15, 2023
@oatmealb oatmealb changed the title [Question] Could running with --threads=1 and --rate=N cause backpressure, if the database can't keep up with the rate? [Question] Would running with --threads=1 and --rate=N cause backpressure, if the database can't keep up with the rate? Sep 15, 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

1 participant