NetBox 2.9.11 and 2.11.7 is a lot slower than 2.8.5 #6657
-
Briefly: NetBox 2.8.5 runs fine, but upgrading to 2.9.11 or 2.11.7 makes operations slow. For example: the same app that takes ~1 second in 2.8.5 takes ~12 seconds in 2.11.7. Platform info at start:
Test procedure:
Now upgrade dev (server2) to 2.9.11:
Redoing the test procedure above:
Now upgrade dev to 2.11.7:
Redoing the test procedure above:
This same slowness is present in all apps, like VRFs, getting a tenant, or getting an unexisting prefix, etc. What I noticed is when I keep GETting for example an unexisting prefix ( Any ideas how to troubleshoot this further? Update: With another identical server+database combo ("server3", actually the database is the same Amazon RDS instance but just a new database in the service) but with an empty NetBox database it looks like this:
while in the dev server ("server2") it looks like this:
i.e. about three times slower. As far as I see it the servers are configured identically, server2 just has all the prod data dumped in and server3 has a blank database. Also the previously mentioned /circuits/providers/ tests are fast on server3. So it looks like there is something in the database that destroys the performance with 2.9.x and 2.11.x but not with 2.8.5. But how to find it out... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
I can't think of anything that would have this sort of impact in the newer releases. Some suggestions:
|
Beta Was this translation helpful? Give feedback.
-
So here is the solution, please read the intermediate steps from the thread above. The problematic API user (let's call it "ipamuser") has add+change+delete+view permissions for specific models, not to every model, in NetBox 2.8.5, that's about 210 permissions selected in the list. Even opening that "ipamuser" in NetBox 2.11.7 configuration screen (after upgrading NetBox) takes several seconds while the permissions are checked/fetched. There are about 210 "ObjectPermission_users" objects in the list, and the same permissions are found in the Permissions configurations as well. Apparently the upgrade migrations created those ~210 separate permissions (like So, I created a new permission (just one permission) that included all the needed actions and objects, and assigned that permission to "ipamuser", and now the API test calls are as fast as expected. That's a lesson for all NetBox upgraders (from earlier versions to 2.9.x or newer): be sure to check the migrated permission combinations and create optimized permissions as needed. I don't know if this has been already discussed somewhere, but there you go anyway. |
Beta Was this translation helpful? Give feedback.
So here is the solution, please read the intermediate steps from the thread above.
The problematic API user (let's call it "ipamuser") has add+change+delete+view permissions for specific models, not to every model, in NetBox 2.8.5, that's about 210 permissions selected in the list.
Even opening that "ipamuser" in NetBox 2.11.7 configuration screen (after upgrading NetBox) takes several seconds while the permissions are checked/fetched. There are about 210 "ObjectPermission_users" objects in the list, and the same permissions are found in the Permissions configurations as well. Apparently the upgrade migrations created those ~210 separate permissions (like
circuits.add_circuit
,circuits.ch…