Skip to content
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

"Update Simulation Extent" Action Abnormally Expensive #1508

Open
Mythicaeda opened this issue Jul 18, 2024 · 0 comments
Open

"Update Simulation Extent" Action Abnormally Expensive #1508

Mythicaeda opened this issue Jul 18, 2024 · 0 comments
Assignees
Labels
database Anything related to the database investigate Issue needs further investigation simulation Anything related to the simulation domain

Comments

@Mythicaeda
Copy link
Contributor

When profiling streaming, I discovered that updating the simulation extent is abnormally expensive. Specifically, it is our most expensive action on develop, taking 12ms per execution. While this performance isn't urgent since sim extent updates via its own thread and DB connection, we ought to investigate why this is so expensive.

My current theory is that it's related to the action always inserting and then using an "on conflict, update" statement vs inserting at the start and strictly updating extent. This theory is because on the streaming branch, updating the profiles' durations, which is a roughly equivalent update, takes only 17microseconds per run.

Screenshot of DB Hot paths on Develop:
Screenshot of DB hot spots on develop

Screenshot of DB Hot paths on Streaming
image

@Mythicaeda Mythicaeda added database Anything related to the database investigate Issue needs further investigation simulation Anything related to the simulation domain labels Jul 18, 2024
@Mythicaeda Mythicaeda self-assigned this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Anything related to the database investigate Issue needs further investigation simulation Anything related to the simulation domain
Projects
Status: Todo
Development

No branches or pull requests

1 participant