How Much RAM and CPU Does a Discord Bot Actually Need?

Most server owners either overpay for gigabytes of unused RAM or crash on tiny caps because of one misconfigured intent. Here is how Discord bots actually spend memory and CPU.

Performance Published Updated 7 min read

Baseline RAM usage by language and runtime

Before your bot handles a single slash command, its language runtime and Discord library take up a baseline slice of memory. Here is what a clean, idle bot connected to a handful of servers typically uses on Linux:

Go (discordgo)
15–40 MB — Compiled native binary with minimal runtime overhead. Ideal when you want ultra-lean resource usage.
Python (discord.py / Pycord)
35–80 MB — Lightweight at idle; climbs noticeably if you load heavy libraries like Pillow, NumPy, or large cog frameworks such as Red-DiscordBot (150–350+ MB).
Node.js (discord.js)
60–130 MB — V8 allocates heap headroom proactively, so Node bots look slightly heavier at idle even when doing very little. Running via npm start adds ~40 MB on top.
Bun (TypeScript / JS)
45–100 MB — Fast startup and native TypeScript support without a separate ts-node compile step eating extra RAM.

That means a normal utility, moderation, or ticket bot for a small-to-medium Discord server comfortably fits inside 256 MB of RAM—no multi-gigabyte server required.

What actually drives RAM usage up

Developers often ask, "How many commands can 256 MB handle?" Commands are almost never the bottleneck. Four other things consume nearly all of a bot's memory:

  • Member and presence caching: Enabling the GuildMembers or GuildPresences privileged intents instructs your library to hold member objects and online statuses in RAM. Across a few busy servers with thousands of users, member and presence caches can easily add 100–400 MB.
  • Message caches and unbounded arrays: Storing every incoming message in a global JavaScript Map or Python dict creates a slow memory leak. Your bot runs fine on day one, then gets killed by the OS (OOMKilled / exit code 137) every few days once the cache fills up.
  • Image and rank-card rendering: Libraries like @napi-rs/canvas , sharp , or Python Pillow allocate large pixel buffers while drawing welcome banners or leveling cards. Concurrent image commands cause sharp temporary RAM spikes.
  • Embedded web dashboards and ORMs: Bundling an Express or Fastify dashboard plus Prisma or Sequelize in the same process is convenient, but typically adds 40–90 MB to your baseline footprint.

When CPU matters more than RAM

Text and slash-command bots spend 99% of their time waiting on Discord events and database queries—they barely touch the CPU. Three common scenarios, however, need dedicated CPU cycles to avoid stuttering or performance interruptions:

  • Voice channels & FFmpeg audio: Decoding and encoding Opus audio streams in real time needs steady CPU cycles. On a throttled shared CPU, voice audio stutters or drops out.
  • Frequent polling loops: Checking an external game server API (like FiveM, Minecraft, or Roblox) every few seconds across dozens of channels keeps the event loop busy.
  • High-traffic servers: Processing hundreds of messages per second for automod regexes, anti-spam scoring, or live logging benefits from dedicated CPU headroom.

Quick sizing guide by bot type

Use this rough sizing chart as a starting point, then watch your real memory graph after a few days of live server activity:

Personal, friend-server & small community bots 128–256 MB RAM · Shared CPU
Slash commands, tickets, modmail, reaction roles, giveaways, or AI chat bridges in 1–10 servers (under ~2,000 members). Fits easily on a shared slot like Blip Host Spark ($1.00/mo for 2 bots).
Active communities, web dashboards & voice/FFmpeg 384–512 MB RAM · 1 Dedicated vCPU
Busy servers (2,000+ members), bots with rank-card rendering, heavy Python suites, voice/audio playback, or live FiveM/ER:LC polling. Needs a dedicated slot such as Blip Host Flame ($2.50/mo).
Multi-server public bots & multiple voice streams 1–2+ GB RAM · 2+ Dedicated vCPUs
Verified public bots serving hundreds to thousands of guilds, sharded bots, or multi-guild music bots running concurrent FFmpeg pipelines.

5 quick ways to cut your bot's RAM usage

Before upgrading your plan just because your bot hit an out-of-memory restart, check these five quick wins:

  1. Start Node directly: Change your start command from npm start to node index.js (or node dist/index.js ). That frees roughly 40 MB immediately.
  2. Drop unused intents: Remove GuildPresences and GuildMembers unless a feature genuinely requires them.
  3. Cap library caches in discord.js: Use Options.cacheWithLimits to bound MessageManager and disable caches you never read (like ReactionManager or StageInstanceManager ).
  4. Move history out of RAM and into a database: Store user XP, logs, and cooldowns in SQLite, PostgreSQL, or MongoDB instead of growing in-memory arrays.
  5. Set a Node heap ceiling on tight containers: Passing node --max-old-space-size=192 index.js on a 256 MB container tells V8 to garbage-collect earlier instead of letting the OS hard-kill the process.
discord.js — cap message cache to prevent gradual RAM growth
import { Client, GatewayIntentBits, Options } from 'discord.js';

const client = new Client({
    intents: [GatewayIntentBits.Guilds],
    makeCache: Options.cacheWithLimits({
        ...Options.DefaultMakeCacheSettings,
        MessageManager: 25,
        PresenceManager: 0,
        ReactionManager: 0,
    }),
});

Not sure whether your bot belongs on a shared or dedicated slot? Check our Plans & Slots guide or browse troubleshooting OOM crashes and disconnects.

Common questions

Is 256 MB of RAM enough for a Discord bot?
Yes for most small and medium bots. A clean discord.js or discord.py bot handling slash commands, tickets, or moderation for 1 to 10 servers usually sits between 60 MB and 160 MB of RAM, provided you are not caching tens of thousands of members or running heavy image generation.
Does adding more slash commands use significantly more RAM?
No. Command code itself takes kilobytes to a few megabytes. Memory grows primarily from cached Discord objects (members, presences, messages), in-memory arrays or Maps that never expire, and native media libraries like Canvas or FFmpeg.
Why does my Node.js bot use 40 MB more RAM when started with npm start?
Running npm start keeps the npm CLI process alive in memory as a parent wrapper around your bot. Starting your script directly with node index.js removes that extra process immediately.
How much RAM and CPU do Discord music or voice bots need?
Voice and audio bots transcode audio in real time with FFmpeg and Opus, which demands steady CPU headroom and typically 256 MB to 512 MB+ of RAM per active stream. Avoid heavily throttled shared tiers for voice bots.

Ready to put your Discord bot online 24/7?

Deploy custom Node.js, Bun, Python, or Go bots from GitHub or a ZIP upload—or launch a 1-click open-source bot under your own token. Plans start at $1.00/mo ($10.00/yr) with managed PostgreSQL & MongoDB, daily backups, and plain-English Discord error checks included.

Keep reading

All posts →

Cookie preferences

We use essential cookies to keep Blip Host working securely. With your permission, we also use Microsoft Clarity to improve usability and optional Reddit conversion measurement to see when ads lead to signups or plans. Passwords and bot tokens are never shared. Privacy Policy