[SOLVED] Grafana (standalone) is very slow

I am running Grafana 8.2.2 on a virtual server (4 cores, 8 GB ram) on Arch Linux. I did not connect any datasource yet (that’s what I mean with “standalone”), but still doing the initial admin. Nevertheless, the tool is really slow. Login takes ~20 seconds. Adding a user to a team takes ~30 seconds. What can I do to analyze and improve the situation?
Thanks, mipi

BTW: gzip is already enabled but didn’t improve the performance much

  1. Is this virtual server hosted by yourself on a physical machine you
    control, or is it hosted elsewhere, by some generic hosting provider?

  2. Is this machine running any other services which you can measure the
    performance of, and do you find that they are also slow?

  3. If it’s self-hosted, are you running (or can you create) any other virtual
    machines on the same physical server, and run something else on them, again
    which you can measure the performance of?

  4. Either way, what results do you get from tools like top or htop (load
    average and process states), iptraf (network traffic, I recommend the -ng
    version), iotop (disk activity), etc. on this virtual machine?

  5. Have you verified that DNS is working correctly - one clue if it isn’t is
    that logging in by SSH takes ~15 seconds or so (to get the password prompt if
    you use one, or to get the command prompt if you use public keys).


Thanks for the hints.

1.: The server is hosted by a generic hosting provider.
2.: I have nginx running serving 3 static web sites (not much traffic) and a docker container. There, I do not observe slow performance,
3.: No, it’s not self-hosted.
4.: I used htop. Doesn’t show any problems wrt. memory usage or CPU load.
5.: Logging in via SSH takes 1-2s → OK. But I have a www domain pointing to the Grafana instance. Normally, I access the Grafana instance why that domain, and then I observe a slow performance. When I use the IP address instead, the response time is OK. Thus, it seems to be DNS. Interesting! Any idea why Grafana is that slow in that case? Just curious.

I found the root cause - a stupid thing: My server could not resolve localhost. After adding localhost to /etc/hosts the problem was gone :slight_smile: