1

I have a drupal 7 website on a VPS server with the following specifications:

Processor Name: Intel(R) Xeon(R) CPU E31270 @ 3.40GHz

Processor Speed (MHz): 3392.294

Total Memory: 3924628 kB

Free Memory: 276096 kB

Total Swap Memory: 4063228 kB

Free Swap Memory: 3894104 kB

Apache 2.2.29: Running

DirectAdmin 1.47.0: Running

Exim 4.84: Running

MySQL 5.5.31: Running

Named 9.8.2rc1: Running

ProFTPd 1.3.5: Running

sshd: Running

dovecot 2.2.16: Running

Php 5.3.29: Installed

With one GB of ram, I thought that the slowness of my website might be because of the heaviness of tables. (Number of tables: 381, DB size: 60 MB) But by searching the net, I found that my DB is not that heavy. I also noticed that in my services, the memory usage of httpd is 650 MB. I think this also might have something to do with slowness of my website. Can anybody help me with this issue? Thanks.

0

Isn't it closer to 4Gb RAM based on your posted stats? A server with only 1Gb RAM will most likely not work properly with a full application stack. Apache and MySQL require memory to be performant. The least I'd recommend based on personal experience is 2Gb RAM.

What you can also do is perform traces on your site with xhprof to see what the slowest items are, and improve those. APC and memcache can also help to boost speed. Or if you only have anonymous users, using the boost module can be a very quick fix, although it's not maintained actively anymore for Drupal 6 it seems.

8
  • Thanks daften. Actually the service provider told me that my plan has 1 GB of guaranteed ram. but statistics shows something else. I installed memcache on my server using putty. Do you have a tutorial for this to be sure my installation was right?
    – allmassim
    Apr 4 '15 at 10:24
  • @allmassim You can install Memcache module (drupal.org/project/memcache). If Drupal and Memcache communicate well, you'll see the stats under Reports -> Memcache statistics.
    – take2
    Apr 4 '15 at 11:31
  • Like @take2 says, install instructions on how to link memcache with drupal are in the memcache module and that module will give you more information. Good luck!
    – daften
    Apr 4 '15 at 12:21
  • I can't comment below because my reputation is low. But if you already have RAM issues, installing nginx instead of apache won't really help, the footprint is a bit lower, but not that much. And installing another application alongside it won't help at all IMO. Varnish will also need RAM to function.
    – daften
    Apr 4 '15 at 12:23
  • @daften You're right that Varnish needs additional RAM, but it also saves a lot of RAM by sending most of the users to Varnish instead of Drupal (Drupal would consume way more ram if it has to generate new pages). When I had VPS and ran into memory issues, Varnish gave me some time before dedicated become only option. It all depends on the type of traffice. If e. g. 100 pages generate 60-70% of pageviews, Varnish should be very useful even on servers that are low on memory.
    – take2
    Apr 4 '15 at 12:33
0

You're most likely running into RAM issues. Your host should be able to tell you more.

Switching to Nginx instead of Apache is usually a good solution. If your site isn't too big, Varnish could also be useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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