VPS with 8 GB RAM: several projects, 1C and game servers on one machine
People usually go for eight gigabytes when they have too many small servers and want to merge them into one, or when a single task needs memory in earnest: 1C with a database for several users, a modded game server, GitLab, CI runners. At this size the main question is no longer "will it fit" but "how do I split memory between services so that one doesn't starve the rest".
What runs on 8 GB
- Consolidation. Five to ten websites on a shared Nginx and a single MySQL, plus bots and cron jobs that used to live on separate 1–2 GB VPSes. One database with a 2–3 GB buffer works more efficiently than five small ones.
- 1C:Enterprise. A file-based database with web publishing, or the client-server version with PostgreSQL for 5–10 users: the 1C cluster takes 2–4 GB and the database another 2–3. Details on licences and platform versions are in the VPS for 1C section.
- GitLab for a small team: the official minimum is 4 GB, but with a runner, container registry and Prometheus it becomes comfortable from 8 GB. See VPS for GitLab.
- Game servers: Minecraft with a modpack for 20–40 players, a Rust or ARK server for a small community, or a couple of CS2 servers at once. Choosing by game is covered on the VPS for a game server page.
- Windows Server as a terminal server for 3–5 staff members with office software.
8 GB is overkill for a single CMS website, a single bot or a corporate VPN: such tasks live for years on 2 GB, and the extra memory will simply go to the file cache. It becomes too little when the database outgrows 10–15 GB and no longer fits in the buffer, when Elasticsearch appears on the server, or when the number of 1C users goes above fifteen. The tell-tale sign is swap that stays in use and response times that grow at peak hours while the CPU is not loaded.
How to split memory between services
The most common mistake at 8 GB is having every service tuned "for the whole server". MySQL with the "buffer at 70% of memory" advice, Java with its default heap and PHP-FPM with a hundred processes each look reasonable on their own, but together they guarantee an OOM. Plan the budget in advance:
- Leave 1 GB for the system and the file cache.
- Give the database a fixed share: size
innodb_buffer_pool_sizeorshared_buffersby the amount of hot data, not by a formula based on total memory. - Set
-Xmxfor Java applications and game servers, leaving 25% headroom for off-heap memory. - Set
mem_limitfor Docker containers andMemoryMax=in the unit file for systemd services. Then, if something leaks, the kernel kills the culprit rather than the database.
A 2–4 GB swap is still needed as a safety net, but keep vm.swappiness low: a game server that has gone into swap starts lagging for every player at once.
Cores, disk and an honest plan
The typical combination is 8 GB with 4 virtual cores and an 80–160 GB disk. Game servers and 1C care more about single-core clock speed than about core count, while GitLab and CI, on the contrary, love parallelism. This is the size at which the difference between plans of the same spec first becomes really noticeable: the cheapest 8 GB plans are often sold on oversold nodes, where the memory is formally yours but the CPU and disk are shared with dozens of neighbours. The sign is a high steal in top while your own workload is idle.
Guaranteed memory versus burst
8 GB OpenVZ and LXC container plans are sometimes put together as 4 GB guaranteed plus 4 GB burst. For a set of websites that is tolerable; for 1C, a database or a game server it is not: they need memory that won't be taken away during the evening peak. For such tasks choose a KVM VPS, where the whole amount is allocated to the virtual machine. But even on KVM the host may use a balloon driver: check lsmod | grep virtio_balloon. The module itself is nothing to worry about, but if MemTotal shrinks over time, memory is being taken from the machine.
How to check the server after purchase
free -h: a MemTotal of about 7.7–7.8 GB is normal for KVM.stress-ng --vm 2 --vm-bytes 6G --timeout 120s: allocating the full amount should not lead to killed processes or a frozen SSH session.sysbench memory runmeasures memory speed. A result much lower than on other plans is a reason to suspect an overloaded node.- After a day of operation, look at
sar -ror your monitoring graphs: they show how much memory your services really use and whether it's time to trim the excess.