How to determine performance bottleneck?

I tried to search for this, but didn’t find anything recently posted, so figured I’d ask to determine what’s normal and expected.

I’ve recently come from other forums, and the 1st page load is reasonably quick, but finding with Discourse the page loads, but I’m presented with spinning circle whilst it waits for the page to render - I’m unsure if that’s a server delay or a client / JS delay in building the page based on the returned server result.

The delay is around 5-10 seconds - but generally the performance is fine after that.

If the issue is likely to server/hosting, what is the normal issue - as the metrics on everything look low. CPU, disk and memory don’t seem to be maxed out, so not sure where to invest $$ if the outcome isn’t really related to the server. Any tips to monitor or watch metrics that can help show where Discourse is spending its time waiting for stuff ??

You can see how far the first page renders here. A cdn night help.

How far ? Here where ?

What version of Discourse are you at?

How many posts are in the topics you are looking/testing?

Fast and Meta I suspect :wink:

1 Like

Latest 2.8.x and only 30 or so users. I’m running on a dual core vCPU with 2g ram and SSD disk.

As mentioned, all the metrics on the server are showing no load, so don’t understand why there is 5 second spinning before the page is fully rendered.

So is there nothing to check or monitor, just install and pray it’s all fine??

Actually, it’s more like the server goes cold, and I’m just requesting a page refresh that hasn’t been done for a while - does the backend parts go to sleep or such that infrequent use means the first person is likely to wait a little longer than usual?

When you say 30 users, do you mean concurrent or that’s the entire user base?

If it’s 30 concurrent users then you spec might actually be a but low.

What is memory at on averse. 30-50-80%???

I happened to be looking at G analytics speed and performance charts, I noticed a change since we moved from 2.2 up to 2.9, a dis-improvement, but I need to look more. I’m not really experiencing noticeable slowdown if anything it seems faster. So what do I know or what does G analytics know eh!

I also read about the 10K post limit per topic, that if you have a lot of posts, it has to I believe load up into memory the entire thing before it displays, and this is perceived as slowness on fist look.

I find once it loads up something, then it’s all fast. I’m no expert but it could be browser causing too and all kinds of other tricks of the trade employed to delivery the discourse experience.

Is this a VPS at a host, or something else? How was it installed? Knowing which 2vcpu is helpful - not all processors are equal.

Is anything between the instance and the clients? A reverse proxy or something like CloudFlare?

1 Like

I finally opened up Developer Tools and can see some error messages… looks like a) fonts are missing or not found and b) that its using IP instead of the correct FQDN - of which I’m unsure if IP is correct

The FetchEvent for "https://35.212.139.150/fonts/Roboto-Regular.ttf?v=0.0.9" resulted in a network error response: the promise was rejected.
Promise.then (async)
(anonymous) @ Router.mjs:60
The FetchEvent for "https://35.212.139.150/fonts/Roboto-Bold.ttf?v=0.0.9" resulted in a network error response: the promise was rejected.
Promise.then (async)
(anonymous) @ Router.mjs:60
NetworkFirst.mjs:167 Uncaught (in promise) no-response: no-response :: [{"url":"https://35.212.139.150/fonts/Roboto-Regular.ttf?v=0.0.9"}]
    at a.makeRequest (https://community.hubivue.com/javascripts/workbox/workbox-strategies.prod.js:1:2145)
makeRequest @ NetworkFirst.mjs:167
color_definitions_light_4_1_530ebcc4a553d42866a6f343d784841cf5c0b816.css:1          GET https://35.212.139.150/fonts/Roboto-Regular.ttf?v=0.0.9 net::ERR_FAILED
NetworkFirst.mjs:167 Uncaught (in promise) no-response: no-response :: [{"url":"https://35.212.139.150/fonts/Roboto-Bold.ttf?v=0.0.9"}]
    at a.makeRequest (https://community.hubivue.com/javascripts/workbox/workbox-strategies.prod.js:1:2145)
makeRequest @ NetworkFirst.mjs:167
color_definitions_light_4_1_530ebcc4a553d42866a6f343d784841cf5c0b816.css:1          GET https://35.212.139.150/fonts/Roboto-Bold.ttf?v=0.0.9 net::ERR_FAILED

Google cloud VM and nothing between the host and web / no CDN

Ok, so it looks like you’re hosting this instance at Google.

Did someone try to install it against the IP address prior to the DNS name?

1 Like

Far out… I reset the font choices back to defaults (ie Arial) and everything is performing fine. Looks like a bug or something is skew with selecting fonts in the setup. Case closed and I’ll live Arial for now

1 Like

Probably. Unsure. If that’s a problem, is there a way to reset it back?

It depends how they switched to using the hostname after trying to use IP.

Was this installed following the steps in the Standard Install? I would have a chat with whoever put the instance together to find out what was done. The IP may still be referenced elsewhere.

1 Like

Is there a cmd to reset the install back or fix this? Seems daft you can’t ever change the host name ever again. Is that limitation by design?

Note that the performance is fine now that the basic fonts are being used - the issues seems related to using the Google Roboto fonts.

1 Like

I take it I should just follow this guide more or less…

It can’t hurt to try, but if you don’t know any of the history of the instance then we can’t even confirm if you’re running an officially supported installation.

1 Like