Hi all,
I have been investigating the server performance for some time now.
For the time being I have disabled the preview plugin:
This is because it uses a significant amount of CPU resources and we are still looking to optimize the site further. I will be investigating more and hopefully I can turn it back on but I wouldn’t bet on it.
Was getting gateway errors. Shoulda taken screenshots. Speed seems to have come back a bit in the last 10 min or so. Not sure if there is any logs for the past couple of hours, but anecdotally me and a couple other buddies were seeing issues (we’re in different parts of the country as well).
Earlier today around 11am est, canada, I am having trouble opening links i saved. Saved the links up so I can open them the next day. They wont load so I decided to search the post using search and it keeps ending up as No results found. Changed to any search tags and nothing will show up. I can open the links now but the search is still hit and miss. Plus, I typed this message 4x and it keeps getting deleted as I was typing so I had to type this somewhere else so i can copy paste here. I cant even upload a pic so i put it on imgur
I’ve noticed the issues. I havent had time to dig lately but I know it’s hardware related. need to save CPU Cycles or do upgrades. We can’t afford upgrades though.
Is there anything we can do to get back CPU cycles and reduce load? Some spitballing…
Disable animated gif previews on post thumbnails
Remove chat function (redundant feature vs messaging)
Add search “cooldown” for non-patreon members (1 search per min or something like that)
Site “waiting room” for non-patreon members during periods of high traffic
Archival of old non-script related posts
Archival of old private messages
Purge of inactive members
Some of this wont affect server load.
Things like animated images are client-side performance impact.
Old threads and users are more memory intensive than anything.
the search cooldown is an interesting idea but we would need proof that search is a main contributor to the load.
When I have more time to investigate. I’ll look into those options.
Careful with limiting search. There are too many posts asking for things that are already answered before. If users are limited in search then we will probably get even more irrelevant threads. There is also a risk of page reloads when search doesn’t work on the first try which can counteract the performance benefits. Personally I would limit other things first unless it requires lots of resources. Limiting search as you type could be an alternative if that is possible.
Whats the server running on, rails, php, node? I ask because you could use something like datadog/newrelic(trial) to get some metrics on what is impacting the server. If I had to guess it would be db indices may need looking into.
The platform is called Discourse, so it’s running on Ruby.
I’m not sure about the current setup obviously but I would recommend using Cloudflare’s free tire to add some super simple caching. Another thing is to run Postgres and Redis on a separate server. This should be fairly easy if you’re using the recommended Docker setup. Looking at the minimal hardware requirements the costs of running Discourse shouldn’t be too high, but then again I don’t have any intel about the current setup, hardware, costs and traffic of course. Switching cloud providers is another “easy” solution since DigitalOcean is extremely expensive for what hardware they provide nowadays.