Here is an alternative solution. We can limit the number of processed requests to fit in a 1Gb memory chunk for each pass. Obviously, we left some requests in the queue to be processed in the next call. We can overcome this by using multi-step processing: estimating the number of steps in the beginning and processing requests again.
I'd like to hear your opinion on the subject. -- Best regards, Maxim Orlov.
v3-0001-Limit-AbsorbSyncRequests-to-1Gb-at-once.patch
Description: Binary data