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

[FEATURE REQUEST] Custom ticker value for heartbeater duration #889

Open
RiskyFeryansyahP opened this issue Jun 2, 2024 · 4 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@RiskyFeryansyahP
Copy link

Is your feature request related to a problem? Please describe.
Currently, in our production environment, I have 9,000 scheduled entries that run once every week and once every month. However, I've noticed that the CPU utilization on my Redis spikes continuously. You can see this in the image below.

When I investigated the reason for these CPU spikes, I disabled the scheduler in asynq, and the CPU usage returned to normal. While examining the code for the scheduler in asynq, I found that the heartbeater inside asynq runs every 5 seconds (hardcoded) using a ticker. This process involves scanning through cron entries and performing WriteSchedulerEntries.

Screenshot 2024-06-02 at 15 43 43

Describe the solution you'd like
I have an idea to configure the ticker duration based on SchedulerOpts. This way, the ticker duration is not hardcoded and can be defined through configuration when initializing NewPeriodicTaskManager.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@RiskyFeryansyahP RiskyFeryansyahP added the enhancement New feature or request label Jun 2, 2024
@RiskyFeryansyahP
Copy link
Author

Hi @hibiken, if you agree with my proposal, I would be happy to implement it 😄

@RiskyFeryansyahP
Copy link
Author

Hi @kamikazechaser, if you have time, please check my proposal request 🙏

@RiskyFeryansyahP
Copy link
Author

Any update guys?

@Aldiwildan77
Copy link

Is there any update for this @hibiken?

Your issue seems fit to me, I also had this when I had a thousand jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants