Giter Club home page Giter Club logo

Comments (6)

mhenrixon avatar mhenrixon commented on August 18, 2024

The original line of thinking was that we only need one item but if performance suffers because of that then I am more than happy to increase it. We could certainly do more.

I guess redis has to do more iterations, the testing perhaps becomes a little more complex. Would be cool to have a real world test for the performance of this since we have had some issues around the reaper performance.

If I recall correctly I have some performance related tests already.

from sidekiq-unique-jobs.

mhenrixon avatar mhenrixon commented on August 18, 2024

Hi @dedman,

I have tried to run some performance tests on the line of code you suggested.

With 1_000_000 (1 million) rows in the retry queue, I get this:

  1) SidekiqUniqueJobs::Orphans::RubyReaper#in_sorted_set? when retried with the job in retry is expected to perform under 2 ms
     Failure/Error: it { expect { service.send(:in_sorted_set?, "retry", digest) }.to perform_under(2).ms }
       expected block to perform under 2 ms, but performed above 4.26 ms (± 6.11 ms)

Setting the count to 1 or 1000 is hardly noticeable. Agreeably this isn't the real world so might not get real world results.

from sidekiq-unique-jobs.

mhenrixon avatar mhenrixon commented on August 18, 2024

You can check the progress at #777

from sidekiq-unique-jobs.

Amnesthesia avatar Amnesthesia commented on August 18, 2024

I think we're hitting this problem too at the moment

from sidekiq-unique-jobs.

dedman avatar dedman commented on August 18, 2024

Sorry I didn't follow up here earlier. I chatted to my management about this issue earlier in the year and we decided to wait until we were ready to use Sidekiq Enterprise which has a unique jobs feature.

For the last 6 months we kept an eye on the retry queue and tried to keep it under 200-300 jobs. We also increased the timeout on the reaper which lessened the problem a little. We had cron jobs not run probably once a month because of this issue, but we generally noticed early enough to stop it having any big impact.

We were already thinking about moving to Sidekiq Enterprise, so when this issue came up it was the final confirmation it would make sense for us to move over to Enterprise.

from sidekiq-unique-jobs.

mhenrixon avatar mhenrixon commented on August 18, 2024

Great stuff @dedman, if people paid me those monthly fees I could afford the same quality :)

from sidekiq-unique-jobs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.