imranmomin / Hangfire.AzureCosmosDb

Azure Cosmos DB storage provider for Hangfire
https://www.hangfire.io/
MIT License
18 stars 17 forks source link

Estimate RU/s #10

Closed miguelEsteban closed 3 years ago

miguelEsteban commented 4 years ago

Hi everyone! Is there some way to estimate the number of RU/ s per worker that are needed if we assume a standard job of 2 sg?

Comparing statistics against SQL Server storage, SQL is capable of processing more elements per minute. Assuming this query is correct and based on the work done in the last hour.

select max(counts.count1)
FROM (
    SELECT count(1) count1
    FROM doc 
    where doc.type = 8 
               and doc.name = 'Processing'
               and TimestampToDateTime (doc.created_on*1000) >= DateTimeAdd ('hour',-1,GetCurrentDateTime())
     GROUP BY DateTimeDiff('minute', DateTimeAdd ('hour',-1,GetCurrentDateTime()), TimestampToDateTime (doc.created_on*1000))
) counts
imranmomin commented 3 years ago

Sorry - I don't have a way to give the estimates