61

Caching, caching, and caching. Some suggestions I have previously given to a similar question on d.o. Putting Varnish or another reverse-proxy in front of your http-deamon is probably the single best thing you can do. During DrupalCon Copehagen, Rasmus stated that using a php opcode cache, such as APC, is one of the best things you can do to speed up PHP ...


60

Strictly speaking, this doesn't answer the question you are asking. I'm hoping it's helpful anyway. Apache/Nginx/Lighttpd/other web server. Does it matter which one I choose? In short, No. The much much longer answer: If, and only if, you have a very large percentage of your users being logged in, should you care at all about the performance of your web ...


43

The README has a guide on how to do this using current 7.x-2.31+ version of AdvAgg. Also see this wiki page on the High performance group. Most sites can achieve a perfect 100/100 score on https://developers.google.com/speed/pagespeed/insights/. Directions on how to achieve it for a fresh of install of AdvAgg below. Be sure to check the site after every ...


32

OK, although this question is already answered, I'm necromancing once more, primarily because I don't like the implications of these answers that it doesn't make a difference, and because as a web developer, I hate caching with a passion. The difference between Apache and nginx is not that much "how fast they can serve a request" but how many requests they ...


28

I have begun running Drupal 7 on PHP 5.4 myself with only minor problems in the form of notices and warnings. On top of 7.12, you will need these two patches to fix the issues causing PHP to complain: http://drupal.org/files/menu-link-save-1338282-15-d7.patch http://drupal.org/files/database-query-clone-1414412-11-d7_0.patch One of these patches has ...


27

No, there is no reliable comparison, because doing that is almost impossible. There are various reasons for that, one is that D8 vanilla is like D7 vanilla + a whole bunch of modules, especially views. If you compare a single request on a vanilla installation, then D8 is clearly slower than D7 (even if you add views), quite a bit actually. That might still ...


26

These are notes from my experiences and might vary from what others experience. I predominantly use LAMP stack and have considered the same in my suggestions. Thumb rules for caching that I generally follow. Process Once Use Multiple Times. Live with stale data when possible Clear Caches infrequently and keep it very specific. When possible do the changes ...


24

The amount of data in a field usually isn't a problem. If you're worried about that, look into alternative field storage plugins or write your own. For example MongoDB, which can deal with pretty much anything you put into it. It is for example used on http://examiner.com. A real problem however is the number of fields you have. Because currently in Drupal ...


23

These are notes from my experiences and might vary from what others experience. I predominantly use LAMP stack and have considered the same in my suggestions. Thumb rules for caching that I generally follow. Process Once Use Multiple Times. Live with stale data when possible Clear Caches infrequently and keep it very specific. When possible do the changes ...


23

There are two other ways other users have mentioned for setting the max output levels in addition to the settings.php method mentioned in the question, plus a couple other ideas below: Create a /modules/contrib/devel/kint/kint/config.php file and add / modify the line $_kintSettings['maxLevels'] = 3; (by @mdrummond on Slack) In a preprocess function, add ...


19

When you uninstall a module, you need to disable it first in Drupal module admin. You should then uninstall it via the "Uninstall" tab there. The same goes for themes, disable in theme admin first. If you for example, delete the module folder on the file system without disabling the module, Drupal will continue to search for the module in the file system, ...


17

Boost module is also quite useful, it creates static file caches from your webpages. It's mostly for websites with lots of Anonymous user traffic. Boost provides static page caching for Drupal enabling a very significant performance and scalability boost for sites that receive mostly anonymous traffic. For shared hosting this is your best option in terms ...


16

There are three things that I would check. One, if you are on a production site and not editing PHP files, then you should ensure that APC is enabled, has enough memory, and has a long TTL (you could go with a day or never expire if you wanted). You can also consider setting apc.stat=0. The APC docs have all of the information you need for setting the TTL....


16

I switch from Apache to Nginx / PHP-FPM a few month ago. I made some benchmarck with a drupal website, and test several use case. On a VPS server with 1 CPU and 512 Mo RAM Drupal with only cache Nginx ab -n 100 -c 30 xxx Server Software: nginx Document Path: / Document Length: 24902 bytes Concurrency Level: 30 Time taken for ...


16

Read and follow this post; it assumes InnoDB. In particular, see the part saying to add the following to the settings.php file. $databases['default']['default']['init_commands'] = array('isolation' => "SET SESSION tx_isolation='READ-COMMITTED'");


14

It sounds like you're affected by a known issue in Drupal 7. Most probably, you are hitting Avoid re-scanning module directory when multiple modules are missing. It happens if you have some missing modules in your installation. Try to check your system table: SELECT name, filename FROM system WHERE type = 'module' AND status = 1 ORDER BY filename ...


14

The Devel module has a query log option, which when enabled will show every query that's been run for a request at the footer of the page. You can enable it at admin/config/development/devel once the module's installed.


13

I totaly agree with berdir. Here are my experiences with a project with millions of rows and 30-40 fields on some node types. The number of rows in a field table isn't a big problem for the read performance, as all fields are fetched by primary key. The number of fields per node type can quickly grow into big performance problems when writing new nodes. ...


13

Drupal 7 incorporated in its modules the code that were in Poormanscron, whose purpose is exactly to run Drupal cron tasks on a site where it is not possible to set cron tasks, when a user visits your site, and every X hours (as set in the page you saw). If you want to avoid that behavior, you just need to set "Run cron every" to "Never"; contrary to what ...


13

After much research, here is what has helped our hit ratio and memcached usage: Upgraded memcached to 1.4.10 (the latest version with performance improvements) Enabled binary format and compression Use the default for bins Our memcached conf in settings.php looks something like this now: $conf['memcache_bins'] = array('cache' => 'default'); $conf['...


13

In many respects the Paragraphs module appears to be a fork of Field Collection. Functionally, the difference between the modules lies in how their respective field widgets operate. The Field Collection widget allows users to embed multiple instances of a single field collection bundle in a node, while Paragraphs allows users to select a different bundle for ...


12

For D7, there's Core Library which has a learning mode that aggregates based on real-world statistics about your site. If you want to brute-force everything into one giant aggregate, I've written an article with some sample code: /** * Implements hook_js_alter(). */ function mymodule_js_alter(&$javascript) { uasort($javascript, 'drupal_sort_css_js')...


12

PHP is a shared nothing architecture. That has its advantages and disadvantages. One disadvantage is that it's not easy to do something like this. There isn't much of a state that can be stored somewhere. I did some quick tests and when logged in, then the boostrap seems to take about ~17% of the total time and more than 50% of that is actually loading all ...


12

Having multiple webservers behind a load balancer/reverse proxy is quite common for Drupal and well supported. Varnish is typically used in the Linux world because that thing is just insanely fast when being able to actually use it, meaning anonymous visitors. Which is obviously not the case for your site. Sessions are stored in the database by default, so ...


12

The short answer: field_get_items() is more performant than entity_metadata_wrapper(). Check out the code for these functions: field_get_items() entity_metadata_wrapper() Both require that you pass along the entity, which has already been loaded from the database. For example: $node = node_load(123); $items = field_get_items('node', $node, '...


10

Aggregated CSS and JS files in Drupal 7 are split up into groups, so you'll naturally get more files than you're used to seeing in Drupal 6. I won't go in to the whole thing as there's already an excellent article out there that explains it in good detail. D7 uses a new strategy to address this - aggregates are split into three groups: CSS_SYSTEM, ...


10

Whenever I edit a node all my page caches are cleared. As per the design : This behavior is intended behavior and works as per the design. If you look at the node_form_submit() node submit handler function within the node module you will notice that there is a cache_clear_all() As the comment in the line above the function call reads it clears the page and ...


10

Personally, I do not like the way Drupal handles output compression; I take care of this outside of Drupal. On the Drupal site, I add $conf['page_compression'] = FALSE; $conf['css_gzip_compression'] = FALSE; $conf['js_gzip_compression'] = FALSE; to settings.php, and this to a custom module to show that this is disabled: /** * Implements ...


10

If you know the name of the view that you want to clear, then you can clear the caches specific to that view by calling a function like the following: /** * Function to invalidate selected views caches to enable the action forms to work */ function mymodule_invalidate_views_cache($view_name) { cache_clear_all('ctools_export:views_view:' . $view_name, '...


Only top voted, non community-wiki answers of a minimum length are eligible