Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [performance]

Use it for questions about Drupal's performance, how to measure, and improve it.

91
votes
9answers
8k views

Do non-enabled modules affect performance?

Does having Drupal modules present, but not enabled have any effect on the performance of a Drupal site? To put it another way.. Would removing disabled modules from a Drupal site have a positive ...
69
votes
3answers
11k views

Given that db_select is much slower than db_query, why would I want to use it?

For the background on this, please see http://drupal.org/node/1067802. Given all that, what situations exists where I might want to use db_select(), or should I be relying solely on db_query?
54
votes
10answers
11k views

How do you improve Drupal performance?

Drupal is fast at develop, but the performance is so poor. It is hard to reach 50 request per second. And there are so many SQL queries in a simple web page. If you test the request time of a form ...
54
votes
9answers
4k views

Real world experience in scaling and tuning performance

The website I'm working is allegedly going to have a massive hit rate soon after launch. The client is talking about the possibility of around 2500 hits per second over a day or so. Ignoring the ...
45
votes
5answers
95k views

Nginx vs Apache - Are there any actual usage comparisons and statistcs out there?

I have a new server to play with, and I am staring at a blank canvas. I can put anything I want on it. While I am comfortable with Apache, I keep hearing how nginx can handle so much more traffic than ...
37
votes
16answers
16k views

Performance Problem: Delay on first request

I put together a D7 site with a Minelli subtheme. Along the way I experimented a lot with different themes, different modules. Somewhere along the way I developed an odd performance issue, and now I ...
34
votes
9answers
5k views

What's a good balance between reusing fields versus creating new ones in the context of fields scalability?

I've read the following phrase on a website: Instead of adding new fields to a content type, adding existing fields is a better option to reduce the system’s complexity and to improve scalability. ...
31
votes
2answers
13k views

PHP 5.4 and Drupal 7

I have heard that PHP 5.4 is faster than PHP 5.3. Would it be ok for Drupal 7 to run under 5.4, or various contributed modules may start to break the site? Anyway, If I use APC opcode cache, maybe 5....
30
votes
2answers
32k views

Eliminate render-blocking JavaScript and CSS in above-the-fold content

I am building a Drupal 7 site. These are some of the modules I use: Adaptivetheme (theme), Views and Content Panes, Panels, Mini panels, Panels everywhere, Page manager, Superfish for menus, Addthis, ...
30
votes
4answers
4k views

Memory-saving cache-clearing strategies for large sites?

One of my Drupal 7 sites has thousands of fields, a bunch of content types, more than 25 views, and hundreds (soon to be thousands) of profile types. Because of this, I'm using a core patch that ...
23
votes
3answers
3k views

Is it redundant to use the “boost” module if varnish is used?

We run our Drupal instances behind a Varnish server, but we're looking at alternative/additional ways to speed up the site. Boost is a module that is frequently named for this purpose; it appears to ...
22
votes
4answers
6k views

Best way to optimize for authenticated user performance?

The keyword here is authenticated! Currently (as far as I know) the de-facto ways to optimize for anonymous access are through static page caches (varnish/squid/boost). However, as far as I know ...
21
votes
4answers
5k views

How to get core to leverage a MySQL master/slave configuration?

I read this question MySQL master/slave replication not working and its answer: Using slave databases is barely implemented in Drupal core. If you are developing your own modules then calls to ...
18
votes
3answers
4k views

What's the fastest method/implementation for an Ajax callback?

I have a map which loads markers via ajax on various/numerous map events. Currently, I define a custom page callback for my hook_menu() item which prints my json/js. Since my page callback does not ...
17
votes
1answer
696 views

Drupal calling “is_dir” over 4000 times?

After having troubles on loading time of a very important Site I installed XHPROF and looked over the statistics to see where I can improve my code. I found something interesting that i don´t ...
17
votes
2answers
4k views

What all contributes to drupal page execution time?

I have a site I am investigating that has major performance issues, using memcache I was able to bring number of queries down both in number and total exectution time ( from 3 secs to 230 ms) but the ...
16
votes
3answers
28k views

Best APC settings to reduce page execution time

I have Drupal 7, apc with php-fpm and apache behind varnish and512 MB RAM. I measure page execution time with devel module. Database query time is low (62ms) compared to page execution time which is ...
15
votes
2answers
21k views

How to get rid of Deadlocks and Lock time out type issues?

I read multiple blogs, tried to google, it but didn't find any satisfaction from any solution. I have the following issues : PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found ...
14
votes
4answers
1k views

Does having more enabled modules make the site slower?

Does having more enabled modules make the site slower? I have installed 30 modules for my site, and I am afraid that it will become too slowly.
13
votes
6answers
7k views

How can I make kint() load faster when debugging twig templates?

I've seen quite a bit of discussion about how kint() from the Devel module is difficult to work with because it maxes out PHP memory limits and makes the browser drag. I've heard some thoughts on ...
13
votes
2answers
6k views

Drupal 7 and PageSpeed

The Apache module PageSpeed provides various optimizations for HTML, JavaScript and such, which is great. However, some of its features are redundant with Drupal's own aggregation and optimization ...
12
votes
2answers
12k views

How can I stop the cron tasks from being triggered by site visitors?

My site's logs show that cron is triggered if someone visits the website. This is slowing down the load time for the first visit. The cron is configured to run each 3 hours here: Administration » ...
12
votes
5answers
1k views

Monitoring strategies for infrastructure

Lately, I have been facing some downtime on some of the Drupal sites I have deployed. I would want to approach the problem pro-actively, rather than reacting to those downtimes by restarting services ...
12
votes
1answer
8k views

Using Memcache Effectively with Drupal 7 Multisite

I am setting a hit ratio of 55% on our memcache instance (v1.4.4) and am wondering what can be done to improve the hit ratio. We're in a multisite setup (30+ sites), with two load balanced web servers;...
12
votes
2answers
7k views

Using Drupal 7 with APC, Varnish and Memcache, what bins to put in which cache?

I'm optimizing a Drupal 7 website and I have varnish, memcache and APC all installed and working with their individual Drupal 7 modules. In my settings.php I have the $conf options below. My question ...
12
votes
1answer
1k views

Best way to benchmark Drupal stack performance

I recently asked a question regarding Drupal performance and got some great replies. This got me thinking, what is a reliable/meaningful way to benchmark Drupal? It's easy to say "install APC, ...
11
votes
4answers
10k views

Are there any performance comparisons?

Are there any reliable performance comparisons between vanilla Drupal 8 versus Drupal 7? I have searched the web but only find the post "Drupal 7 vs Drupal 8 Performance Comparison", which is far ...
11
votes
1answer
4k views

Field Collection vs. Paragraphs

I used Field Collection in my previous sites and I faced some performance issue, So this time I am looking a alternative for Field Collection. I find a answer Alternative to Field Collection. but I ...
11
votes
1answer
5k views

Which is more performant: entity_metadata_wrapper or field_get_items?

To get values from entities, there are two ways: Use field_get_items and get the value of a field Use entity_metadata_wrapper and get the value of a field Although entity_metadata_wrapper abstracts ...
11
votes
1answer
2k views

How does bandwidth optimization work?

I have optimized to combine all CSS and JavaScript files in my site. . If I run Yslow in Firefox to see the components loaded for this site, it shows that it loads 8 JavaScript files, and 8 CSS ...
10
votes
3answers
12k views

How Do I improve the performance of my Drupal7 Site? [closed]

For somebody who is new to Drupal, I see that there are many resources available on Drupal Caching but I am not sure which of them to use.
10
votes
5answers
10k views

Drupal database innodb or MyISAM?

I have a Drupal site, and I am suffering performance issues. I found How do I convert a database from MyISAM to InnoDB? indicating that performance may improve by switching. How can I tell if my ...
10
votes
4answers
4k views

file_scan_directory() takes about 10 seconds to execute

Using xhprof I noticed that file_scan_directory() takes more than 10 seconds to execute when front page loads. Why should it take such a long time? This is the output of xhprofile:
10
votes
3answers
4k views

Caching the Drupal bootstrap

I'm curious if anyone has made attempts to "cache" the bootstrap process in Drupal. Normally, Drupal will run the 7 bootstrap phases on each request, but perhaps on a deployed production system, one ...
10
votes
2answers
387 views

What tables should or could be migrated to InnoDB, and which should remain MyISAM?

As per title: Is there a quick list of candidates for tables to migrate to InnoDB? And what should remain MyISAM. Some additional information The site has a fairly heavy read-load, but inserts ...
10
votes
4answers
912 views

How to configure a server with 4g of memory to run drupal 7

I'm installing Drupal 7 on a new server with 4 GB of memory. I'd like to get some hints on how to configure it properly, how much memory to give to MySQL, and how much memory to give to PHP. One thing ...
10
votes
3answers
9k views

What is the best way to minify drupal's aggregated javascript (automatically)?

Have just run Google pagespeed over my newly created drupal 6 site, and it reports: Minifying the following JavaScript resources could reduce their size by 15.6KiB (12% reduction). Minifying ...
9
votes
2answers
8k views

Best CSS and JS aggregation/minification strategy for D7

Drupal 6 has the awesome advagg module, which does an awesome job of intelligently bundling CSS and JS, but currently no D7 release. What I am looking to achieve is: less CSS and JS files (5 CSS and ...
9
votes
3answers
2k views

Site performance , cache not working properly

I am using the Performance Logging Module. Above screenshot, one strange thing I noticed that Insert Cache_bootstrap on every page. When you go to any page (both admin theme and frontend theme) Insert ...
9
votes
3answers
5k views

How can I speed up drupal's node_save() function?

I am having a lot of trouble with the inefficiency of node_save(). But is node save my problem? That's ultimately what I am trying to find out. I created a loop with 100,000 iterations. I created ...
9
votes
3answers
7k views

Is it better to use module_invoke_all(), or module_invoke() and module_implements()?

Using module_invoke_all('some_hook') is easy, but is this better for performance? foreach (module_implements('some_hook') as $module) { $data = module_invoke($module, 'some_hook'); }
9
votes
1answer
1k views

Does leaving the Views UI module enabled affect performance?

I noticed that the "Disable Developer Modules" link in the Administration Menu module disabled the Views UI module. I'm under the impression that the purpose of disabling the developer modules is to ...
9
votes
3answers
3k views

How can I upload 1000s of nodes per hour to a live drupal 7 site and avoid deadlocks?

Not too long ago I wrote about deadlock here: PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; Despite everything my development team tries to do, we ...
8
votes
2answers
3k views

load balancing multiple horizontal drupal instances

I've developed a REST WebAPI using the Services module. It works fine. I have a client of that API with projected usage requiring I horizontally scale my Drupal instance. Note that due to the nature ...
8
votes
4answers
5k views

How do I avoid the error “out of memory”?

I'm currently working with Drupal 7, and I've the following modules installed, all updated to their respective last version: Views - 7.x-3.0-beta3 CTools - 7.x-1.0-alpha4 Panels - 7.x-3.0-alpha3 ...
8
votes
1answer
4k views

How and where would I be able to enable/disable gzip compression? [closed]

In Drupal 7 where would I be able to enable/disable gzip compression? Is there a module for this functionality?
8
votes
1answer
1k views

When should I create multiple Displays of a View instead of multiple Views?

Is it simply a matter of convenience to create multiple Displays of a View instead of multiple Views, or is there a performance benefit? Does having any of the following items present in some ...
8
votes
1answer
734 views

Where to render? Preprocess or template?

We are constantly improving our coding performance and we are monitoring every page load to optimize loading en rendering times in our websites. Above statement in mind, I stumbled upon the question ...
7
votes
2answers
9k views

What module will show me all sql queries being run on the loaded page? [closed]

My site is running slow and I suspect its a module, but not sure which one. Is there a module that can display all the sql queries being run on a loaded page? If there isn't maybe there is a command ...
7
votes
5answers
4k views

How can I invalidate a cache on a specific View?

I am facing a situation where I need to invalidate a specific View in order to initiate clearing the cache on that View. views_invalidate_cache() clears ALL cached Views data, for every View on the ...