Is Linode 512 enough for me?

Hello, dear community.

Currently I have a Drupal+MySQL running website with ~5k unique visitors per day. It's a software catalog (no disk activity), but users download software :) And traffic usage is about 150 GB.

1. Is Linode 512 enough for me?

2. Will I have SFTP access to my site and VNC gui access to ubuntu?

13 Replies

@andydufreyne:

1. Is Linode 512 enough for me?
Yes, but you will need to configure MySQL (and Apache, if you use it) to suit the limited amount of memory you have available.

@andydufreyne:

2. Will I have SFTP access to my site and VNC gui access to ubuntu?
SFTP is available on all distros (it's part of SSH). VNC is up to you to install.

@andydufreyne:

2. Will I have SFTP access to my site and VNC gui access to ubuntu?
Note that I wouldn't really suggest trying to have a GUI on your server. It's certainly possible but in general it'll just burn a lot of resources unnecessarily.

– David

thanks all for such quick reply!

> Note that I wouldn't really suggest trying to have a GUI on your server Yes, it's reasonable.

@pclissold:

Yes, but you will need to configure MySQL (and Apache, if you use it) to suit the limited amount of memory you have available.

:?: Does it mean that if I have virtually 512, i have to configure (for example) apache to use 200MB and MySQL to use 150MB ?

@andydufreyne:

Does it mean that if I have virtually 512, i have to configure (for example) apache to use 200MB and MySQL to use 150MB ?

Sort of.

Essentially, both programs have a config file (For Debian, /etc/mysql/my.cnf and /etc/apache2/apache2.conf) which contain a plethora of options designed to control resource usage. There's no single "RAM=200mb" option, but by setting a reasonable level for the options in the config files, you can tune down the memory usage.

More like to "not use more than 350 even under heavy load, and preferably less when idle".

For apache-prefork, you want to keep number of processes quite low. I think

MinSpareServers 2

MaxSpareServers 5

ServerLimit 20

MaxClients 20

would be reasonable.

For apache-worker I am happy with

StartServers 2

MaxClients 350

MinSpareThreads 25

MaxSpareThreads 75

ThreadsPerChild 25

ThreadStackSize 2097152

  • not saying it's the best, just that it works quite good for me.

*cue fans shout "Apache sucks, switch to nginx!" in 3…2…1… *

For mysql there's a lot said in Linode Library, and other places… and I'm not quite fluent enough to help. I have my keybuffers and caches cut down to relatively small size, but depending on how your apps use the DB, it might kill performance in your case.

I've seen Drupal use up over 120MB of memory per process, and often averaging over 60MB. It depends on what modules you have installed, but a typical Drupal installation that actually does what you want tends to have a lot, and a lot of the usual ones can be memory hungry. It's also pretty slow which tends to mean processes hang around a bit.

I have to administer a Drupal site with not much more traffic than that, and the server has 4GB RAM which barely seems to be enough - we have the MaxClients set at 40 at the moment.

Hopefully your experience is not the same as this! A basic install of Drupal really shouldn't do that and I think this Drupal install is just pathalogical in some way (web designers installed every module they could find or something).

@AceStar:

I've seen Drupal use up over 120MB of memory per process, and often averaging over 60MB. It depends on what modules you have installed, but a typical Drupal installation that actually does what you want tends to have a lot, and a lot of the usual ones can be memory hungry. It's also pretty slow which tends to mean processes hang around a bit.

I have to administer a Drupal site with not much more traffic than that, and the server has 4GB RAM which barely seems to be enough - we have the MaxClients set at 40 at the moment.

Hopefully your experience is not the same as this! A basic install of Drupal really shouldn't do that and I think this Drupal install is just pathalogical in some way (web designers installed every module they could find or something).

Then you've misconfigured your server… 4GB is overkill to handle 5k uniques per day. I know little about drupal, but even if it causes your PHP processes to consume 120MB of RAM each, you shouldn't need more than what, a dozen PHP processes to handle that load? Less? How many drupal pageloads are you getting simultaneously?

I run a Magento site on a 512 using FastCGI and nginx and that is much more memory intensive than Drupal.

We run a Drupal install on a box with 256MB of RAM*, using apache and it runs fine. Every month for 3-4 days it gets a peak in traffic, which should be about 2k uniques per day, plus a ~3MB file download for each of those, also served via apache.

So yeah, 4GB for for 5k uniques per day sounds more than overkill to me.

*: Obviously not at Linode

@Guspaz:

Then you've misconfigured your server… 4GB is overkill to handle 5k uniques per day. I know little about drupal, but even if it causes your PHP processes to consume 120MB of RAM each, you shouldn't need more than what, a dozen PHP processes to handle that load? Less? How many drupal pageloads are you getting simultaneously?

It's a Drupal problem not a server config problem. That particular Drupal installation is a real beast, with massive memory consumption, and huge (>3 seconds) page load times.

It seems typical for the server to be handling 10 to 30 page page loads simultaneously (I've limited MaxClients to 30 for now due to the memory they consume).

Note that the site has spikes in traffic because much of its traffic comes from a weekly newsletter.

Another disclaimer: this is not my site, and the site is hosted with Linode's competitor. It's possible that their "slices" are just inferior to Linode's ;)

@AceStar:

It's a Drupal problem not a server config problem. That particular Drupal installation is a real beast, with massive memory consumption, and huge (>3 seconds) page load times.

It seems typical for the server to be handling 10 to 30 page page loads simultaneously (I've limited MaxClients to 30 for now due to the memory they consume).
One question is whether 30 is even too much. If an individual page load is taking 3 seconds, then the bottleneck might actually degrade if you let more than a few processes simultaneously execute. That is, if the bottleneck is, for example, in the database, more parallel queries could actually worsen things as the database fights to service them simultaneously.

If the bottleneck is purely CPU, then more processes are less likely to be an issue (as long as you don't swap), but it's also true that just leaving them in the socket queue isn't likely to be a negative either.

– David

@db3l:

One question is whether 30 is even too much. If an individual page load is taking 3 seconds, then the bottleneck might actually degrade if you let more than a few processes simultaneously execute. That is, if the bottleneck is, for example, in the database, more parallel queries could actually worsen things as the database fights to service them simultaneously.

If the bottleneck is purely CPU, then more processes are less likely to be an issue (as long as you don't swap), but it's also true that just leaving them in the socket queue isn't likely to be a negative either.

– David

Thanks David. I have a feeling the bottleneck is IO, and just general bad application behaviour, and not particularly database related. I suspect all the various "caching" modules in this Drupal installation are part of the problem. Anyway, leaving it at MaxClients of 30 is working out so far and I'm just monitoring the situation.

It's been a while since I stopped using Drupal. Back when I did (around version 4), it was a huge resource hog, with some modules doing up to 100 queries per request (sic!). There is also a "developer" module that shows resources used per request - memory, db queries and execution times (both w/ and w/o queries). Perhaps that will help you put your finger on the problem.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct