How to optimize a Drupal 6.x site with 100,000+ nodes and 100+ content types

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

I currently work on a Drupal 6.x site that has over 100,000 nodes and over 100 content types. Some content types have 45 or 50 fields. The developers who built the site originally wrote a custom module to display taxonomy pages for each content type. It's a directory listing site and the owner frequently adds new content types for different kinds of businesses, so the list keeps growing. Eventually, the developers started creating a new module for each new content type when the original module started getting big. Each individual module is fairly small, but I wonder if there might be a better way to do it.

Right now, the site is quick enough for most purposes, but it really bogs down when I add new fields to content types. It can take as long as 4 minutes for each field, so a new content type could take 3 or 4 hours just to add fields. Sometimes the server just crashes altogether.

I was advised on another post to run the site through a profiler to detect bottlenecks. That's beyond my skill level at this point. My options are to hire someone to do that and maybe do some re-writing of custom modules and/or upgrade to 7.x. We actually have an incomplete development version of 7.x that needs a bit of work. I just wonder what could be done to restructure the site, whether or not we really need so many content types, and if so, will it slow the site down significantly.

Please let me know any thoughts.

Comments

I don't know your requirement

jdidelet's picture

I don't know your requirement but seems a "little" bit crazy to have 100 content types. Can you first reduce this? No matter what Drupal version, you'll have probably this problem if you keep this number of content types.


Julien Didelet
Founder
Weblaa.com

Install Apc & Memcache

naveenvalecha's picture

Hi

I think first you need to decrease the number of content types and custom modules.
Please take a look at some of the performance tips for drupal sites.
http://www.valechatech.co.in/2013/10/drupal-site-performance-tips.html
http://www.creativebloq.com/web-design/drupal-performance-tips-9122837

Could you please share which web server are you using and also do you have VPS .if you have all your anonymous users then share how many visits do you have ? I think this may help to give you some useful information in respect to your hardware.

Ps : if you have any further questions then just give shout here .

Thanks

There is no saving this site.

Garrett Albright's picture

There is no saving this site. Rebuild the site with a less asinine data structure, migrate the existing data, then destroy the existing site and never speak of it again.

Don't hold back here! Tell us

mherchel's picture

Don't hold back here! Tell us what you really think :)

Insane!

kbahey's picture

100,000 nodes is not unusual.

But having 100 content types, each with 45 fields is just insane!

You may try to add the memcache module and configure it in settings.php, and use entity cache, but even if that bought you some time, it is not a permanent solution.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Thanks for the responses.

eeyorr's picture

Thanks for the responses. It's a dedicated server with 35,000 page views per day.

I was afraid it would need to be rebuilt. So if we get someone to rebuild, what would be the best way to avoid all those content types? Maybe use a vocabulary for different business types? The fields that are used are details like phone #, business description, etc. They vary depending on the type of business. Any ideas on how to reduce the number of fields?

Why do the fields vary? What

Garrett Albright's picture

Why do the fields vary? What really needs to vary about them? Just the appearance, or is there really some reason a phone number field for a dog walker needs to be stored and structured differently than a phone number field for a dentist?

There are a lot of fields

eeyorr's picture

There are a lot of fields like phone # that are shared, but there are also a lot of fields that are unique to only 1 content type. A lot of content gets created by anonymous users. If there were only a few content types, the owner wouldn't want all fields visible for every business profile added. So I guess maybe there could be conditional fields, but it seems like the list of fields per content type could be huge.

Why are there fields that are

Garrett Albright's picture

Why are there fields that are unique to only one type? What sorts of fields?

They're all text fields. Some

eeyorr's picture

They're all text fields. Some profiles might have an "ages served" field or "degrees offered" for schools. They're all different in some way.

looking not good

naveenvalecha's picture

Hi

I think kbahey is right 1,00,000 nodes are not so more but 100+content types looks not good to me also.
yes you can use vocabularies to categorize your contents.

Also try to reduce the number of custom modules.

Also It does not matter you have your site in drupal 6 or drupal 7.

Could you share also the detail regarding your dedicated server ?

if you need developers for this job then look at the service providers here https://drupal.org/drupal-services

Ps : if you have any further questions then just give shout here.We are here for the help.
Thanks

Reduce the content type an custom module to minimum

Sadi's picture

100,000 nodes are not a problem, even in shared hosting. 100+ content type and a custom module per content type is really insane. I would suggest to rebuilt the site. From my experience, that type of site takes too long to optimise compared to rebuilt with proper data structure.

If multiple content type has too many common field, then the content types are not built properly.

Hi, As you mentioned that you

sagar ramgade's picture

Hi,

As you mentioned that you are already working on upgrading your site to drupal 7. A real quick you might do on your current site is get rid of the modules which you are using for small requirements (or unwanted modules which are adding to your page load). Also look at removing or disabling themes which you are not using. You should monitor your server load using top command if really your server is being hogged or just site taking too long to load even if you have enough free ram and cpu.
For drupal 7 site you might reduce the number of content types to just one and use vocabulary (if you know what more you can getting using it) or select list (just for categorization). The best way in my opinion is to use a custom module to define your content types using hook_node_info and fields using hook_form. You should be familiar with form, node, query related hooks and APIs in order to achieve this. Also importing of those nodes in a new one wouldn't a big problem for you. You might also upgrade to pressflow 7 if you want to get varnish, memcached and apc.

Need Drupal help?
Reach Me

Share your Posts, Url, Sites
www.sociopost.com

High performance

Group notifications

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