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

Query is basically slow #186

Open
karolyczovek opened this issue Jun 18, 2024 · 4 comments
Open

Query is basically slow #186

karolyczovek opened this issue Jun 18, 2024 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@karolyczovek
Copy link

curl -Li ${NETBOX_URL}/api/plugins/prometheus-sd/devices?role=server&status=active&limit=100 -H "Authorization: Token $NETBOX_TOKEN" -H "Content-Type: application/json; indent=4" -o /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 47924 100 47924 0 0 873 0 0:00:54 0:00:54 --:--:-- 10523

real 0m54.860s
user 0m0.078s
sys 0m0.015s
root@instance-20240429-121233:~/netbox-docker#

I have ca 50 devices listed, netbox version is 4.0.5

@FlxPeters
Copy link
Owner

Duplicate of #156

50 devices shouldn't be an issue. There are some bottlenecks when it comes to > 1000 devices.

What kind of system is Netbox running on, and can you make sure it's not a database issue or something like that?
The raw curl command is too less information for a proper problem analysis.

@FlxPeters FlxPeters added duplicate This issue or pull request already exists question Further information is requested labels Jun 21, 2024
@FlxPeters FlxPeters self-assigned this Jun 21, 2024
@karolyczovek
Copy link
Author

It's bare 4.0.5 netbox-docker, 8G RAM with 4 cores, the UI is generally responsive, also the generic API is quite fast as ansibe is using it for inventory. what details do you need?

@FlxPeters
Copy link
Owner

The specs sound reasonable. To be honest, i, can't analyze your Netbox performance. There are too many possible sources.
If you can point out a specific part in the code which causes a problem, we can talk about it.
Otherwise, this issue is not actionable.

There are plenty of profiling options:

@FlxPeters
Copy link
Owner

If this doesn't work there is a workaround if you have really many devices: #156 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants