UCLH-Foundry / PIXL

PIXL Image eXtraction Laboratory
Apache License 2.0
8 stars 0 forks source link

Enable asynchronous image processing #364

Closed stefpiatek closed 4 months ago

stefpiatek commented 4 months ago

May not fully get there with documentation today but thought worth getting eyes on this. I've added stripped down log in reverse order (most recent at the top) for trying to work out what configuration should be set.

TODO:

Summary of learnings and changes

Configuration changes

Will update as I go along. When rate drops, it's that there are timeouts from the VNA completing the transfer job within 2 minutes

Didn't really change much, expect that its VNA load based, ~25 messages were being nacked and requeued which makes sense at least.

image

Tried after 7pm and not much of a change

image


Doesn't seem to help, though was requeueing 50 messages a second so there's more capacity. Maybe try fewer concurrent jobs and messages in flight to see if that gets us back to ~2 messages per second being confirmed, otherwise may just be the rest of the load on the VNA

image

Didn't really give much of an increase, rarely hit rate limiting by the token bucket so maybe try increasing max in flight?

image

Number of concurrent jobs maybe increased? will try 50 to check

image

max job history increase stopped error on jobs not being found, pending messages in orthanc slowing down processing so increase number of concurrent jobs to 30 next time

image

Found errors where the job didn't exist in orthanc anymore, so increase max job history so it still exists after success

image

Not a massive increase, will drop number of threads and concurrent jobs

image

Initial rate of processing, discovered that was hanging a fair bit on rest calls so made them async using aio http

image