Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
S
Sidekiq Redis Experiments
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.com
GitLab Infrastructure Team
Sidekiq Redis Experiments
Commits
28985e4a
Commit
28985e4a
authored
3 years ago
by
Craig Miskell
Browse files
Options
Downloads
Patches
Plain Diff
Add catchall as only single queue experiment
parent
41169eb4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
generator_one_queue_catchall.rb
+53
-0
53 additions, 0 deletions
generator_one_queue_catchall.rb
one_queue_per_shard/default.yml
+4
-0
4 additions, 0 deletions
one_queue_per_shard/default.yml
with
57 additions
and
0 deletions
generator_one_queue_catchall.rb
0 → 100644
+
53
−
0
View file @
28985e4a
require
'sidekiq'
require
'active_support'
require_relative
'application_worker.rb'
puts
"Starting sidekiq load generation"
Dir
.
glob
(
"/home/cmiskell/sidekiq-experiment/workers/**/*.rb"
).
each
{
|
file
|
require
file
}
Sidekiq
.
configure_client
do
|
config
|
config
.
redis
=
{
url:
'redis://10.142.0.6:6379'
,
password:
'abcdefgh'
}
end
# Simulate making catchall-k8s (largest number of queues) use only the 'default' queue
# instead of a queue per worker, but leave the rest doing their usual thing
def
schedule
(
type
,
klass
)
(
COUNTS
[
type
.
to_sym
]
*
2
).
times
do
if
(
type
==
'catchall-k8s'
)
klass
.
set
(
queue:
'default'
).
perform_async
(
1
,
2
,
3
)
else
klass
.
perform_async
(
1
,
2
,
3
)
end
end
end
#Number of workers for each shard, so we can scale our generation appropriately
COUNTS
=
{
'catchall-k8s'
:
196
*
15
,
'catchall-vm'
:
56
*
15
,
'memory-bound'
:
16
*
1
,
'database-throttled'
:
1
*
5
,
'gitaly-throttled'
:
3
*
8
,
'elasticsearch'
:
8
*
2
,
'low-urgency-cpu-bound'
:
100
*
5
,
'urgent-cpu-bound'
:
84
*
5
,
'urgent-other'
:
130
*
5
}
count
=
0
loop
do
puts
"Round
#{
count
}
at
#{
Time
.
now
.
strftime
(
'%H:%M:%S.%L'
)
}
"
schedule
(
'catchall-k8s'
,
VulnerabilityExportsExportDeletionWorker
)
schedule
(
'catchall-vm'
,
GroupsUpdateStatisticsWorker
)
schedule
(
'database-throttled'
,
BackgroundMigrationWorker
)
schedule
(
'elasticsearch'
,
ElasticIndexerWorker
)
schedule
(
'gitaly-throttled'
,
SnippetsUpdateRepositoryStorageWorker
)
schedule
(
'low-urgency-cpu-bound'
,
NewEpicWorker
)
schedule
(
'memory-bound'
,
ProjectExportWorker
)
schedule
(
'urgent-cpu-bound'
,
MergeRequestResetApprovalsWorker
)
schedule
(
'urgent-other'
,
UpdateHighestRoleWorker
)
# sleep(2)
count
=
count
+
1
end
This diff is collapsed.
Click to expand it.
one_queue_per_shard/default.yml
0 → 100644
+
4
−
0
View file @
28985e4a
---
:concurrency
:
15
:queues
:
-
default
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment