-3

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?

6
  • OS? number of users the site will serve?
    – Cold T
    Jun 20, 2012 at 13:27
  • Linux, probably only 1 user (admin)
    – porton
    Jun 20, 2012 at 13:27
  • 1
    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, 2012 at 13:30
  • @ColdT - if MySQL is also on the same system, would 512 MB still be enough?
    – mfinni
    Jun 20, 2012 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, 2012 at 13:50

2 Answers 2

1

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.

2
  • 1
    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, 2012 at 14:31
  • It's good to run small RAM for development so you dont have memory leaks or it doesnt work at all ;-) Jun 21, 2012 at 7:16
3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .