I have been running a small Mastodon instance on a 2GB RAM VPS in Singapore for three months now. I may be wrong, but I believe the experience is worth sharing for others considering similar setups.
Initial deployment was straightforward using the official Docker compose setup. However, I quickly encountered OOM kills during peak federation traffic. Elasticsearch alone would consume 800MB at idle.
My first adjustment was adding 4GB of swap on SSD. This prevented crashes but made the instance noticeably sluggish during morning hours in JST when European instances federate heavily.
I tuned PostgreSQL shared_buffers down to 128MB and disabled Elasticsearch entirely, switching to PostgreSQL full-text search. Sidekiq concurrency reduced from 25 to 10 threads.
Memory usage now stabilizes around 1.6GB RAM with 1.2GB swap used. It is functional but not pleasant. I may be wrong, but I suspect