Discourse being painfully slow

I’ve installed it on a CentOS 8 x86_64 machine, with 2 GB RAM and a 30 GB ssd. RAM usage stays around 80%. Using the site (https://forum.karmazynowegranie.pl/) is a pain, and i get errors 502 and 504 at random, when trying to edit and save stuff. Loading is slow but it works. I did a clean install using the official git repo on a barbones system via ssh. I can try to reinstall the machine with ubuntu if that might help? Maybe it’s a database problem?

4 Likes

Damn that site is indeed very slow.

How is the single core performance of this machine? What is the processor model? How many cores do you have?

6 Likes


this is all i know, it doesn’t look like its under too heavy a load though

1 Like

Just confirming you did a full docker based install using our discourse-setup helper?

3 Likes

Yes. I only installed the latest docker-ce manually, in accordance with docker’s instructions. Hello-world container ran fine.
(also curl and git)

Maybe these will give more insight:
image
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fforum.karmazynowegranie.pl%2F

Found out my shared memory and unicorn workers were unusually low, set them to the correct values. 512MB for 2GB of ram and 4 workers. Unfortunately, this did not fix the issue.

Looks like an abysmally slow CPU on this server. What is this VPS provider? Maybe they are overselling their capacity?

You can get over 10x this performance from a $5 Digital Ocean server.

5 Likes

Its called rapiddc.pl and it’s a local provider. Idk, should I ask their support about this? Already paid for it soo. You saying DigitalOcean’s $5 deal will run this better?

Not better, 10 times better. Any of the common providers will to be honest.

5 Likes

So you’re saying I either got scammed or my host is an ass?

You could just ask them why you get that performance and then decide depending on their reply…

1 Like

Scaleway.com provides instances in Warsaw. And they are very good imho. Give them a try. They charge by the minute of uptime just like most of the top providers, so you have very little to lose.

3 Likes

I put in a ticket with them, let’s see what they say.

They basically said that “The processor isn’t limited and as you can see is clearly not the issue since it’s usage is only a few percent. I’d recommend looking into the configuration and other parameters”

2 Likes

I don’t know - when I access that site, it seems pretty good to me… Chrome’s lighthouse seems ok with it too:

I’m in the UK.

Just yesterday it was giving me 80% in poland. I’ll check now

I just tested it with 5 different people, 4 of which were in Poland and one in UK, the server is also supposedly in Poland (Olsztyn), everyone got 89

I just realised we’re all checking the “mobile” tab, the “desktop” tab shows 99?

Also the mobile page seems, well, weird. But that’s for another topic i guess?
image

What can I do about these two?

I might be accessing via IPv6 if that is anything. I note you are all setup for that:

I setup cloudflare overnight (but only enabled it, didn’t touch the app.yml), so that might’ve done something?

I guess that fixed it. Thanks to everone participating

2 Likes

@TallTrees @Helios1 Lighthouse is (mostly) a front-end performance test. It’s the wrong tool to use when debugging slow response times from the back-end.

5 Likes

Ok - fair point. Out of interest, what would be your prefered tool for this sort of problem - the waterfall?

The mini-profiler should help out. Make sure your account email is in the DISCOURSE_DEVELOPER_EMAILS environment variable, and it should pop up when you load the site and give you server timings.

2 Likes

There are mini-profiler numbers at post#5: Discourse being painfully slow - #5 by Helios1

It’s a very slow CPU.

2 Likes