Bot RAM calculator
How much RAM does my Discord bot need?
Enter your bot and get an estimate with the plan that fits. The method is written out below.
- Runtime and library90
- Cache for your servers6
- Headroom for spikes29
This also fits the free tier (512 MB), which stays online while you check in once a week.
Examples
Common bots and what they need.
| Bot | Library | Servers the bot is in | Estimated RAM | Plan that fits |
|---|---|---|---|---|
| Personal bot in 5 servers | discord.js (Node.js) | 5 | 128 MB | Small bot |
| Moderation bot for one 1,000+ member server | discord.py / py-cord / nextcord | 1 | 128 MB | Small bot |
| Public bot in 400 servers | discord.js (Node.js) | 400 | 384 MB | Small bot |
| Music bot with Lavalink | discord.js (Node.js) | 50 | 704 MB | Community bot |
| Sharded bot in 6,000 servers | discord.js (Node.js) | 6,000 | 1,344 MB | Community bot |
| JDA bot in 200 servers | JDA (Java) | 200 | 448 MB | Small bot |
Methodology
How the estimate works.
A rough model from common experience with Discord bots. Your code and caches decide the real number, so watch memory in the panel.
- Runtime. The language runtime and library at idle: about 90 MB for discord.js, 70 MB for discord.py, 220 MB for JDA on the JVM, 30 MB for Go or Rust.
- Cache. Memory per server grows with how much you cache and how big servers are: minimal caching keeps almost nothing, full member and presence caching keeps every member.
- Sharding. From 2,500 servers Discord requires shards, about one per 1,000 servers. discord.js ShardingManager runs one process per shard (one runtime each); discord.py and JDA share one process.
- Voice. Lavalink is a Java audio server that needs about 450 MB on its own. Audio encoded in the bot with FFmpeg adds a base plus a little per active server.
- Headroom. We add 30% for spikes and garbage collection, then pick the smallest plan with at least that much RAM.
This is an estimate, not a guarantee. A memory leak, large message caches or heavy image processing can change the numbers. Plan changes are prorated.
Why does my bot use more RAM over time?
Caches fill as the bot sees more members, messages and channels. Limit caches in your library's options; memory that keeps growing without limit is usually a leak.
Does the Server Members intent cost memory?
It lets the bot receive and cache every member, which is the biggest memory cost for bots in large servers. Only enable it if you need member lists.
Is 512 MB enough?
For most bots in up to a few hundred small servers without voice, yes. Music bots with Lavalink and sharded bots need more.