-
Notifications
You must be signed in to change notification settings - Fork 950
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
BullMQ Pro with DragonFly - warnings/errors/slow processing #3640
Comments
Hi @wernermorgenstern
|
@chakaz ,
|
Some follow up questions: Thanks |
Not sure why it woukd be only running on 4 threads. When tne container starts, the logs show it is running on 47 io threads.
Or am I missing something?
How can I tell dragonfly to run on x threads, and not letting it decide itself
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Shahar Mike ***@***.***>
Sent: Wednesday, September 4, 2024 12:22:57 AM
To: dragonflydb/dragonfly ***@***.***>
Cc: Werner Morgenstern ***@***.***>; Mention ***@***.***>
Subject: Re: [dragonflydb/dragonfly] BullMQ Pro with DragonFly - warnings/errors/slow processing (Issue #3640)
@wernermorgenstern<https://github.com/wernermorgenstern>
1. I meant via some monitoring tools like htop, I want to see that indeed all threads are active instead of a case in which a single thread handles all queues
2. I would remove --conn_io_threads unless hard data shows that it's preferable in your case. In previous benchmark I've made, it's not recommended in the general case. By using this flag you are in fact limiting the data-handling threads to 4-2 = 2 threads
3. That's good. I was trying to eliminate a case which all used a single {hashtag}. That's not the case for you.
Some follow up questions:
4. I see that you use c7g.12xlarge which is quite beefy with 48 vCPUs, but on the other hand you're running Dragonfly with only 4 threads. Is that because you attempt to run other programs on this server? Generally Dragonfly is designed to run as a standalone server, and I wonder if in your case other loads degrade Dragondly's?
5. Related to above, you could try setting --proactor_affinity_mode=off to un-pin Dragonfly from specific CPUs. This is usually not a problem, unless there are, again, other loads on the same (virtual) machine.
6. Could you try running your tests against a standalone Dragonfly running in a c7g.xlarge machine (which has 4 vCPUs), and see if you get different numbers?
Thanks
—
Reply to this email directly, view it on GitHub<#3640 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJPN7CZQSOHFYHG3EKARNTLZU2DKDAVCNFSM6AAAAABNSP5G3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRXHA4DINRWGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@wernermorgenstern you passed the following flags:
The first means Dragonfly will only ever use 4 threads (except for an idle I'd start by not passing any of these flags and measure your performance.. |
So I made the recommended changes: Here is the log when it starts up:
|
It shows What does this log line mean: |
@chakaz , Right now, in DragonFly, we have 47 threads. One thread though runs at 93%, and a few run at 20% up to 30%. So shouldn't the thread allocation be based on the Key, between the Hashes? |
@wernermorgenstern If this is a pain point, you could try to use A few notes / questions:
|
@chakaz , I will look into that article.
A note: On this DragonFly Instance, it only contains the queue. No other data is stored, or processed |
Yes, we benchmarked BullMQ with Dragonfly.
We mention this in the beginning of the post, but I now realize I was mistaken in my previous comment here.
Yes
Yes |
@chakaz , ok, great. Thank you very much for your help. One more question (documentation is a bit unclear) |
I'm afraid that, at least currently, one can specify only one prefix. Perhaps you could rename the queues such that high performance queues have their own prefix, different from other queues. |
I'll close this issue now, please let me know if there's anything else. |
Describe the bug
We are running DragonFly in EKS, for BullMQ Queue.
We want to process currently 90,000 messages in between 1 and 10 seconds. (and in future, even more messages than 90,000 messages).
In DragonFly container, we see these errors:
And then also:
In our application, we have 47 Queues, and then in the Consumer Service, we have 30 Workers per Queue for BullMQ Pro, concurrency is 1000, Batch Size is 10.
So I am not sure if the issue is the BullMQ Lua Scripting, which gets behind, because of the locks. Or is there anything else we can do?
Expected behavior
Be able to process 90,000 messages in less than 10 seconds.
Environment (please complete the following information):
Linux dragonfly-bullmq-bridge-processor-0 5.10.220-209.869.amzn2.aarch64 #1 SMP Wed Jul 17 15:10:20 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Kubernetes
Resources
Configuration
The text was updated successfully, but these errors were encountered: