我有8个工人。他们如何参与工作队列系统?
工作者可以简单地作为可以同时处理工作的处理器/用户。8名工人意味着一次可以处理8个过程/功能。
如果我增加他们的数量,工作处理速度会更快吗?
Maybe yes, but maybe no. Depend on your process and server resource like RAM/CPU/Disk speed. If your running workers consume high resource it could make the server freeze/slow, but if the resource consume for each worker is low it's could make faster queue.
As long as I increase them, it will take more RAM too? If my server has 16GB ram, how much workers can I have?
Yes, depend on how much free RAM and how much RAM consume each process. If free RAM 10gb, and the average process consume 100mb RAM, so the max workers should be 100. Maybe you still can increase it but it will affect other workers process. And also CPU and disk usage is also important factor too.
Does job go to queque? (Image below)
Sorry, I don't fully understand about your image. But if you have 8 workers, the queue should only 2.
您能解释一下作业和队列之间的区别吗?Job是包含通常创建到App\Jobs
文件夹的功能/过程的类。可以多次排队或调度/执行作业。队列是有空闲工作人员时需要执行的作业列表。如果您将作业分派到队列中,它将转到pending queue
;如果您有空闲工人,则该作业将被执行或转到running queue
。执行/完成作业后,将从队列列表中删除该作业。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句