Skip to content

Test for memory usage using Sidekiq with and without ActiveJob

Notifications You must be signed in to change notification settings

davidpiegza/sidekiq-memory-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This is a test project to check the memory usage of Sidekiq background jobs using with or without ActiveJob.

Apparently, using Sidekiq without ActiveJob reduces memory usage drastically.

This a clean Rails 5.1.5 project using Ruby 2.4.3 and Sidekiq 5.1.1.

It simulates a specific use case where one background job enqueues thousands of sub jobs.

To run the test, first start sidekiq with

bundle exec sidekiq

and then run the test with

rake sidekiq:test

It will enqueue 250_000 jobs by default.

The results on my local dev environment are:

With ActiveJob:

Memory Usage: 522 MB Time: 379.329 sec

Without ActiveJob

Memory Usage: 60 MB Time: 121.536 sec

About

Test for memory usage using Sidekiq with and without ActiveJob

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published