VPS Config Generator for MySQL, PostgreSQL, sysctl & PHP-FPM

VPS Config Generator — MySQL, PostgreSQL, sysctl, PHP-FPM & Redis Tuning
VPS Tools · Free Generator

VPS Config Generator for MySQL, PostgreSQL, sysctl & PHP-FPM

Most install-guide defaults assume the smallest possible server. This tool calculates production-ready starting values for MySQL/MariaDB, PostgreSQL, the Linux kernel, PHP-FPM, and Redis based on the RAM and CPU cores your VPS actually has — not generic numbers from a tutorial written for a 1 GB droplet. Pick a workload, set your specs, and copy the output straight into your server.


          

        

How these numbers are calculated

The buffer pool and shared_buffers figures follow the same sizing logic covered in our RAM guide: a dedicated database server should commit the majority of memory to its own buffer cache, while a server running a database alongside a web stack needs to leave more headroom for the OS kernel‘s page cache and other processes. PHP-FPM’s pm.max_children is capped by two independent constraints — available memory divided by average process size, and a rough multiple of your CPU cores — because a worker pool that’s memory-safe but exceeds what your vCPUs can actually schedule concurrently won’t improve throughput, it’ll just queue. vm.swappiness and the dirty-page ratios are tuned lower for database workloads, where unpredictable swap activity is far more costly than a slightly more aggressive page cache eviction policy.

Sysctl tuning only applies if you control your own kernel parameters, which is the case on KVM, Xen, and VMware ESXi VPS plans. On OpenVZ, kernel-level parameters are set by the host and generally aren’t configurable from inside your container — check with your provider before assuming the sysctl tab applies to your plan.

Frequently asked questions

Should I trust these numbers for a production database?

These are sound starting points based on widely used sizing heuristics, not a substitute for monitoring. Apply them, then watch real metrics — buffer pool hit rate, swap activity, connection saturation — and adjust from there. Always test configuration changes on a staging environment before touching production.

Why does PHP-FPM’s worker count depend on CPU cores and not just RAM?

A memory-only calculation can suggest more workers than your CPU can actually run concurrently without excessive context switching. Capping pm.max_children against vCPU count keeps the pool sized to what your server can realistically schedule, not just what fits in memory.

What swap size should I use on a high-RAM VPS?

Above roughly 8 GB of RAM, a fixed 4 GB swap file is generally enough as an emergency buffer — sizing swap 1:1 with RAM stops making sense once RAM gets large. Even on fast NVMe drives, swap is still dramatically slower than RAM, so treat it as a safety net rather than a way to extend memory.

Does this tool work for OpenVZ VPS plans?

The MySQL, PostgreSQL, PHP-FPM, and Redis tabs apply regardless of hypervisor. The sysctl tab assumes you can set kernel parameters yourself, which usually isn’t true on OpenVZ — those settings are typically controlled at the host level instead.

Figures generated by this tool are starting points based on common production sizing conventions, not a guarantee for every workload. For background on how VPS memory and CPU allocation actually works under the hood, see our guides on RAM, dedicated vCPU, and hypervisors.