<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: bigdomain host</title>
    <description>The latest articles on DEV Community by bigdomain host (@bigdomainhost).</description>
    <link>https://dev.to/bigdomainhost</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4215664%2Fe71c6022-73f3-4b83-8b15-b7f15249a744.png</url>
      <title>DEV Community: bigdomain host</title>
      <link>https://dev.to/bigdomainhost</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bigdomainhost"/>
    <language>en</language>
    <item>
      <title>How much RAM does your VPS actually need? Numbers by workload</title>
      <dc:creator>bigdomain host</dc:creator>
      <pubDate>Thu, 29 Oct 2026 16:38:27 +0000</pubDate>
      <link>https://dev.to/bigdomainhost/how-much-ram-does-your-vps-actually-need-numbers-by-workload-1f7p</link>
      <guid>https://dev.to/bigdomainhost/how-much-ram-does-your-vps-actually-need-numbers-by-workload-1f7p</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I'm Parth, I run Bigdomainhost, an Indian hosting company, and the price column below is our own plan list. The RAM numbers apply to any host.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Almost every VPS gets bought one size too big or one size too small. Too small looks like WordPress, MySQL and a page builder squeezed into 2 GB, throwing "Error establishing a database connection" every few days. Too big looks like a 32 GB box running a 3 GB workload.&lt;/p&gt;

&lt;p&gt;Both are fixable with some simple arithmetic. This post is that arithmetic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with what uses the memory
&lt;/h2&gt;

&lt;p&gt;On a normal LAMP or LEMP server, the RAM goes to a handful of things. Typical ranges:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Typical usage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Minimal Ubuntu / AlmaLinux, no desktop&lt;/td&gt;
&lt;td&gt;200-400 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MySQL / MariaDB&lt;/td&gt;
&lt;td&gt;500 MB to 2 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP-FPM&lt;/td&gt;
&lt;td&gt;40-120 MB &lt;strong&gt;per worker&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nginx&lt;/td&gt;
&lt;td&gt;50-100 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Apache with mod_php&lt;/td&gt;
&lt;td&gt;a lot more than Nginx&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LiteSpeed&lt;/td&gt;
&lt;td&gt;somewhere between the two&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Redis&lt;/td&gt;
&lt;td&gt;whatever you cap it at, usually 256 MB to 2 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cPanel&lt;/td&gt;
&lt;td&gt;about 1 GB before you host a single site&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two lines in that table do most of the damage.&lt;/p&gt;

&lt;p&gt;The first is PHP-FPM. People look at "40-120 MB" and think it's small. It's per worker. A WordPress site with Elementor or similar sits at the top of that range, so ten workers at 100 MB is a full gigabyte on its own.&lt;/p&gt;

&lt;p&gt;The second is the MySQL InnoDB buffer pool. Ideally it holds your entire working data set in memory. If it can't, every query that misses the pool goes to disk and your "slow site" problem is actually a RAM problem wearing a disguise.&lt;/p&gt;

&lt;p&gt;Add up the components you actually run, then put 25-30% on top. A server that is full at idle has nothing left for your busiest hour of the day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I size RAM generously and CPU tightly
&lt;/h2&gt;

&lt;p&gt;This is the one opinion I'd defend hardest in this whole post.&lt;/p&gt;

&lt;p&gt;When a server runs short of CPU, it gets slow. Requests queue, pages take longer, but they come back.&lt;/p&gt;

&lt;p&gt;When it runs short of RAM, it breaks. Linux first starts swapping to disk, which is orders of magnitude slower than memory. When swap is used up too, the kernel's out-of-memory killer picks the largest process and kills it. On a web server the largest process is almost always MySQL. So the visible symptom isn't "slow", it's "Error establishing a database connection" until someone or something restarts mysqld.&lt;/p&gt;

&lt;p&gt;CPU pressure degrades. RAM pressure breaks. So if the budget forces a trade-off, take the extra RAM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules of thumb that have held up for us
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WordPress, cached:&lt;/strong&gt; roughly 1 GB per busy site, including its share of MySQL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WooCommerce:&lt;/strong&gt; double that. Cart, checkout and My Account can't be page-cached, so every one of those requests hits PHP and MySQL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minecraft:&lt;/strong&gt; about 1 GB per ten vanilla players, plus whatever the modpack says it needs, rounded up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tally on Cloud:&lt;/strong&gt; Windows Server wants about 4 GB before Tally even starts. 8 GB is comfortable for one or two concurrent users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node and Python APIs:&lt;/strong&gt; measure. They vary more than anything else here, and any number I give you will be wrong for your app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The cheat sheet
&lt;/h2&gt;

&lt;p&gt;Here's how that maps to plan sizes. Prices are our own plans in rupees, excluding 18% GST, because that's what I know. The RAM column is the part that transfers to any host.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload&lt;/th&gt;
&lt;th&gt;RAM&lt;/th&gt;
&lt;th&gt;Our plan (per month)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Static site, small API, dev box&lt;/td&gt;
&lt;td&gt;2 GB&lt;/td&gt;
&lt;td&gt;₹674&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-3 WordPress sites, cached&lt;/td&gt;
&lt;td&gt;4 GB&lt;/td&gt;
&lt;td&gt;₹674&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production WordPress + MySQL&lt;/td&gt;
&lt;td&gt;8 GB&lt;/td&gt;
&lt;td&gt;₹1,348&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WooCommerce store&lt;/td&gt;
&lt;td&gt;8-16 GB&lt;/td&gt;
&lt;td&gt;₹1,348-₹2,696&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10-20 sites behind cPanel&lt;/td&gt;
&lt;td&gt;16 GB&lt;/td&gt;
&lt;td&gt;₹2,696&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Redis or Elasticsearch node&lt;/td&gt;
&lt;td&gt;16 GB+&lt;/td&gt;
&lt;td&gt;₹2,696&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tally on Cloud, 1-2 users&lt;/td&gt;
&lt;td&gt;8 GB&lt;/td&gt;
&lt;td&gt;₹1,899&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modded Minecraft, 20-40 players&lt;/td&gt;
&lt;td&gt;16 GB&lt;/td&gt;
&lt;td&gt;₹2,696&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI runners, build servers&lt;/td&gt;
&lt;td&gt;16-32 GB&lt;/td&gt;
&lt;td&gt;₹2,696-₹5,017&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Measure what you're using right now
&lt;/h2&gt;

&lt;p&gt;If you already have a server, don't guess. Three commands tell you most of what you need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# free memory, human readable&lt;/span&gt;
free &lt;span class="nt"&gt;-h&lt;/span&gt;

&lt;span class="c"&gt;# the ten biggest processes by memory&lt;/span&gt;
ps aux &lt;span class="nt"&gt;--sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-%mem | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-11&lt;/span&gt;

&lt;span class="c"&gt;# is it swapping? (5 samples, 1 second apart)&lt;/span&gt;
vmstat 1 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things to read correctly.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;free -h&lt;/code&gt;, look at the &lt;strong&gt;available&lt;/strong&gt; column, not &lt;strong&gt;free&lt;/strong&gt;. Linux uses spare memory as disk cache and gives it back on demand. A low "free" number is normal and healthy. People panic over it all the time and it means nothing.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;vmstat&lt;/code&gt;, watch the &lt;code&gt;si&lt;/code&gt; and &lt;code&gt;so&lt;/code&gt; columns (swap in, swap out). If they're non-zero across samples, the box is actively swapping. That's your signal to add memory, not to tune something.&lt;/p&gt;

&lt;p&gt;If you want to see how much each PHP-FPM worker is actually taking on your site, rather than trusting my 40-120 MB range:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-o&lt;/span&gt; rss,cmd &lt;span class="nt"&gt;-C&lt;/span&gt; php-fpm &lt;span class="nt"&gt;--sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;-rss&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RSS is in KB. Multiply your typical worker size by &lt;code&gt;pm.max_children&lt;/code&gt; in your pool config and you'll know whether your FPM settings can even fit in the RAM you have. (The process name may be &lt;code&gt;php-fpm8.2&lt;/code&gt; or similar depending on the distro, so adjust the &lt;code&gt;-C&lt;/code&gt; value.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Should you add swap?
&lt;/h2&gt;

&lt;p&gt;Yes, 1-2 GB of it. Treat it as an emergency buffer that turns a hard crash into a slow patch. It is not a substitute for RAM. If you're swapping routinely, buy more memory.&lt;/p&gt;

&lt;p&gt;On a box without swap, the usual setup is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;fallocate &lt;span class="nt"&gt;-l&lt;/span&gt; 2G /swapfile
&lt;span class="nb"&gt;sudo chmod &lt;/span&gt;600 /swapfile
&lt;span class="nb"&gt;sudo &lt;/span&gt;mkswap /swapfile
&lt;span class="nb"&gt;sudo &lt;/span&gt;swapon /swapfile
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="s1"&gt;'^/swapfile '&lt;/span&gt; /etc/fstab &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'/swapfile none swap sw 0 0'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/fstab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;grep&lt;/code&gt; guard stops you adding a duplicate fstab line if you run it twice. Then &lt;code&gt;free -h&lt;/code&gt; again to confirm the Swap row shows 2.0Gi. (On some filesystems &lt;code&gt;fallocate&lt;/code&gt; swap files fail &lt;code&gt;swapon&lt;/code&gt;; if that happens, create the file with &lt;code&gt;dd&lt;/code&gt; instead.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Is 1 GB ever enough?
&lt;/h2&gt;

&lt;p&gt;For a static site, a small API or a personal project, yes. For WordPress with MySQL on the same machine, it's tight enough that one traffic spike will wake up the OOM killer. If the site matters to anyone, start at 2 GB. For a production WordPress site with the database on the same box, 4 GB is the sensible starting point, and 8 GB once WooCommerce or a dozen client sites are involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  When CPU does matter more
&lt;/h2&gt;

&lt;p&gt;There are workloads where I'd reverse my advice: video encoding, heavy cron jobs, and game servers. For game servers, single-core speed beats core count. A Minecraft server's main loop mostly runs on one thread, so extra cores don't help it the way they help a pool of PHP workers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't over-buy either
&lt;/h2&gt;

&lt;p&gt;A 32 GB server running 3 GB of workload is money spent on nothing. Our plans resize in place: vCPU, RAM and disk grow with a single reboot and nothing gets reinstalled. If your host can do the same, the right move is to start one size down and move up when &lt;code&gt;free -h&lt;/code&gt; and &lt;code&gt;vmstat&lt;/code&gt; tell you to, not when a sales page does.&lt;/p&gt;

&lt;p&gt;If your host can't resize in place and a move means a full rebuild, that changes the maths. Then I'd buy one size up and accept some waste, because a migration under pressure costs more than the extra RAM.&lt;/p&gt;

&lt;p&gt;The full VPS ladder we sell, with Mumbai (BOM-1) and Delhi NCR (DEL-1) locations, is on the &lt;a href="https://bigdomainhost.com/vps-hosting.html" rel="noopener noreferrer"&gt;KVM VPS page&lt;/a&gt;. If you're still deciding whether you need a VPS at all, we also wrote up &lt;a href="https://bigdomainhost.com/guide-vps-vs-shared-hosting.html" rel="noopener noreferrer"&gt;VPS vs shared hosting&lt;/a&gt;, and the original version of this guide is &lt;a href="https://bigdomainhost.com/guide-how-much-ram-does-a-vps-need.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Posted by Parth from Bigdomainhost. The original version of this guide is on our site.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>webdev</category>
      <category>wordpress</category>
    </item>
  </channel>
</rss>
