• Resolved toddlevy

    (@toddlevy)


    WP 6.4.3
    Action Scheduler 3.7.1
    Action Scheduler High Volume 1.1.0 (I see that this may no longer be needed with AS3+ but figured I’d give it a shot in hopes of running these things a bit faster.)

    Running this configuration on a fairly high-horsepower server / DB setup.

    However, when I schedule a lot of immediate “actions” it appears to only process them one at a time. The rest go into past due where they subsequently get processed.

    My expectation with this setup was that’d we’d see five of them running at a time.

    At the moment I’m not in a position to explore a CLI based solution… just hoping to have a few of these run concurrently.

    Also more generally, despite some attractive and well written docs, I’m not totally understanding the difference is between Batch Size, Concurrent Batches, and Queue Runners.

    Any sort of analogy or something that might help me wrap my head around that would be great appreciated.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Also more generally, despite some attractive and well written docs, I’m not totally understanding the difference is between Batch Size, Concurrent Batches, and Queue Runners.

    Great feedback: I think this is something we can improve upon.

    Actions are processed by one or more queue runners and, generally speaking, the number of concurrent batches basically dictates the number of queue runners that can run in parallel.

    The number of actions each queue runner is allowed to claim is dictated by the batch size. Once actions are claimed, they ‘belong’ to that queue runner and cannot be processed by any other queue runners until/unless they are released without having been processed (which might happen if a queue runner has to exit early for some reason).

    Here’s a scenario:

    • We have 1,000 pending actions.
    • 400 of them are past-due (/should be processed as soon as possible).
    • 5 concurrent batches (queue runners) are allowed.
    • Batch size is 20.

    If possible, Action Scheduler will spin up 5 queue runners and each will claim actions in sets of 20 until all the past-due actions are processed.

    However, when I schedule a lot of immediate “actions” it appears to only process them one at a time.

    It depends a little on what you mean by ‘a lot’. Let’s adjust the previous scenario a little:

    • We still have 1,000 pending actions.
    • 10 of them are past-duethis is the factor that changed.
    • 5 concurrent batches (queue runners) are still allowed.
    • Batch size is still 20.

    This time, although upto 5 queue runners are still permitted to run in parallel, the number of past-due actions is only enough to result in one being created.

    You could of course reduce the batch size, potentially to as low a value as 1. Then we’d see all the queue runners swinging into action—but in most cases this would create different problems (contention between claim processes, leading to deadlocks).

    Does that help/clarify at all?

    Plugin Author Barry

    (@barryhughes-1)

    Action Scheduler High Volume 1.1.0

    Probably also worth adding a note here that this plugin increases the batch size (to 100) … so unless more than that number are past-due, there will only be one queue runner working on them.

    Thread Starter toddlevy

    (@toddlevy)

    That was an excellent response, thank you.

    Gonna need a minute to digest it 🙂

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hey @toddlevy 👋

    We haven’t heard from you in a while, so I’ll go ahead and close this topic. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.