-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cost_Final table update policy fails with out of memory exception. #1188
Comments
Discussed with @flanakin during our debug session today. |
I ran this command to clean the data from the prices table which seems to let the ingestion complete. |
I'm also suspecting that the parse_resourceid(ResourceId) call is not performant. It looks like this function is executing a subquery for every record. |
I'm also getting similar errors, but for different queries. Errors I usually get are like this (even with bigger and not the smallest ADX SKUs): |
Do you face this error for your custom queries or for queries of the finops toolkit? |
I get this when using the Power BI reports https://github.com/microsoft/finops-toolkit/blob/dev/src/power-bi/kql/CostSummary.pbip and https://github.com/microsoft/finops-toolkit/blob/dev/src/power-bi/kql/RateOptimization.pbip Even with a cluster of 128 GB Memory, I e.g. get this error: Query execution has exceeded the allowed limits (80DA0001): 'summarize' operator has exceeded the memory budget (5368709120) during evaluation. Results may be incorrect or incomplete (E_RUNAWAY_QUERY; see https://aka.ms/kustoquerylimits).. [0]Kusto.Data.Exceptions.KustoServicePartialQueryFailureLimitsExceededException: Query execution has exceeded the allowed limits (80DA0001): 'summarize' operator has exceeded the memory budget (5368709120) during evaluation. Results may be incorrect or incomplete (E_RUNAWAY_QUERY; see https://aka.ms/kustoquerylimits).. Timestamp=2024-12-09T13:36:49.8502403Z ClientRequestId=KPBI;81e77b52-ff9a-44f7-a72a-df89a26f30f3;28f52463-ef89-4443-b8b9-a7b1747e05b4;d7b4848d-1f8f-44e2-ba8f-ed785386a4cb ActivityId=90f5e9a6-b259-4e53-bfe4-49207348f03d ActivityType=GW.Http.CallContext ServiceAlias=FINOPSTESTMCB MachineName=KEngine000000 ProcessName=Kusto.WinSvc.Svc ProcessId=6836 ThreadId=7808 ActivityStack=(Activity stack: CRID=KPBI;81e77b52-ff9a-44f7-a72a-df89a26f30f3;28f52463-ef89-4443-b8b9-a7b1747e05b4;d7b4848d-1f8f-44e2-ba8f-ed785386a4cb ARID=90f5e9a6-b259-4e53-bfe4-49207348f03d > GW.Http.CallContext/90f5e9a6-b259-4e53-bfe4-49207348f03d) MonitoredActivityContext=(ActivityType=GW.Http.CallContext, Timestamp=2024-12-09T13:35:54.0927543Z, ParentActivityId=90f5e9a6-b259-4e53-bfe4-49207348f03d, TimeSinceStarted=55757.486 [ms])ErrorCode= ErrorReason= ErrorMessage= DataSource= DatabaseName= ClientRequestId= ActivityId=00000000-0000-0000-0000-000000000000 UnderlyingErrorCode=80DA0001 UnderlyingErrorMessage='summarize' operator has exceeded the memory budget (5368709120) during evaluation. Results may be incorrect or incomplete (E_RUNAWAY_QUERY; see https://aka.ms/kustoquerylimits). . The exception was raised by the IDbCommand interface. Table: HybridBenefitCosts. |
Although it's a similar error, I think it's not directly related to this issue, since I have the issue at ingestion time, not at query time. |
I tried to limit the Report only to 2 days with a montly scope. But it seems, that the query first builds the result set and the filters after that |
I was able to ingest data from our test account without a problem. The largest snappy parquet file was 11.7 MB. That said, I also suspect the I enabled 7-day retention for the raw data and ingested 13 months of data. I ran the
I'll work on removing or replacing this. I have a thought on how we can achieve this with a slightly different approach. |
Right now, the Performance
Result
|
Okay, adding on to the last 2 changes:
Query time is a tad faster, but the memory hasn't changed since the last test. This is likely because the lookup isn't happening much. I'll submit a few PRs covering these changes. Performance
Result
|
@mschwit Can you submit a separate issue for the problem you're running into? I have 3 optimizations that I want to look into after the ingestion memory problem is resolved. Having a separate issue with your specific details will help ensure that doesn't get missed. |
🐛 Issue
During data ingestion, the
Cost_Final_V1_0
update policy (functionCosts_transform_v1_0
) fails due to an "out of memory" exception.👣 Steps to Reproduce
Setup
Prepare Data
Trigger Issue
Verify Ingestion Failure
.show ingestion failures
in the ingestion database.Verify Operation Failure
.show operations
in the ingestion database.Costs_transform_v1_0
update policy has failed.🤔 Expected Outcome
The ingestion process should successfully complete without any errors.
Costs_transform_v1_0
update policy should execute without failures, ensuring proper data transformation and ingestion.ℹ️ Additional context
I suspect that the join in the Costs_transform_v1_0 function might be part of the problem. It could potentially be replaced with a lookup. Maybe other KQL optimizations apply such as materializing the price lookup before joining.
🙋♀️ Ask for the community
We could use your help:
The text was updated successfully, but these errors were encountered: