Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am going to develop a simple system of Perl CGI scripts which do email sending, file storage, and simple HTML user interface. The data should be stored in a MySQL database, HTTP is served with Apache.

As it is a typical server-side software system, I ask the question: How much RAM such a typical system needs?

I ask this because we are considering to order a Linux VPS. For example, on CoolHandle hosting VPS memory starts from 512MB. Is it enough for such simple CGI scripts?

share|improve this question
OS? number of users the site will serve? – Cold T Jun 20 '12 at 13:27
Linux, probably only 1 user (admin) – porton Jun 20 '12 at 13:27
if you are only running simple queries, not having a massive user load on the site, 512MB is more then enough – Cold T Jun 20 '12 at 13:30
@ColdT - if MySQL is also on the same system, would 512 MB still be enough? – mfinni Jun 20 '12 at 13:34
Again simple queries (and non-intensive queries) you would get away with on 512MB, but you are also right in saying there is no such thing as "typical server-side system". Only real way to be sure is to benchmark the workload and go from that. – Cold T Jun 20 '12 at 13:50
up vote 1 down vote accepted

256MB machine is good enough to host virualmin, with perl, email. To save memory its good to run it like fast-cgi, so can have 1 fast-cgi processor at the time so it makes around 25-50 requests per second, plus one mailbox with antivirus with on-demand spam checking. Fast-cgi runs from a separate context which can be protected with selinux. You can use another account (vhost) to host e.g. your sensitive data, under 64MB Perl process (e.g. without image upload). 256MB ram is more than enough. You might need also some extra RAM for cache, like 32MB.

share|improve this answer
While 512Mb should be enough, a HUGE amount depends on the workload. Badly written perl could double that memory requirement even for a single user. You should up the spec if you want to process more than about 100 emails / day. As for the MySQL.....that could have very large requirements. A bit of tuning can have massive impact on size and performance though. – symcbean Jun 20 '12 at 14:31
It's good to run small RAM for development so you dont have memory leaks or it doesnt work at all ;-) – Andrew Smith Jun 21 '12 at 7:16

There's no such thing as "typical server-side software system", especially if you're developing it yourself. Benchmark it under load and figure it out yourself - that's all you can do for this. For commercial software, the vendor may have sizing/scaling recommendations, but that's not the situation you find yourself in. VPS are cheap - start small with your intended host, benchmark it, and go up if you need to. Benchmarking isn't a one-time thing, either - if your userbase grows, you're going to need to be monitoring to determine when you need to grow anyway.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.