Improve performance on Digital Ocean

AI-generated summary

In the topic ‘Improve performance on Digital Ocean’, user doctorwho reports that their Discourse instance on a Digital Ocean VPS (4GB RAM, 2 cores) is significantly slower than their local testing machine, taking 220-440ms to display threads compared to 80-180ms locally. Despite configuring 5 Unicorn workers and a 1GB buffer, the performance gap persists. fierce and sam explain that this is likely due to the overhead of virtualization and shared CPU resources on Digital Ocean, noting that Ruby is CPU-bound and shared hosting introduces penalties not present on dedicated hardware. sam mentions their own hosts achieve 100-170ms response times. Acknowledging the performance limitations of the VPS, doctorwho decides to keep the server for three months but considers migrating the installation if the process is simple. codinghorror adds that the observed latency is ‘about right’ for a shared tenancy environment.

Hi,

I’m using the digital ocean plan for 4GB Memory 2 Core Processor 60GB SSD Disk 4TB Transfer
It’s for my Discourse production made for local authorities to exchange about land use managment.
I found it quite slow … I put 5 unicorn and 1Gb buffer as indicate to the comment lines in containters/app.yml.

Before that, I’ve tested Discourse on my own desktop machine under openSUSE 13.1 (I’m love that distro) with Docker installed and quite same configuration (it’s 4 Gb memory and 2 core too …)

With Digital Ocean i’m about 220m to 440 ms to display a thread instead of 80 to 180 ms for my testing machine OpenSUSE .

Any suggestion ?

Well for one thing, it’s a dedicated machine vs a VM in terms of performance.. I doubt you have two cores fully dedicated to you on DO

Ruby is CPU bound, we found you pay a penalty for virtualization and an unknown penalty for living on a shared host where CPU is shared between N shards (and you have no idea what CPU the real hardware is on)

On our hosts we are able to display topics on meta in about 100ms to 170ms. If you are looking for cutting edge performance you can always host with us.

Ok because I keep my dedicated server for testing and my webmapping application.
I’ve paid for 3 months to Digital Ocean so I’ve got to keep it but if it’s easy to move a Discourse installation, why not :slight_smile:
I see that with you in private. Thanks

That seems about right and not too bad. Shared tenancy…