vmihailenco / taskq

Golang asynchronous task/job queue with Redis, SQS, IronMQ, and in-memory backends

Home Page:https://taskq.uptrace.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redisq Queue Scheduler Time Sleep Option

Baseris opened this issue · comments

Hello, we are using taskq in long time with 17 different queue and 4GB RAM / 2vCPU redis instance. Queues are empty, but i see redis running with high cpu(80%) all time. Taskq making too much command regulary because of redisq queue scheduler() sleeping less than 500ms.
I tested time sleep for 1 sec, cpu usage down to 36%. And tested for 10sec, cpu usage down to 11%. With these options application running normaly. Is there avaible to add new option for schedulerBackoff()

@vmihailenco I think the backoff time of scheduler can increase to 1 ~1.5 sec, WDYT

@lilien1010 agreed, let's change the default value too.