-
Notifications
You must be signed in to change notification settings - Fork 98
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
test(elasticity): Added a test of 90% utilization with a lot of small tables #9785
base: master
Are you sure you want to change the base?
Conversation
Keeping this PR as draft since not sure it worth merging. |
Could you elaborate more on why you need to make so many changes to decorators? |
It's an ad hoc variation of a latency decorator. It's not a must as well and can be removed. |
If we need to make only small-to-none changes to the decorator, I think this is worth merging |
If we remove this new decorator we still get all needed latency results by Grafana. |
I think for this testcase it will be enough (Even though I was pushing "lets use the decorator" before), it is a weird testcase that we are not yet prepared for and we cannot call it a performance test regardless due to methodology changes. I add a configuration file and in it I would document shortcomings for this test case and then we can merge safely |
ffb43a1
to
58d3702
Compare
Any reason why it is still in draft? |
58d3702
to
245e5d2
Compare
ready for review now |
7fa68dc
to
2f70af1
Compare
e601f9a
to
958a02c
Compare
@pehala , all checks passed and comments addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test in argus is failing - timeout is reached and from graphs I see it's more than 90% of disk utilization - is this an Scylla issue? If yes, please add reference to it.
Can you clear out what is tested here - possibility of creating 500 tables? Or the tables to have 1 tablet per table (as it's small)?
user_profile_table_count: 501 | ||
batch_size: 125 | ||
|
||
n_loaders: 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need 5 big loaders against 3 smaller db nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would guess cause every cycle runs 125 stress commands at the same time,
I would be nice to mention it here
Also I would recommend cross checking if round robin is needed here, otherwise we might be running 5 x 125 command in each cycle...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyway, one loader possibly could handle all of this - 30kops is not that much. If we need 5, then smaller ones would suffice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- it runs 125 per cycle. round robin is not relevant here.
- It still has a problem that the cycles, from some reason, continues, so in last test in got to more than 600 stress threads since a 5th cycle started.
- @soyacz , it's not a matter of ops but rather the number of parallel stress threads. When i tried, for example, 250 threads per cycle, the test crashed (probably loader issues like OOM or similar).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that round robin is needed here.
You are creating 5 of each command, which is not what you really need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fruch , it is explicitly set here to True:
scylla-cluster-tests/longevity_test.py
Line 334 in 489ec24
batch_params = dict(duration=duration, round_robin=True, stress_cmd=[]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One C-S command, during my testing, was taking about 1.3Gb
of RAM.
So, you can calculate how many C-S commands may fit each loader node of a specific instance type.
And after it you can remove redundant ones if any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this calculation is right.
In this case there is 5 * 16 GB memory = 80GB total memory for the loaders.
But according to above memory requirements: 125 threads * 1.3GB = 162.5GB, so according to above calculation the test should have failed with OOM.
@pehala , i think this consideration might be negligible since this test may only be run once a year or so, so it may spare a cost of ~ 5$ a year or so.
(The grafana shows 3 loaders had an available memory of 5%)
Nonetheless i can try running with only 4 loaders and see how it goes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and passed ok with 4 loaders.
fields: samerow | ||
|
||
# Run stress | ||
# cassandra-stress user profile={} 'ops(insert=1)' cl=QUORUM n=2572262 -rate threads=1 -errors ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you document why -errors ignore is used ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
d49eac1
to
6fca49c
Compare
This was a debug run for debug testing, This branch wasn't originally meant to be merged. I started another test to see it runs as expected. |
@pehala , the test basically accomplished the task of running 500 tables workload with 90% utilization. |
They for sure need to resolved |
… tables Test splitting the 90% utilization among a lot of small tables.
6025504
to
a5c93b9
Compare
a5c93b9
to
348ad37
Compare
348ad37
to
06e0b4e
Compare
@@ -8,6 +8,4 @@ longevityPipeline( | |||
region: 'eu-west-1', | |||
test_name: 'longevity_test.LongevityTest.test_user_batch_custom_time', | |||
test_config: '''["test-cases/scale/longevity-5000-tables.yaml", "configurations/raft/enable_raft_experimental.yaml"]''', | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this change related to this PR ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, looks unrelated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, i thought it looks related to #9785 (comment), but nevermind, removed.
user_profile_table_count: 501 | ||
batch_size: 125 | ||
|
||
n_loaders: 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that round robin is needed here.
You are creating 5 of each command, which is not what you really need.
@vponomaryov you recently optimized the 5000 tables in one keyspace that uses the machinery touched here Can you please review it ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your referenced test job has 8 batches with 62 stress commands.
But it's config has batch_size: 125
.
So, you have some bug in this scope.
@@ -8,6 +8,4 @@ longevityPipeline( | |||
region: 'eu-west-1', | |||
test_name: 'longevity_test.LongevityTest.test_user_batch_custom_time', | |||
test_config: '''["test-cases/scale/longevity-5000-tables.yaml", "configurations/raft/enable_raft_experimental.yaml"]''', | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, looks unrelated.
@@ -0,0 +1,34 @@ | |||
# This is a test case for having 90% disk utilization with a lot of small tables. | |||
# The data is split equally among 500 tables. | |||
# The dataset size is aligned with 'i4i.xlarge'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too ambiguous statement.
Number of nodes and RF also matters to understand the final data size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed:
# The dataset size is aligned with 'i4i.xlarge' and RF = 3 = number-of-DB-nodes.
user_profile_table_count: 501 | ||
batch_size: 125 | ||
|
||
n_loaders: 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One C-S command, during my testing, was taking about 1.3Gb
of RAM.
So, you can calculate how many C-S commands may fit each loader node of a specific instance type.
And after it you can remove redundant ones if any.
user_prefix: 'longevity-elasticity-many-small-tables' | ||
root_disk_size_runner: 120 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to consider following changes:
root_disk_size_monitor: 120
append_scylla_yaml:
# NOTE: https://github.com/scylladb/scylla-monitoring/issues/2429
enable_node_aggregated_table_metrics: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, added
longevity_test.py
Outdated
|
||
user_profile_table_count = self.params.get('user_profile_table_count') # pylint: disable=invalid-name | ||
# Creating extra table during batch only for a high number of tables (>500). | ||
create_extra_tables = True if int(user_profile_table_count) > 500 else False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach looks strange.
Why exactly 500? What if later we will have 400 and 800 cases?
So, need either make it be configurable or describe the reasoning for it here.
Also, coding of this particular condition can be simplified to the following:
create_extra_tables = int(user_profile_table_count) > 500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well i don't really know the idea of adding extra table, So i didn't want to impact existing code flow.
@fruch , can you please advise why the need for an extra table? or perhaps it's not needed anymore and can be removed in a followup fix? would adding a parameter for it is reasonable or an overkill?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original 5000 table case, we created all 5000 tables upfront
we wanted few to be created in run time, via c-s as well
In each cycle we added 4 of them, I don't know how it became just 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes if you want to take it out for some tests, it should be configurable.
No one's gonna remember what's this logic you did here in two weeks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, @fruch , fixed by:
longevity_test.py
Outdated
except ValueError: | ||
raise ValueError(f"Invalid cs_duration format: {cs_duration}") | ||
|
||
for cs_profile in customer_profiles: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your new case it is not customer profile.
So, may be renamed to, for example, cs_profile
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to cs_user_profiles
@vponomaryov , i don't see any bug according to the log:
|
06e0b4e
to
47da586
Compare
Argus link from the PR description: https://argus.scylladb.com/tests/scylla-cluster-tests/a22f9c23-6289-497d-8202-db2b4ba85d2f Part of log:
The |
47da586
to
7449ba7
Compare
@vponomaryov , the loader memory doesn't care how many tables there are. It cares about c-s threads memory consumptin. So there are 1000 stresses in 8 cycles of 125 threads each. It's 2 c-s stresses per table. |
f5a2b5e
to
d613b1a
Compare
d613b1a
to
e377881
Compare
…% utilization scenario The test of test_user_batch_custom_time is fixed and improved in order to run both 5000 tables scenario and a scenario like 500 tables for testing 90% utilization with many small tables.
e377881
to
459b90b
Compare
@yarongilor new branch |
This is a test case for having 90% disk utilization with a lot of small tables.
The data is split equally among 500 tables.
The dataset size is aligned with 'i4i.xlarge'.
It uses a c-s user-profile template for all 500 tables.
It runs 4 batches of 125 tables each.
On each batch cycle, 125 tables are created, then a load is generated for all of these tables.
When all the 125 stress writes/reads are done, it continue with the next batch until stress to all 500 tables is completed (after 4 cycles).
Each one of the 500 tables has both write and read load.
Closes #9309
Testing
PR pre-checks (self review)
backport
labelsReminders
sdcm/sct_config.py
)unit-test/
folder)