Going to leave Drupal

Hi ppl, i have been an ardent fan of Drupal till now, so much so that i got some custom modules developed for my sites since i was planning to stick with Drupal for all my development needs. But i am facing problems when it comes to resources. I had to shift from my earlier hosting company because they said, my sites were too much of a load for the servers and were driving upto 95% of the CPU at all times. I've shifted to site5 servers as i saw somebody recommending them over here. But here also i'm facing similar problems.

Here are the modules being used on one of the sites which am planning to get redone in PHP/MySQL:

Blog
Story
Pathauto
path
organic groups(og)
print
email
nodevote
emailpage
forum
frontpage
moviereview
poll
recipe
taxonomy
taxonomy block
upload
similar

here is the site. www.livepunjab.com Please get back with suggestions if there are any. There are couple of other sites also which run drupal, but this one needs to be taken care off immediately.

regards,

Sham

Performance issues/heavy server load caused by Drupal

asb - March 6, 2006 - 12:46

Hi Sham,

I am experiencing similar problems on a dedicated host. Since drupal.org is *very* fast and pretty reliable, it seems definitively to be possible to make it run really fast. However, this seems to require a big iron server farm which is beyond the (financial) scope for most of us.

What you can try is to castrate your Drupal installation by removing performance hungry modules one by one. According to my experiences so far, from your list, the usual suspects are "pathauto", "path", "taxonomy", and "taxonomy block" (some others of them I don't know, like "similar", and "organic groups"; you might have to check them also).

Other CPU intense stuff seems to be everything which makes heavy use of database queries, e.g. "Who is online" and "Recent postings"; those blocks can be disabled completely or at least disabled on most of the pages. Doing so accelerated the page loading times of my Drupal installation for about 1 sec.

Implementing a cache or even a proy might be another option, but requires additional hardware resources again which you might not have.

Regards,
-asb

without some i can't do

netceo - March 6, 2006 - 12:54

Hi, as you might have seen with the site, i cannot do without taxonomy. Pathauto and path are also indispensible due to client requirements on this site although i have disabled them on couple of my other sites now which has reduced the page load time considerably.

i have put up the site at a freelancer forum to be re-done in PHP/MySQL which seems to be the ultimate solution. But i'm so used to Drupal and its features now that i do not want to go out of it.

Thanks for suggestions.
NetCEO

Hsoting Companies

jacauc - March 6, 2006 - 12:56

If you decide to change hosting companies, consider Bluehost: http://www.bluehost.com/track/dieinte1/df

I have recently switched to Bluehost, and I cannot say how professional they are and that for a really low price of $6 a month or so.

They offer 10Gb of hosting space,
250Gb of traffic, and everything else you might ever need!

Check it out!
jacauc

Avoid Bluehost if you want a busy dynamic site.

phoebe - March 6, 2006 - 17:05

We are in the process of moving away from Bluehost because they recently, without warning, introduced a CPU limit on their shared servers.

If any process on your system uses more than 20% of the CPU resources at any one time, your users will get a big red screen of death that takes at least five minutes to clear.

A simple, small php blog with a few spam hits -- not a lot -- was enough to shut down our site over and over. Loading 20 photos to a Gallery 1 installation was enough to set it off. We had endless trouble for no apparent reason, but were continually told that it was our system using too many resources.

There was absolutely no way I was going to try to run a serious Drupal installation with them.

Phoebe
--
Visit The Town
meet ~ discuss ~ connect
www.the-town.org

thanks buddy

netceo - March 6, 2006 - 17:44

hi there, thanks for sharing this hard earned info buddy.. we're all out here to do what we want, and get bogged down by such limitations from our end(Drupal) or the resources we can afford(hosting)... so all in all i think i cannot afford to have a portal that i admire and run it without problems until or unless i am closer in radius of 2 kms of Santa Clara,

NetCEO

Hosting Companies

ZoneV - March 8, 2006 - 15:20

For most hosting applications, hosting space and traffic are irrelevant; hosting companies know this and offer you plenty of both.

I read (right here on this forum) that CPU is more critical when it comes to hosting Drupal sites.

space and bandwith is like the current megapixel wars on digital cameras; there are other equally -if not more- important aspects that also need to be considered.

ZoneV

Try what's mentioned in this thread as well:

celticess - March 8, 2006 - 21:15

http://drupal.org/node/29786

My 4.6 was slowish and it bugged me. I nearly went off drupal because it did bug me so much. But once setting the mem to 20M it ran smooth and fine. Which was a bit odd as my hosting has no limits but I guess internally it has some default somewhere that puts it fairly low unless you add the line they mention to add.

DOH! Edited to fix a link error that was a different post that I meant

Out of curiosity what

nathandigriz - March 6, 2006 - 13:02

Out of curiosity what version of Drupal are you running?

I'm using 4.6

netceo - March 6, 2006 - 13:04

I'm using 4.6 sir

NetCEO

pathauto on 4.6 is resource intensive

robertDouglass - March 6, 2006 - 13:08

It is not pathauto's fault... it is an underlying flaw in the design of paths in 4.6 and has been fixed for 4.7. That is one suggestion.

You could also try the split patch.
http://drupal.org/node/34694

- Robert Douglass

-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress

This patch did wonders on my sites

laura s - March 8, 2006 - 02:02

http://drupal.org/node/43712 (I think that's it)

This modifies a couple of inc files to change how path aliases are processed.

I would look more at Robert's suggestion, too. I've not tried this.

Laura
_____ ____ ___ __ _ _
pingVision, LLCBlogHerrare patternscattered sunshine

aha!

celticess - March 8, 2006 - 02:09

I wondered what they'd all done to make 4.7 seem faster. To get 4.6 to the same speed as I got testing out the 4.7 I had to follow the instructions here:

http://drupal.org/node/40013

Other performance improvements as well

robertDouglass - March 8, 2006 - 09:40

That's not the only improvement. There are actually dozens of performance improvements that have made it into 4.7. I second the motion that the paths fix gets applied to the 4.6 branch.

- Robert Douglass

-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress

whoops wrong link

celticess - March 8, 2006 - 22:48

Caching?

Brian@brianpucc... - March 6, 2006 - 13:11

Do you have caching enabled? Is it possible to ask your hosts to tune their server. Take note that according to the LAMP performance study, PHP is CPU bound. They might want to focus on that.

Caching is on

netceo - March 6, 2006 - 13:44

Hi, caching is already working on the site.

Here is the mail from Site5 ppl:

I am seeing processes owned by your user running, specifically PHP. They do appear to be causing some load abuse. If your web access was disabled, that is likely the cause. Please review your account to ensure that everything is in order. Thank you.

NetCEO

Site5 lost their way

jasonwhat - March 6, 2006 - 15:59

I'm with Site5 also. After a long search I switched due to the promise of their "RapidReflex" feature that was supposed to move busy sites to dedicated servers if there was a problem. However, Site5 discontinued this service without informing clients except for a posting on their forum which I don't read religiously. So I was surprised when they shut down all my sites, even the non drupal ones with no warning and no explanation after the fact. It took a few hours and many support tickets for them to give me any kind of access that allowed me to do anything. I disabled a bunch of modules, but the biggest problem seemed to be cache, as I cleared that and optimized some tables things were much better.


The weird thing in all this is that I hadn't made any recent changes and didn't have much traffic on my site, so it seems that Site5 has just grown quickly and is overloading servers exasperating performance problems in Drupal.


It does seem that Drupal with some modules that many of us consider vital is pretty resource heavy. I was impressed with Drupal because it has some of the best load stats of all major CMSes, but I've never experienced that myself.

Hi Sham,

venkat-rk - March 6, 2006 - 13:27

Hi Sham,

I am also on Site5 and haven't had cause for complaint, although mine is not such a busy site as yours.

There is a patch to the pathauto problem that definitely seems worth trying. You really shouldn't be leaving drupal just because of that:
http://drupal.org/node/43712

Go through the following tips about stuff that increases server load. Try the devel and sanity modules for what they are worth before you take the decision to quit:
http://www.claws-and-paws.com/node/887

Thanks Ramdak

netceo - March 6, 2006 - 13:32

Thanks a lot, i am going to try this thing. Only problem is i do not have any experience in applying patches. Will you be kind enough to guide me on this? and another thing you've mentioned in the thread is patches included with comment no, 17 and 23.. which one should be used?

Thanks again..

Sham

Hi Sham,

venkat-rk - March 6, 2006 - 13:40

Hi Sham,

Assuming that the patch will apply cleanly on cygwin on my PC, I may be able to give you the patched module as soon as insomoz clarifies which patch he applied.

P.S: I think you didn't close a <strong> tag in one of your posts, so all the posts are appearing in bold.

Thankyou so much!

netceo - March 6, 2006 - 13:46

Thanks a ton buddy, and yes i closed the strong tag :)

just out of curiousity, is it that i can install cygwin on my own system and patch the files and then upload the files to the server?

NetCEO

Yes, it is worth taking the

venkat-rk - March 6, 2006 - 14:31

Yes, it is worth taking the trouble to install cygwin. There is a handbook page that makes it really easy.

You can patch the files locally and then upload to your server. Of course, you always need to backup your database before doing this, as I am sure you know.

Here it is..

netceo - March 6, 2006 - 14:33

As per asb, he applied this patch and saw tremendous improvement

http://drupal.org/node/43712#comment-65128

Can you please do this favor to me? Use this and give me the patched files?

NetCEO

Comment #10? I thought it

venkat-rk - March 6, 2006 - 14:40

Comment #10? I thought it was Matt's patch everyone was talking about. Are you sure this is the one you want?

Also, one question to asb if you are in touch with him. Is this a single patch file or multiple patch files? The command for patching will vary accordingly, as you would have read in the handbook page.

Ya

netceo - March 6, 2006 - 14:44

Hi, i read his comment as the last ones on that page. The patch is for updates.inc so single file.

I am trying to install cygwin too, but it would be great if you can do this patch for me.

I am going through the handbook too :)

NetCEO

Sigh :(

venkat-rk - March 6, 2006 - 15:30

For some reason, the patch fails. Here is the message for anyone who can troubleshoot this:

Hunk #1 FAILED at 332.
Hunk #2 FAILED at 349.
Hunk #3 FAILED at 573.
3 out of 3 hunks FAILED -- saving rejects to file pathauto.module.rej
can't find file to patch at input line 114
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- includes/common.inc.orig   2006-01-09 17:09:40.000000000 -0500
|+++ includes/common.inc        2006-01-10 19:47:26.000000000 -0500
--------------------------

Send me your version of pathauto.module using my contact form and I will try again.

Patch

Roberto Gerola - March 6, 2006 - 15:47

patch -p0 -u < patch.4.6.5_0.patch

Thanks for that tip. Minor

venkat-rk - March 6, 2006 - 17:04

Thanks for that tip. Minor correction- it should be path.4.6.5_0.patch.

Doesn't work, though. For some reason, the patch doesn't seem to be able to find updates.inc to patch it. It seems to patch bootstrap.inc and common.inc

Sham, I think you will be better off simply downloading Marandb's zip file with the *patched* files and uploading them to your drupal install. Just to be sure, download those three files to your pc before uploading the patched files, so if anything goes wrong, you can at least revert to your original install. This implements the patch in #23, though.

and i thot

netceo - March 6, 2006 - 16:39

i thot i was doing something wrong, since doing it for the first time... am gettting same messages

NetCEO

Patched tarball

Roberto Gerola - March 6, 2006 - 17:01

I have applied the patch http://drupal.org/node/43712#comment-67783
on a fresh 4.6.5 directory.

You can download the tarball here :
http://www.speedtech-it.com/drupal-4.6.5-patched.tgz

That is nice of you:-)

venkat-rk - March 6, 2006 - 17:07

That is nice of you:-)

But, would you actually recommend overwriting the existing drupal files with this tarball? Wouldn't it cause problems on a site that already has lots of uploaded files and images?

Backup !

Roberto Gerola - March 8, 2006 - 07:50

Make before a backup of your directory.

Don't overwrite everything but only the files with the date of today, under misc, includes, database, modules.

There is two patch available. I have used the Matt's patch that is a backport of the patch for 4.7.
Let me know if you prefer the patch of Jeremy : http://drupal.org/node/43712#comment-65128

Try the patch!

asb - March 6, 2006 - 14:28

Hi netceo,

you definitively should try the patch from http://drupal.org/node/43712, it reduced page loading times on my installation from 16-20 secs to 1-2 secs; also, it reduced CPU strain significantly!

Applying patches is pretty simple, you just need root access to the server, download the patch and use the "patch" command. If you don't have root access, you'll have to download a drupal packages on your local PC an run "patch" there; it will show you, which files were edited, and after this you can upload them manually to your webserver (by FTP or whatever you are using).

Greetings, -asb

I had just posted this link above

laura s - March 8, 2006 - 02:05

And now I see it here already!

Yes, the patch is great.

I ran into shell prompts for corrected file paths because the patch was looking at cvs paths. But as I entered the correct paths, the patch was applied successfully. Big improvements!

If 4.6 is ever un-frozen, I hope this gets incorporated into the next tarball.

Laura
_____ ____ ___ __ _ _
pingVision, LLCBlogHerrare patternscattered sunshine

php-accelerator

Jax - March 6, 2006 - 14:08

Anyone has some experience with php-accelerator and drupal and cares to enlighten me about the results?

http://www.php-accelerator.co.uk/

Nope not tried it to know

celticess - March 12, 2006 - 19:59

Read however this thread:

http://drupal.org/node/29786 (doh edited to fix this link)

Following the comment on the line that needs to be inserted in the index.php I sped up the response time of drupal quite a bit.

Hosting

dmuth - March 6, 2006 - 22:23

Since other people are mentioning hosting companies, I'll throw in my two cents. I've had hosting through http://www.nearlyfreespeech.net/. They've been very cool about working with me when my Drupal installation first got out of control and actually went so far as to help me troubleshoot the problem by providing my with date/time stamps and URLs that caused issues. I think they went above and beyond the normal amount of service.

As far as running Drupal goes, if your installation gets out of hand, they don't turn off your server for that. Instead, they have a special "penalty box" that they will put your webserver into so that it won't suck up all available CPU time while you debug the problem.

-- Doug

--
Douglas Muth, Philadelphia, PA
http://www.claws-and-paws.com/

Thankyou so much!

netceo - March 7, 2006 - 14:08

Thankyou so much everyone. You tried your best to help me out.

Special thanks to Ramdak, and Nevets who actually mailed in to help me and offered to correct the things.

Since in this particular site, am expecting the traffic to grow manifold and i really can't take chances with it right now, i have decided to get it custom coded. There are few more sites which are running Drupal right now, and they may also need to be sorted out in near future.

So i am going to keep following Drupal, and may get back into it one day when i have my own Datacenter :). I have become a fan of Drupal, so much so that i was all set up to attend the Drupal Summit in Vancouver which just passed by, couldn't do it due to some reasons... Well reasons being i quit my day job and am fully into internet biz... i didn't want to spend that money on the trip which was much needed to set my office.

Thankyou all again, who have helped me learn Drupal in last few months, i owe you all a lot. I am going to start working on learning php now :)

Sham

Sham,

venkat-rk - March 7, 2006 - 15:06

Sham,

Best of luck with your new venture, although I must admit I am really perplexed by your decision as there are innumerable huge sites running on drupal.

But, it's your own decision and I am sure you have reasons for it.

Exactly

jasonwhat - March 7, 2006 - 15:28

Like Air America radio for one. It's hard to imagine that the time and/or money it would take to custom code a drupal equivalent is less than the effort it would take to optimize drupal for one's own needs. From everything I've read, it is almost always a better solution to work on improving existing software than create your own.

:)

netceo - March 7, 2006 - 23:19

Hi Ramdak, even i have some sites(custom scripts) with good amount of traffic, and comparitively Drupal sites are much better in terms of features but gave me more problems in terms of hosting and performance too.. Lets hope i can correct the rest of them. I need to upgrade one of the sites from 4.6.2.1 to 4.6.5. Got any idea how should i do it?

NetCEO

cough - handbook

sepeck - March 7, 2006 - 23:49

http://drupal.org/node/41534 :)

Um, I would upgrade sooner then later. 4.6.2 has a gaping security bug. Please also sign up for the http://drupal.org/security newsletter soon too. You can also click, 'my account', edit and then choose it under 'my newsletters'.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

Hi Sham,

venkat-rk - March 8, 2006 - 01:38

Hi Sham,

If you aren't committed to recreating the stuff, please try Jeremy's patch. Let me be a little blunt here- surely livepunjab.com can't be more busy than kerneltrap.org which Jeremy runs?

Try out the handbook page for upgrading that sepeck referred. If you are setting up your own business, IMHO you shouldn't be wasting money on custom CMS development when you have such a well tested and proven framework as Drupal- that would really be money down the drain.

Edit:

1.) When you are upgrading, make sure you pay special attention to backing up the 'files' folder. All your uploaded images and attachments will be here. If you simply overwrite all the drupal install files, you will lose these.

2.) IMHO, one good way to handle your upgrade and performance patching would be to create a drupal install in a subdirectory of your site (say, livepunjab.com/backup), copy over the database tables from your live site to the database of this install and also copy over the entire file structure of your live site to this backup site.

Then, do the upgrade using the instructions in the handbook page and see how it goes. When you are through with this, apply the pathauto patches, see how things are and if you are satisfied, repeat the same process for your live site.

I never had that problem

celticess - March 8, 2006 - 02:05

I used dreamhost in the earlier incarnation of my site and also in the new(but my own hosting rather than my ex's this time).

Modules I used in the earlier incarnation of my site were:

Amazon items
Atom
Bad Behavior
Blog Theme
Browscap
Buddylist
Chatbox
CitizenSpeak
Codefilter
Comic
Contextlinks
Currency Exchange
Download Counter
Paypal Framework
Paypal Tip Jar
Feedback
Filemanager
Filestore2
Flexinode
FSCache
Guestbook
HTML corrector
Image
image_import
Img_assist
IndexPage
Menu on-the-fly
One of the review modules
node privacy byrole
Pathauto
Poormanscron
Privatemsg
Quote
Quotes
Recipe
Scheduler
Site map
Syndication
Theme Editor
Themedev
TinyMCE WYSIWYG Editor
troll
Urlfilter
VIM Color
Voting
Wishlist Module
Wordfilter

As you can see by my list I had far far more than what you are using. I did have some site slowness sure. But someone had mentioned a fix to that by inserting a single line in the index.php to set memory limit.

The admins at dreamhost had no problem with my sites (yes had one for my son too that also utilized the front page module). I'm sure if they had they would of spoke up. I did tell them I was installing drupal and considering it tossed me a numeric when I tried to prefix one one of my emails with drupal I'd say there is at least one other drupal user on their system.

Dreamhost for $137cdn/yr($119USD) gets me the crazy domain sale. I'm not using the domain that came with it though I already had one. I get 1TB of bandwidth, 75 user accounts, 3000 emails, unlimited subdomains, seems there is no memory limit(when getting info from the server it reports none), 20G of diskspace, ssh/ftp/telnet, jabber, front page extensions(*shudder*), PHP4/5, cgi, it claims mysql 4.1 but a drupal mod said it was 5.0.1, one click installs on several things(tried the joomla did like the admin interface sort of but liked drupal far more), etc. The admins there are quite nice and the servers run debian.

Thanks

netceo - March 8, 2006 - 05:48

Hi, thanks for this info. I have mailed the guys at dreamhost, and will surely try them out.

NetCEO

Hi, did something..

netceo - March 8, 2006 - 11:43

hi guys,

I have done a fresh install of 4.6.5 and restored the content manually into it, restoring the tables of the database manually, and have installed the minimum of modules.

here is the new site: www.livepunjab.com
here is the old one: www.livepunjab.com/lp-old

there are no images on the old site, :) didn't copy.

You may be able to appreciate the difference in performance of the two.

Ok, there has to be some problem :) ok i may have missed out on restoring a few of the tables or must have done something wrong.. am not able to add new content now.. here is the errror i am getting:

user error: Duplicate entry '4' for key 1
query: INSERT INTO node (status, moderate, promote, sticky, comment, title, uid, created, type, teaser, body, changed, nid) VALUES('1', '0', '1', '0', '2', 'First Case of Bird Flu in Poland', '89', '1141817786', 'flexinode-4', '<div class=\"flexinode-body flexinode-4\"><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\r\n    <tr>\r\n      <td colspan=\"2\"><div style=\"float:left\"><div class=\"flexinode-image-15\"><div class=\"form-item\">\n \n</div>\n</div></div><div><div class=\"flexinode-textarea-13\"><div class=\"form-item\">\n <p>There has been no respite from the deadly H5N1 virus. The latest reports confirm that two swans were found dead in northern Poland in /home/livepunj/public_html/includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by (output started at /home/livepunj/public_html/includes/common.inc:383) in /home/livepunj/public_html/includes/common.inc on line 191.

I'm sure you'd be able to point where the prob is...

Pls help..

NetCEO

done!

netceo - March 8, 2006 - 11:57

Hi, i corrected it...

sequences table was not copied :)

NetCEO

Great to see you got it

venkat-rk - March 8, 2006 - 12:53

Great to see you got it going again. I guess this means you decided to stick with drupal?

Curious to know if you installed the patches for the path problems (and which patch you used) and which modules you left out? Did you have to sacrifice a lot of features to get your site back up in terms of performance?

Yes i installed patches...

netceo - March 8, 2006 - 13:20

Hi buddy, i did install the patches, and that too on my own system before uploading the site to the server.

I left out following things right now

Organic Groups
Private Message(Although wasn't being used but was installed, in terms of tables)
While working with the database i realised how big the search index was, so i am not using drupal search, using google search box now, saving on resources, and may be make some money too..
movie review
recipe
google site map
poormancron
buddylist
taxonomy block
similar
i had installed ecommerce also once upon a time, wasn't using now.. So total no. of tables have come to ard 66 from 113 in the database.

I have already paid advance money for the script development, so that will take place, will use it for some other project in case LP works fine now :)

NetCEO

Hi, can you give me the url?

netceo - March 10, 2006 - 06:26

Hi buddy, thanks for the tips. I would like to see your site. Can you please give the url?
NetCEO

mine?

celticess - March 12, 2006 - 20:01

Due to the long thread trying to guess which that was in reply to.

Mine is http://www.celticess.net

I'm still adding content to it however.

cant you turn on the cache

pb8 - March 11, 2006 - 12:50

Test turn on the cache:
http://yoursite/?q=admin/settings
http://yoursite/?q=admin/help/system#cache

Me myself extended the timer, to a benshmark, but then again, i can't get the benshmarks values if i cache. And I don't know how it will work with other dynamic contents (maybe it's something the cron handle if its smart).

Caching is on

netceo - March 11, 2006 - 13:08

Cashing is on.
NetCEO

then its a lame provider problem

pb8 - March 11, 2006 - 17:20

(no bather)

Can't believe this isn't mentioned yet

franks2 - April 20, 2006 - 00:13

First though, you really should check what ad-plans you're accepting on your host. Your site looks really nice and shiny..., but suddenly though it popped up a new window urging me to install something "to protect me". Ads are a nice way of income, but getting a new browser-window popping up with a fake Windows-dialog asking me wether I want to be "protected" by installing some software I have no clue what is, seems way overboard.. For your sake I hope you are reviewing those ads..

Before even contemplating to employ custom code, which will really become expensive, you should understand the limitations of Drupal. Is it really a limitation of Drupal, or is it a performance-bug which can be fixed? The answer to this question can be the difference of a simple fix, and lots of headache managing your own code (which you will be doing with Drupal anyways when you customize it). My guess is that custom code will need extensive work in order to beat Drupal with Turck mmcache or equivalent (you're using some php-accellerator right?) and caching (Drupal caching, Apache mod_gzip/deflate and maybe even Apache cache/memcache). Tweaking the existing Drupal codebase will provably give you much more for the effort, and be easier to maintain to boot.

When optimizing and performance tweaking your site, the "Devel" module will help ALOT. It can be setup to give you ALL sql's on each page-request, which might give you a good grasp of what is going on. There's also some memory-stats, although a good host with good settings shouldn't give any problems on memory.

In my case, the locale module was spamming mysql due to failing to grab what's in the cache, thereby raising mysql to 99-100% CPU-time by querying mysql for every locale-string.. Ouch! Fixing the cache-mechanism for locale fixed that for me.

Here's an example from my test-site running 4.6.6, cached front-page:
Executed 217 queries in 55.99 microseconds. Queries taking longer than 5 ms, and queries executed more than once, are highlighted. Page execution time was 504.14 ms.

Without i18n I'm doing 30-50 milliseconds for mysql, 200-300 ms for page execution (I don't believe for a millisecond it's microseconds as the Devel tries to impress you ;-), and about 100-150 queries for cached pages. This is possible for me while having almost 100 active modules (all the good ones ;)! So performance-tuning can really shave off the cruft and will be cheaper than reinventing the whole wheel, even without dropping modules. You just need to spot the problem-spots and fix them. Mind you, I'm on my own server (AMD 2400+ 1GB memory), so I have all the leeway I need to fix all aspects.

I'm using pathauto-fix, lots of memory for php, but the site is still small and I've yet to make nodes with pathauto so that shouldn't be the fixer.. However, with 8 installed languages I had expected the site to be slower than it is, so I'm surprised at how slow i18n is initially AND how it scales...

You or your host should see the mysql-optimizations that is on Drupal.org. There's some pages that gives a few tips on how to configure mysql. The default config is NOT okay, and will not go a long way either. Even for testing/development I noticed vast improvements tweaking mysql (basically by raising all memory and cache options. The howto's will tell you what options are worthy of consideration.)

What I have done is going through every optimization-procedure that I can: Apache, mysql, php.ini, Turck-mmcache, the whole works, while also reviewing and tweaking what's going on inside Drupal. There are many pages about all of this on Drupal.org.

There's a few tweaks I did for Drupal itself too, for instance using an internal request cache for caching the user-object during the page-request, caching for pathauto (it was also spamming mysql - not submitted as patch yet) and other things I've forgotten now. Some of it is already sent in as a patch, or will be when I'm done with my sites. The problem is that I really have no idea what really fixed the slowness. I suspect fixing locale.module-cache-bug and caching pathauto fixed the worst for me, however, it seems I can add as many modules as I want without performance penalties now.. ;-) I went from 2-3 second load to 0.5-1.5 second load (1.5 effectively). How it will go under real stress I don't know yet though but I'm very positive.

locale and i18n seems very resource-hungry, so if you can do without them, do so. og also seems like a beast, but it's hard to judge the worst modules. Try to activate/deactivate the modules while using Devel, this might give you a good clue how much each module contributes in lost time and added queries. In my experience, there's only a few ones that are worth considering for removal, and those are probably due to performance-bugs.

Also try to see where the worst problems lie. There's probably one- or two performance-bugs killing your site, and nothing to do with drupal as a whole. You shouldn't need to disable too many modules once you have spotted the trouble-spots.

When looking at drupal's code (seems you have to learn php anyways dude! ;), try to see using Devel if the cache is being used in an ok fashion, and no module is spamming mysql with inane amounts of queries.

My main point is: Don't throw away drupal before you've figured out why it's not working, and try to fix that instead. There's nothing there that can't be fixed, since it's all free software :-)

Good luck and Namaste!

My current modules (some will go away, others will be added in time, like ecommerce and donate):

abslinkfilter (custom filter for making absolute href-links, will be sent in as patch in a while)
acidfree
aggregator2
aggregator2_logo
archive
attachment
automember
block
blog
blogapi
bookmarks
buddylist
captcha
chatbox
comment
contact
devel
diff
email_obfuscator (own custom filter for obfuscating email-addresses with javascript, will be sent in as patch when done testing it)
email_verify
event
eventfinder
fckeditor
feedback
filemanager
filestore2
filter
flexinode
forms_api_backport
forum
forward
fscache
help
hof
htmltidy
i18n
i18nblocks
i18nmenu
im
image
image_import
img_assist
import_export
invite
locale
location
logintoboggan
members
menu
menu_otf
mimemail
nice_menus
nmoderation
node
nodevote
nodewords
og
og_block
og_forum
page
path
path_access
pathauto
pdfview
poll
print
profile
profile_pages
protect_critical_uids
queue
quote
quotes
remindme
rsvp
scheduler
search
send
sidecontent
signup
sitemenu
statistics
story
subscription
superteaser
survey
system
taxonomy
taxonomy_dhtml
taxonomy_menu
taxonomy_multi_edit
taxonomy_switch
tinymce
trackback
user
user_badges
user_status
userpoints
userposts
views
watchdog
webform
workspace
xtracker
zippy_images

104 modules... Ehh, a bit more than I thought, but it proves the amount of modules is immaterial. At least when using Turck mmcache. I very much believe in performance-tuning to discover excactly *WHAT* is going slow..

I'm not thoroughly impressed with the image-modules though, so maybe they will go away.. Fckeditor has a good integrated browser for images, although I would like thumbnails..

The only problems with this many modules is that I have probably made fixes to *HALF* of these modules - even multiple fixes for a quarter of them. This is good for the drupal community, when they get submitted, but all my efforts are spent fixing other people's bugs. Although, for what I'm getting with all this, I'm happy anyways =)

nice tuning tips

smokey - May 4, 2006 - 05:31

franks2,

Thanks for the nice write-up on tuning drupal and the underlying services. This info will come in handy over the next month as I'm preparing to launch my drupal site.

on drupal vs. custom php/mysql

I'm actually in the process of moving away from custom php/mysql site to drupal. The hand-coded solution had become a maintainence nightmare. Adding features (eg. a new "block") or layout was a real pain. I'm hoping drupal will help my site grow faster... by allowing me to work on content instead of staring at code all day!

On hosting

I was on a dreamhost shared hosting plan, and noticed that drupal was extremely slow. The custom site was also slow. I chalked it up to being on the shared plan. Personally, I think the DH mysql servers were overloaded... but no access to those stats, so it's just a guess.

I've since decided to share space on a server a sysadmin friend is running. My hosting cost will go up from $15/month to $40, but I'm hoping the combination of a local mysql server + no load from other sites on this box + access to personal sysadmin (for tuning apache/mysql/php) will be worth the extra hosting costs.

I decided to go with my friend's box over a big hosting provider (eg. DH's dedicated hosting plans) because I can't afford $100/month hosting costs.

Just for my own curiousity: has anyone found a good sub-$100 dedicated server hosting provider?

smokey

PS: I'm talking about a drupal 4.6.6 installation.

I can only recommend

jacauc - May 4, 2006 - 06:49

I can only recommend Bluehost on this. They are wonderful! (they're not Dedicated though)
haven't had a single day's problems.
15Gb of space and 400Gb of transfer @$6.95 per month, with full out-the-box Drupal support and Fantastico scripts.

Check out http://www.dieinter.net/bluehost_is_great

yet again...

netceo - May 8, 2006 - 05:45

Hi ppl.. i am back again.. the site worked fine for almost 2 months before i am in a similar problem again.

Here is the issue as reported by site5 support team:

Top Process %CPU 49.0 [php]
Top Process %CPU 45.0 [php]
Top Process %CPU 41.0 /usr/bin/php index.php

Average Persistent CPU Usage over 24 hours: 14.23%

Can somebody guide me on what could have gone wrong now? since the site was working perfectly all right before this thing came up..

NetCEO

VPS?

brashquido - May 8, 2006 - 06:24

Sounds like your site has just outgrown what a shared hosting service can offer. To me customising Drupal code as a non coder would not be the wisest move, and would in the long run cause you a lot of grief and cost a lot of money to have it maintiained. If you need total control of your server environment to be able to tweak Apache,PHP and MySQL settings, then why not look at VPS hosting? You might be using shared hardware resources still, but you have full and total control of your hosting environment and will be able to tweak it to get a lot more performance from it that a shared hosting environemnt. You can get some very attractive Linux based VPS plans for under $25 a month now, and from the sounds of things I'd say this is your next best step.

----------------
Dominic Ryan
www.it-hq.org

Thanks a lot...

netceo - May 8, 2006 - 07:23

Hi Dominic, thanks a lot for your observation.. What bothers me is that the site has been performing exceptionally well when i had huge traffic in last months,(huge here means to a tune of 10000 uniques in a day), but its creating problem now when the traffic is only 10% of that.. i have truncated, sessions, cache and watchdog tables fromt the database, as i see nothing else which could have changed in addition to nodes, which have been added. This i did on my gut feeling and no technical logiq, so lets see. I have asked the hosting company to let me know if it changes anything...

thanks again,

I don't have that kind of

nathandigriz - May 9, 2006 - 14:19

I don't have that kind of traffic but every new school term we have to make sure to re-index all the database tables. The first few weeks always tear the db apart. This is on MSSQL but the same might apply to others.

Ah! Site5;-)

venkat-rk - May 8, 2006 - 17:30

This isn't meant as a snide aside, but Site5 has a reputation for changing things unbeknownst to the customers. Possibly, something like this has affected your site.

I would second brashquido's suggestion to look for VPS. And, as long as you are with Site5 (or should that be any hosting company?), be paranoid and take at least six-hour backups of both your database and drupal install files. This way, you won't be left high and dry if Site5 pulls the plug on your site for whatever reason.

Bluehost

wdrupal - May 13, 2006 - 01:22

I have managed a few Bluehost accounts. They are not good for Drupal becuase there is often a PHP session ID problem. You can fix it by editing your php.ini file, but that's another step that shouldn't be necessary. Also, Bluehost claim that you get 5 or 6 sites on one server, but the server creates subdomains for each domain and not truly separate sites. (For example, your sites will also be visible at domain2.domain1.com and domain3.domain1.com.)

www.Site5.com hosting actually gives you separate sites, but I'm not sure how they handle high traffic dynamic sites yet. I'm running a few low-traffic Drupal sites there with no problems.

Also, people are posting affiliate links in these forums and making $65 per referral. How can hosting advice be trusted when the person giving advice is profiting from it? If you are going to post affiliate links, at least write something like [affiliate link] after it so that it is not decieving.

My apologies for posting an

jacauc - May 14, 2006 - 07:28

My apologies for posting an affiliate link.
Thing is, I AM REALLY happy with bluehost. (otherwise I wouldn't be an affiliate) That is why I try to spread the word about them.

Secondly, yes, I had PHPSESSID problems but that was fixed in a heartbeat by adding:

session.use_only_cookies = On
session.use_trans_sid = 0
to my php.ini file.

and finally, the addon domains for bluehost are just subdomains.
If you look at two of my domains: dieinter.net (primary) and grannygear.co.za (addon)
http://grannygear.dieinter.net - redirects to http://www.grannygear.co.za
http://www.grannygear.co.za - works like it should
http://www.dieinter.net - works like it should

So, in effect, no one even knows (or should know) about the subdomain's existance.
...not completely seperated, but does it really matter?

Duplicate content

wdrupal - May 17, 2006 - 19:03

Whether the search engines will penalize for duplicate content is debatable, but I don't want to risk it. Also, it doesn't look good for business-oriented sites to have one site be a subdomain of another. It is not hidden once it gets spidered and indexed. I have several Bluehost accounts, but can't put more than one site on some of them.

By posting links to both your subdomain and your real domain you have just given the search engines directions to spider your subdomain. To stop them from visiting the subdomain, you might want to consider immediately adding a script at the top of your index.php of your subdomain to send a 404 error for any request for a URL with the subdomain string in it. It might prevent a search engine headache...

Also, Bluehost claim that

venkat-rk - May 14, 2006 - 14:00

Also, Bluehost claim that you get 5 or 6 sites on one server, but the server creates subdomains for each domain and not truly separate sites. (For example, your sites will also be visible at domain2.domain1.com and domain3.domain1.com.)

Thanks for sharing this. That's a big, big letdown. Site5 lets you host *both* multiple domains (different numbers for different plans) and any number of free sub-domains on one domain.

Site 5

wdrupal - May 17, 2006 - 19:06

I'm happy with Site5 except that they don't have phone support. Everything else is great.

I disagree

jasonwhat - May 18, 2006 - 00:16

as I mentioned here, http://drupal.org/node/52656#comment-99389

And do you see their flashback service in your control panel? They advertise it like crazy but I still don't see it.

Fix for local module cache problem

willi.firulais - June 21, 2006 - 19:06

Thx for this hints. Would you like to share you local cache fix?

I have build up a drupal that is realy slow. Have done now some investigations with devel modul and seen that the local is as slow as you have written. Because it's not an english site i have to use the local module but do not have the skills to fix your mentioned problem with the local module.

Thx, regards willi

not quite sure!

netceo - June 24, 2006 - 10:27

not quite sure, but whenever i face site slowing down problem i go to myphpadmin and empty my cache table.. it seems to solve the problem, although the root cause is untraced and remains as it is...NetCEO

Clearing Cache

willi.firulais - June 27, 2006 - 21:01

Hallo,

Cleared all the cache* tables. Works now a bit faster, but the main performance problem remains.

* After clearing cache* tables:
"Executed 88 queries in 1350.62 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 4493.13 ms."

* After calling the same page the thired time:
"Executed 88 queries in 1341.19 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 7077.64 ms."

Some hints, ideas, experiences?
Thx, Willi

Have you looked at your mysql configuration?

laura s - June 28, 2006 - 02:42

Simple things like query cache can make a difference on query performance. But be sure to read up on it, as settings like this can affect your available RAM usage. Still, for many if not most setups the query cache is turned off by default.

Laura
_____ ____ ___ __ _ _
design, snap, blog

configuring MySQL

Jax - June 30, 2006 - 14:12

You should also make sure that MySQL is optimally configured. It makes quite a difference.

References:
some page: http://www.linuxforums.org/servers/setting_up_a_server.html
mysql docs: http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Server_parameter...

Basically you should tweak the following settings (in order):
key_buffer :: Ideally should be >= than the sum of the sizes of the .MYI. That way the server can keep all the indexes in memory.
table_cache :: Increase if MySQL needs to open/close table often, more info on MySQL site
query_cache_size
query_cache_limit
join_buffer_size

hth
Olivier.

 
 

Drupal is a registered trademark of Dries Buytaert.