Poor performances on create/edit tenant field with high number of tenants #14512
Labels
severity: low
Does not significantly disrupt application functionality, or a workaround is available
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Deployment Type
Self-hosted
NetBox Version
v3.6.6
Python Version
3.11
Steps to Reproduce
Expected Behavior
Maybe one second or less should be a good request timer
Or maybe the searchable select should be async to allow user to enter characters while the first request is running in background.
Observed Behavior
With a postgres 16 database, and 16GB of ram and 4 cpus, It will take 3.5 seconds to respond and give the user the opportunity to enter some search characters.
As far i can go through the debug process, i can see theses kinds of SQL request with long running timer ( >3s):
Theses request, for each kind of related objects making a count of them. So with 85k tenant, each count is executed 85k times.
From my point of view, to display a dynamic selector with customer display field, it's not necessary to count every objects.
To be more specific on the pgsql server, the request is executed on RAM buffered datas. No hit on system SSD. The cache usage is around 30% and hit objects.
We already have a discussion about it on slack: https://netdev-community.slack.com/archives/C01P0FRSXRV/p1702476390699559
The text was updated successfully, but these errors were encountered: