Server load high, web site slow - virtual server

Events happening in the community are now at Drupal community events on www.drupal.org.
benjamin_dk's picture

Hi Highperformance Group!

Our organisation started using Drupal about a year ago. We are experiencing very slow page loads on our website - often up to 1 min or more. The server load average correspondingly high - mostly around 4-5, some times up to 30-40 and even more.

We normally have around 5-10 registred users and the same amount of anonymous users online at the same time. We have around 6000 nodes. Devel module tells me that my pages normally generate around 500 quieries. I know we have at least one problematic page that hits the database with 8000 quieries. We use Views and Panels (deprecated version) quite a lot.

Reading about the number of visitors a Drupal site can serve if set up properly still leads me to think that something is very, very wrong... Maybe you can help me out?

Here is some data:

Drupal
version: 6.12
css and javascript optimized

Installed contributed modules: around 100

Server (virtual server)

Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13
RAM: 2 GB

PHP version 5.2.0-8+etch13
php_memory limit: 128 mb

MySQL version 5.0.32

I have done a bit of research and have the following ideas for optimizing so far:

Drupal:
Installing db maintenance module + optimizing high-traffic tables (done)

Apache
Activate mod_deflate: http://nadeausoftware.com/articles/2007/03/speed_web_site_enabling_apach... (not done - will this give me higher cpu-load??)

MySQL
I have run the script mentioned on this page http://drupal.org/node/85768 and there are some suggestions about increasing table_cache (current table_cache hit rate is 1%) and a few other things. Should I follow these suggestions?

I guess you need some more specific info to be able to help me - I have ssh access to the server (+ mysql) but I'm not that experienced in handling servers, so I will need the precise commands...

form the my.cnf file:

key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
max_connections         = 200
#table_cache             = 64
#thread_concurrency     = 10

# Fine tuning - NG - 20090211
key_buffer              = 32M
table_cache = 256
tmp_table_size = 256M

#
# * Query Cache Configuration
#
query_cache_limit       = 1M
#query_cache_size        = 16M

# Fine tuning - NG 20090211
query_cache_size        = 32M

I have attached a print of

SHOW variables LIKE '%buffer%'
SHOW variables LIKE '%cache%'

that I saw requested in this thread: http://groups.drupal.org/node/33866
AttachmentSize
buffer_cache.gif9.27 KB

Comments

list of caching modules

shyamala's picture

What are the caching mechanisims that you are using? For a list of caching modules, refer: http://groups.drupal.org/node/21897,
http://drupal.org/node/326504

Install Devel, understand the queries on the different pages of your website and obtimise them to fine tune MYSQL load, Use Yslow to understand the HTTP requests and optimisation in CSS, JS and other parameters which will furthur enhance the speed of your website.

i think you are using too

gdtechindia's picture

i think you are using too many modules.
And, are you using Boost module for anonymous users ?

Thanks for the links - very

benjamin_dk's picture

Thanks for the links - very informative stuff. I am considering installing Authcache and Cache Router - but I am in doubt how it will affect our site.

A very important part of the site is our forums, that are used both by anonymous and registered users. If a user posts a new thread or comment, the posts must be immediately visible to the poster and the rest of the community. Is it possible to attain this with the modules mentioned above?

Issue seems to be fixed

benjamin_dk's picture

Just to close this, we found out, that the main culprit was some non-drupal-software running on the server. We still experience peaks in server load once in a while, but I don't think its an issue related to many users online at the same time.

my virtual drupal site is loading very slow

sekhar.anup's picture

Hi benjamin_dk,

Can you please be more specific about the non-drupal-software that took your site down as I too am facing the same problem. I tried all possible ways to improve the site's performance but could not trace out where the issue is. Also installed many caching modules but could not improve the performance. Also optimized the css & other scripts.

Thank you and awaiting your reply.

  • Sekhar.

Hi Sekhar, we had some

benjamin_dk's picture

Hi Sekhar,
we had some proprietary chat-software that was taking a lot of the resources on the server. But actually we have stumbled across a few Drupal-issues that gave us some troubles performancewise since then - xml-sitemap-module release 6.x-1.1 was one of them. A lot of impatient 5th grade students posting in the same thread simultaneously was another - here we ended up adding a "wait - sending"-functionality to the "send" button so you can't send a form multiple times. Hope this can help you out a bit.

Re:

sekhar.anup's picture

Thanks for the response!

Are there any possibilities for a virtual hosting server to take the site down out of server loads..? As the same installation with same modules and db with a dedicated server is running fine. Can a virtual hosting affect the site's performance?

  • Sekhar.

You're asking if a site will

Garrett Albright's picture

You're asking if a site will perform more poorly on a virtual server compared to a dedicated one? Sure it can; on a virtual server, you usually have fewer resources than on a dedicated server, and sometimes you may be put on a server with unfriendly neighbors who try to hog resources. But if you have a smallish site and you find yourself with more resources than you can practically use on a dedicated server, you may be able to save money by using a virtual server instead, without noticing too much of a slow-down on your site. As I've posted, I've been able to get pretty good performance out of a big-ish multi-site installation even on a cheap VPS account.

ok, thank you for your

sekhar.anup's picture

ok, thank you for your response!

One common problem with

dalin's picture

One common problem with virtualized servers is that the disk storage is also virtualized. This can be a very significant bottleneck:
http://www.advomatic.com/blogs/aaron-welch/cloud-hosting-drupal-and-you

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

However a VPS on a proper

jcisio's picture

However a VPS on a proper server (RAID 10 and 20-30 VPS on that) is considered having better disk I/O performance, more stable and more secure than a cheap dedicated, at the same price. The only problem is that you can't have 2 GB or 4 GB of RAM on a VPS, but it's possible with a cheap dedicated.

VPS doesn't mean NAS.

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: