I have a new PI setup with (for now) very few users or data in general. The application seems incredibly slow, with each request taking several seconds before data on screen is being updated. I couldn’t spot any obvious bottlenecks.
Is that PIs expected performance or do you suspect a configuration issue somewhere?
Just to provide a bit more information. This is a regular GET call to /system/. I seem to be getting pretty consistent 3 second of delay for every request I make, originated from somewhere within the application.
It can be fast, it can be slow.
Which it is? How should I know?
Well, obvious sarcasm aside…
I can filter tens of terabytes of data in the low double-digit millisecond range, with a bit of clever indexing and horizontal scaling. So yes, a web application with almost no data should not take over 3 seconds to display me a handful of information.
This application is either horribly coded, wrongly configured by me, or does something very intricate that takes several seconds to process each request (maybe security related for all I know). I would like to know which one it is, so I can fix the issue, if there is one.
Are these request times average for a standard installation, or not?
For me a GET call on the /config/system endpoint takes between 100 - 200 ms. The database runs on the same system as PI itself. 3s is seems way too much.
Thank you for letting me know, I appreciate it!
Time to start digging then. I will update this thread with what went wrong when I found the problem, just in case someone stumbles over a similar issue in the future.
Okay I got it. The issue is not PI specific, but for the curious:
I accessed the DB cluster via the hostname of one of the cluster VMs. I had a hunch and changed it to the IP, and the total request time dropped to 60ms. So very likely a DNS (it’s always DNS), or an IPv6/4 issue. After changing the SQL resolvers, as well as the pi.cfg, everything is butter smooth.
Out there in the wild, there are systems that actually use DNS/hostnames.
So I could only repeat my first post. There is no easy way to tell anything about your performance. Especially since you did not provde any information in your first post.