Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin 

Post new topic Reply to topic
Author Message
PostPosted: Mon Nov 01, 2010 4:40 pm 
Offline
Senior Newbie

Joined: Mon Nov 01, 2010 4:30 pm
Posts: 6
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?


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 5:30 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 937
Location: Netherlands
andydufreyne wrote:
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 wrote:
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.

_________________
/ Peter


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 5:50 pm 
Online
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 641
andydufreyne wrote:
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


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 6:13 pm 
Offline
Senior Newbie

Joined: Mon Nov 01, 2010 4:30 pm
Posts: 6
thanks all for such quick reply!

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

pclissold wrote:
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 ?


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 7:26 pm 
Offline
Linode Staff

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 212
andydufreyne wrote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 01, 2010 7:27 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 360
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.

_________________
rsk, providing useless advice on the Internet since 2005.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 5:57 am 
Offline
Junior Member

Joined: Wed Apr 28, 2010 10:33 pm
Posts: 41
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).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 10:10 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1628
Location: Montreal, QC
AceStar wrote:
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?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 11:42 am 
Offline
Senior Member

Joined: Wed Oct 20, 2010 12:35 pm
Posts: 95
Location: United Kingdom
I run a Magento site on a 512 using FastCGI and nginx and that is much more memory intensive than Drupal.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 12:21 pm 
Offline
Senior Newbie

Joined: Mon Oct 04, 2010 5:28 pm
Posts: 8
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 8:14 pm 
Offline
Junior Member

Joined: Wed Apr 28, 2010 10:33 pm
Posts: 41
Guspaz wrote:

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 ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 9:19 pm 
Online
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 641
AceStar wrote:
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 02, 2010 9:37 pm 
Offline
Junior Member

Joined: Wed Apr 28, 2010 10:33 pm
Posts: 41
db3l wrote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 03, 2010 7:10 am 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS
Powered by phpBB® Forum Software © phpBB Group

Home | Manager | Contact Us | Jobs | Terms of Service | Privacy Policy | ™ © 2003-2012 Linode, LLC. All rights reserved.