Drupal performance optimization best practices include:
- Disabling unused modules and cron on production to reduce overhead
- Configuring caching at the application level with modules like Boost and Memcache
- Optimizing server configuration through APC caching, CDN integration, browser caching, and cron job configuration
- Improving database performance by optimizing InnoDB settings and enabling the query cache
The document provides best practices for optimizing Drupal performance at the application, server, and database levels to reduce bottlenecks and improve load times.
PHP comes pre-installed with all modules by default, which can lead to heavy processing. It is better to compile PHP from source and only install required modules. Lightweight web servers like Nginx with PHP-FPM are faster than Apache for static and dynamic content since PHP execution is native rather than module-based. Caching, a CDN, Memcache, and optimizing WordPress, MySQL, and plugins can improve performance. Security measures include restricting access, removing default accounts and files, strong file permissions, and installing security modules.
Web caching provides several benefits including bandwidth savings, reducing server load, and decreasing network latency. It works by intercepting HTTP requests and checking a local cache for the requested object before going to the origin server. Different caching approaches include proxy caching, reverse proxy caching, transparent proxy caching, and hierarchical caching. New techniques like adaptive caching and push caching aim to dynamically optimize cache placement near popular content or users.
Skalowalna architektura na przykładzie soccerway.com
This document discusses scalable web application architecture. It describes using load balancing and database replication across multiple servers to handle high traffic volumes. It emphasizes using caching at various levels (PHP, databases, CDNs) and preprocessing data to improve performance. A CDN is recommended for distributing static resources globally to reduce latency and failure risk.
Did you know that 80% to 90% of the user's page-load time comes from components outside the firewall? Optimizing performance on the front end (e.g. from the client side) can enhance the user experience by reducing the response times of your web pages and making them load and render much faster.
This document discusses web performance optimization and provides guidance on ensuring high performance web applications. It covers why performance is important, key performance metrics to measure, common areas to profile like client and server-side processing, requirements for performance testing like goals and load thresholds, and tools for performance testing and profiling like JMeter, dotTrace and SQL Server Profiler. The document also outlines best practices for integrating performance testing into the development workflow when issues are found or time allows before a release.
A brief overview of caching mechanisms in a web application. Taking a look at the different layers of caching and how to utilize them in a PHP code base. We also compare Redis and MemCached discussing their advantages and disadvantages.
The document discusses optimizing WordPress performance. It recommends minimizing frontend assets like images, implementing caching for assets and application chunks, optimizing themes and plugins, and choosing efficient server setups. Specific plugins like W3 Total Cache and a CDN can improve performance by up to 10 times by caching static content. Nginx is presented as a faster alternative to Apache. Overall, the key takeaways are to simplify code, minimize requests, optimize caching, and reduce payload sizes to improve perceived and actual performance.
The document discusses various techniques for optimizing web performance, ranging from beginner to advanced levels. At the beginner level, it recommends avoiding redirects, enabling client-side caching, and reducing DOM elements. At the medium level, it suggests minifying JavaScript and CSS. More advanced techniques include image compression, combining files, and server-side gzip compression. The document also provides optimization tips for databases like MongoDB and recommends using asynchronous and non-blocking I/O for costly operations. It advocates for client-side templating to reduce bandwidth usage and improve cacheability.
Rami Jarvinen discusses optimizing performance on Drupal sites. He outlines several caching layers that can be implemented including PHP opcode caching, Drupal internal caching, page caching, and reverse proxy caching using Boost or Varnish. He also discusses scaling Drupal through techniques such as MySQL master-slave configuration, serving static files from Nginx/lighttpd, and adding frontend servers. Profiling with tools like Xdebug can help identify SQL bottlenecks to optimize. The optimal caching and performance strategy depends on each site's specific usage and hosting environment.
This document discusses how bookmarklets can function as applications by interacting with web pages in a secure manner. It describes how the bookmarklet uses elementFromPoint for fast hit detection, resets CSS to robustly render its UI, and transmits data to a server through signed cross-domain POST messages for security. Examples of embedding the bookmarklet code on a page and customizing its appearance are also provided.
What does it mean when someone says “My Site is slow now”? What is page speed? How do you measure it? How can you make it faster? We’ll try to answer these questions, provide you with a set of tools to use and explain how this relates to your server load.
We will cover:
- What is page load speed? – Tools used to measure performance of your pages and site – Six Key Improvements to make Drupal “run fast”
++ Performance Module settings and how they work
++ Caching – biggest gainer and how to implement Boost
++ Other quick hits: off loading search, tweaking settings & why running crons is important
++ Ask your host about APC and how to make sure its set up correctly
++ Dare we look at the database? Easy changes that will help a lot!
- Monitoring Best practices – what to set up to make sure you know what is going on with your server – What if you get slashdoted? Recommendation on how to quickly take cover from a rhino.
This document provides an overview of scaling DotNetNuke in the cloud. It discusses infrastructure as a service models and configuring DotNetNuke for highly available, load balanced environments. Specific topics covered include setting up availability zones, load balancers, configuring web servers uniformly, replicating files, database mirroring, caching, and scheduling tasks. References are provided for additional resources on topics like shared configuration, distributed file system replication, and setting up application request routing.
Matteo Moretti discusses scaling PHP applications. He covers scaling the web server, sessions, database, filesystem, asynchronous tasks, and logging. The key aspects are decoupling services, using caching, moving to external services like Redis, S3, and RabbitMQ, and allowing those services to scale automatically using techniques like auto-scaling. Sharding the database is difficult to implement and should only be done if really needed.
This document discusses various techniques for improving the frontend performance of Drupal websites. It begins by introducing the speaker and describing the goals of the presentation. The bulk of the document then provides recommendations in three areas: backend server optimizations like caching, parallel downloads and gzip compression; tools for measuring performance; and frontend optimizations like minimizing requests, lazy loading images, and improving CSS and JavaScript. The document encourages proper performance diagnosis and defines goals before implementing solutions.
A common request sent from your web browser to a web server goes quite a long way and it can take a great deal of time until the data your browser can display are fetched back. I will talk about making this great deal of time significantly less great by caching things on different levels, starting with client-side caching for faster display and minimizing transferred data, storing results of already performed operations and computations and finishing with lowering the load of database servers by caching result sets. Cache expiration and invalidation is the hardest part so I will cover that too. Presentation will be focused mainly on PHP, but most of the principles are quite general work elsewhere too.
Powerpoint file(incl. animations!): http://db.tt/oQiXb9lq
This is the slides of the presentation "Wordpress optimization" who presented at WordCamp 2013.
How to improve your wordpress performance and speed up your website more than 700% faster!
WordPress Hosting Best Practices - Do's and Don't s | WordPress TrivandrumWordPress Trivandrum
The keynote shares some tips and best practices to choose a hosting package for your WordPress sites.
Originally presented by HostDime India at WordPress Trivandrum Meetup on 20 January 2018.
PHP comes pre-installed with all modules by default, which can lead to heavy processing. It is better to compile PHP from source and only install required modules. Lightweight web servers like Nginx with PHP-FPM are faster than Apache for static and dynamic content since PHP execution is native rather than module-based. Caching, a CDN, Memcache, and optimizing WordPress, MySQL, and plugins can improve performance. Security measures include restricting access, removing default accounts and files, strong file permissions, and installing security modules.
Web caching provides several benefits including bandwidth savings, reducing server load, and decreasing network latency. It works by intercepting HTTP requests and checking a local cache for the requested object before going to the origin server. Different caching approaches include proxy caching, reverse proxy caching, transparent proxy caching, and hierarchical caching. New techniques like adaptive caching and push caching aim to dynamically optimize cache placement near popular content or users.
Skalowalna architektura na przykładzie soccerway.comSpodek 2.0
This document discusses scalable web application architecture. It describes using load balancing and database replication across multiple servers to handle high traffic volumes. It emphasizes using caching at various levels (PHP, databases, CDNs) and preprocessing data to improve performance. A CDN is recommended for distributing static resources globally to reduce latency and failure risk.
Did you know that 80% to 90% of the user's page-load time comes from components outside the firewall? Optimizing performance on the front end (e.g. from the client side) can enhance the user experience by reducing the response times of your web pages and making them load and render much faster.
This document discusses web performance optimization and provides guidance on ensuring high performance web applications. It covers why performance is important, key performance metrics to measure, common areas to profile like client and server-side processing, requirements for performance testing like goals and load thresholds, and tools for performance testing and profiling like JMeter, dotTrace and SQL Server Profiler. The document also outlines best practices for integrating performance testing into the development workflow when issues are found or time allows before a release.
A brief overview of caching mechanisms in a web application. Taking a look at the different layers of caching and how to utilize them in a PHP code base. We also compare Redis and MemCached discussing their advantages and disadvantages.
The document discusses optimizing WordPress performance. It recommends minimizing frontend assets like images, implementing caching for assets and application chunks, optimizing themes and plugins, and choosing efficient server setups. Specific plugins like W3 Total Cache and a CDN can improve performance by up to 10 times by caching static content. Nginx is presented as a faster alternative to Apache. Overall, the key takeaways are to simplify code, minimize requests, optimize caching, and reduce payload sizes to improve perceived and actual performance.
The document discusses various techniques for optimizing web performance, ranging from beginner to advanced levels. At the beginner level, it recommends avoiding redirects, enabling client-side caching, and reducing DOM elements. At the medium level, it suggests minifying JavaScript and CSS. More advanced techniques include image compression, combining files, and server-side gzip compression. The document also provides optimization tips for databases like MongoDB and recommends using asynchronous and non-blocking I/O for costly operations. It advocates for client-side templating to reduce bandwidth usage and improve cacheability.
Drupalcamp Estonia - High Performance Sitesdrupalcampest
Rami Jarvinen discusses optimizing performance on Drupal sites. He outlines several caching layers that can be implemented including PHP opcode caching, Drupal internal caching, page caching, and reverse proxy caching using Boost or Varnish. He also discusses scaling Drupal through techniques such as MySQL master-slave configuration, serving static files from Nginx/lighttpd, and adding frontend servers. Profiling with tools like Xdebug can help identify SQL bottlenecks to optimize. The optimal caching and performance strategy depends on each site's specific usage and hosting environment.
This document discusses how bookmarklets can function as applications by interacting with web pages in a secure manner. It describes how the bookmarklet uses elementFromPoint for fast hit detection, resets CSS to robustly render its UI, and transmits data to a server through signed cross-domain POST messages for security. Examples of embedding the bookmarklet code on a page and customizing its appearance are also provided.
Make Drupal Run Fast - increase page load speedAndy Kucharski
What does it mean when someone says “My Site is slow now”? What is page speed? How do you measure it? How can you make it faster? We’ll try to answer these questions, provide you with a set of tools to use and explain how this relates to your server load.
We will cover:
- What is page load speed? – Tools used to measure performance of your pages and site – Six Key Improvements to make Drupal “run fast”
++ Performance Module settings and how they work
++ Caching – biggest gainer and how to implement Boost
++ Other quick hits: off loading search, tweaking settings & why running crons is important
++ Ask your host about APC and how to make sure its set up correctly
++ Dare we look at the database? Easy changes that will help a lot!
- Monitoring Best practices – what to set up to make sure you know what is going on with your server – What if you get slashdoted? Recommendation on how to quickly take cover from a rhino.
This document provides an overview of scaling DotNetNuke in the cloud. It discusses infrastructure as a service models and configuring DotNetNuke for highly available, load balanced environments. Specific topics covered include setting up availability zones, load balancers, configuring web servers uniformly, replicating files, database mirroring, caching, and scheduling tasks. References are provided for additional resources on topics like shared configuration, distributed file system replication, and setting up application request routing.
Matteo Moretti discusses scaling PHP applications. He covers scaling the web server, sessions, database, filesystem, asynchronous tasks, and logging. The key aspects are decoupling services, using caching, moving to external services like Redis, S3, and RabbitMQ, and allowing those services to scale automatically using techniques like auto-scaling. Sharding the database is difficult to implement and should only be done if really needed.
This document discusses various techniques for improving the frontend performance of Drupal websites. It begins by introducing the speaker and describing the goals of the presentation. The bulk of the document then provides recommendations in three areas: backend server optimizations like caching, parallel downloads and gzip compression; tools for measuring performance; and frontend optimizations like minimizing requests, lazy loading images, and improving CSS and JavaScript. The document encourages proper performance diagnosis and defines goals before implementing solutions.
My slides from WordCamp Dhaka 2019 on WordPress Scaling. In this session I explained performance optimisation using HTTP/2, Caching and compressing resources.
I also explained how to Dockerize WordPress to make it easier to scale.
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
Improving the performance and scalability of your Drupal website with a Memcached implementation.
In this webinar, you will learn about:
• The components of a Memcached system
• Installing a simple Memcached installation
• Complex distributed installations and when to use them
• Verifying the installation
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
Improving the performance and scalability of your Drupal website with a Memcached implementation.
In this webinar, you will learn about:
• The components of a Memcached system
• Installing a simple Memcached installation
• Complex distributed installations and when to use them
• Verifying the installation
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...WordCamp Harare
I’d like to talk on how to make WordPress fly on the various different levels available to you, from right down as simple as basic steps to take within WordPress or as advanced as server tweaks, will use my time hosting Techzim as a case study example
My talk on wordpress and website performance and quick tips + advanced on how to improve website performance
Video at http://wordpress.tv/2017/01/04/anthony-somerset-site-speed-success-optimising-wordpress-from-the-server-up/
This document discusses web performance optimization techniques. It is a summary of rules for web performance by Mark Tomlinson, who has 27 years of experience in performance. Some of the key techniques discussed include reducing HTTP requests, optimizing file compression, minimizing code, improving web font and image performance, prefetching resources, avoiding unnecessary redirects, and optimizing infrastructure and databases. The document emphasizes measuring performance through load testing and monitoring to identify bottlenecks.
Make Drupal Run Fast - increase page load speedPromet Source
What does it mean when someone says “My Site is slow now”? What is page speed? How do you measure it? How can you make it faster? We’ll try to answer these questions, provide you with a set of tools to use and explain how this relates to your server load.
We will cover:
- What is page load speed? – Tools used to measure performance of your pages and site – Six Key Improvements to make Drupal “run fast”
++ Performance Module settings and how they work
++ Caching – biggest gainer and how to implement Boost
++ Other quick hits: off loading search, tweaking settings & why running crons is important
++ Ask your host about APC and how to make sure its set up correctly
++ Dare we look at the database? Easy changes that will help a lot!
- Monitoring Best practices – what to set up to make sure you know what is going on with your server – What if you get slashdoted? Recommendation on how to quickly take cover from a rhino.
Rami Jarvinen discusses optimizing performance on Drupal sites. He outlines several caching strategies including PHP opcode caching, Drupal internal caching, page caching, and reverse proxy caching using Boost or Varnish. Memcached can be used as a high-performance replacement for Drupal's database caching. Scaling can involve using a master-slave database setup and serving static files from a separate server. Profiling tools can identify SQL bottlenecks and unnecessary queries for optimization. The optimal solution depends on factors like the number of anonymous vs logged-in users and the capabilities of the hosting environment.
Like all frameworks, Drupal comes with a performance cost, but there are many ways to minimise that cost.
This session explores different and complementary ways to improve performance, covering topics such as caching techniques, performance tuning, and Drupal configuration.
We'll touch on benchmarking before presenting the results from applying each of the performance techniques against copies of a number of real-world Drupal sites.
Optimizing Drupal Performance. Tips and TricksTimur Kamanin
The document provides 20 tips for optimizing Drupal performance. It begins by introducing the author and defining performance as how long it takes to render a page on the server and in the browser. It then explains that performance is important for user experience and business reasons. The rest of the document details specific tips, such as limiting modules, caching content, tuning MySQL and Apache settings, offloading media, and using search optimizations. The overall message is that optimizing Drupal performance requires understanding tools, caching content, tuning server configurations, and separating code from media.
This document provides information on improving Drupal performance through various techniques including performance testing, caching, optimizing database and server configurations, using tools like Varnish, load balancers, and CDNs, and addressing inefficient code. It also discusses a case study of using scalable cloud hosting and caching strategies to handle peak traffic for a site during major awards events.
The document discusses various techniques for optimizing UI performance, including optimizing caching, minimizing round-trip times, minimizing request size, minimizing payload size, and optimizing browser rendering. Specific techniques mentioned include leveraging browser and proxy caching, minimizing DNS lookups and redirects, combining external JavaScript, minimizing cookie and request size, enabling gzip compression, and optimizing images. Profiling and heap analysis tools are also discussed for diagnosing backend performance issues.
- Drupal relies heavily on SQL queries which can burden databases. Caching improves performance by reducing database queries.
- There are different levels of caching in Drupal - from internal block/page caching, to HTTP caching using a reverse proxy, CDN, or custom caching with Drupal's cache API.
- For high traffic sites, saving the Drupal cache to memory (e.g. using memcached) rather than the database is recommended. Opcode caching like APC also provides significant performance gains.
- Profiling a site is important to identify bottlenecks and determine the appropriate caching strategy based on factors like site content and hosting environment.
Similar to Drupal performance optimization Best Practices (20)
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxSynapseIndia
Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation
Blockchain technology is transforming industries and reshaping the way we conduct business, manage data, and secure transactions. Whether you're new to blockchain or looking to deepen your knowledge, our guidebook, "Blockchain for Dummies", is your ultimate resource.
Transcript: Details of description part II: Describing images in practice - T...BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and slides: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
YOUR RELIABLE WEB DESIGN & DEVELOPMENT TEAM — FOR LASTING SUCCESS
WPRiders is a web development company specialized in WordPress and WooCommerce websites and plugins for customers around the world. The company is headquartered in Bucharest, Romania, but our team members are located all over the world. Our customers are primarily from the US and Western Europe, but we have clients from Australia, Canada and other areas as well.
Some facts about WPRiders and why we are one of the best firms around:
More than 700 five-star reviews! You can check them here.
1500 WordPress projects delivered.
We respond 80% faster than other firms! Data provided by Freshdesk.
We’ve been in business since 2015.
We are located in 7 countries and have 22 team members.
With so many projects delivered, our team knows what works and what doesn’t when it comes to WordPress and WooCommerce.
Our team members are:
- highly experienced developers (employees & contractors with 5 -10+ years of experience),
- great designers with an eye for UX/UI with 10+ years of experience
- project managers with development background who speak both tech and non-tech
- QA specialists
- Conversion Rate Optimisation - CRO experts
They are all working together to provide you with the best possible service. We are passionate about WordPress, and we love creating custom solutions that help our clients achieve their goals.
At WPRiders, we are committed to building long-term relationships with our clients. We believe in accountability, in doing the right thing, as well as in transparency and open communication. You can read more about WPRiders on the About us page.
Best Practices for Effectively Running dbt in Airflow.pdfTatiana Al-Chueyr
As a popular open-source library for analytics engineering, dbt is often used in combination with Airflow. Orchestrating and executing dbt models as DAGs ensures an additional layer of control over tasks, observability, and provides a reliable, scalable environment to run dbt models.
This webinar will cover a step-by-step guide to Cosmos, an open source package from Astronomer that helps you easily run your dbt Core projects as Airflow DAGs and Task Groups, all with just a few lines of code. We’ll walk through:
- Standard ways of running dbt (and when to utilize other methods)
- How Cosmos can be used to run and visualize your dbt projects in Airflow
- Common challenges and how to address them, including performance, dependency conflicts, and more
- How running dbt projects in Airflow helps with cost optimization
Webinar given on 9 July 2024
Comparison Table of DiskWarrior Alternatives.pdfAndrey Yasko
To help you choose the best DiskWarrior alternative, we've compiled a comparison table summarizing the features, pros, cons, and pricing of six alternatives.
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc
Six months into 2024, and it is clear the privacy ecosystem takes no days off!! Regulators continue to implement and enforce new regulations, businesses strive to meet requirements, and technology advances like AI have privacy professionals scratching their heads about managing risk.
What can we learn about the first six months of data privacy trends and events in 2024? How should this inform your privacy program management for the rest of the year?
Join TrustArc, Goodwin, and Snyk privacy experts as they discuss the changes we’ve seen in the first half of 2024 and gain insight into the concrete, actionable steps you can take to up-level your privacy program in the second half of the year.
This webinar will review:
- Key changes to privacy regulations in 2024
- Key themes in privacy and data governance in 2024
- How to maximize your privacy program in the second half of 2024
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfNeo4j
Presented at Gartner Data & Analytics, London Maty 2024. BT Group has used the Neo4j Graph Database to enable impressive digital transformation programs over the last 6 years. By re-imagining their operational support systems to adopt self-serve and data lead principles they have substantially reduced the number of applications and complexity of their operations. The result has been a substantial reduction in risk and costs while improving time to value, innovation, and process automation. Join this session to hear their story, the lessons they learned along the way and how their future innovation plans include the exploration of uses of EKG + Generative AI.
Sustainability requires ingenuity and stewardship. Did you know Pigging Solutions pigging systems help you achieve your sustainable manufacturing goals AND provide rapid return on investment.
How? Our systems recover over 99% of product in transfer piping. Recovering trapped product from transfer lines that would otherwise become flush-waste, means you can increase batch yields and eliminate flush waste. From raw materials to finished product, if you can pump it, we can pig it.
2. 2
Overview
• Drupal Performance
• Know the tools for performance Analysis
• Best Practices for Performance Optimization
– Application Level
– Server Configuration
– Database Configuration
• Common mistakes which causes Performance
bottlenecks
3. Drupal Performance
• Performance bottlenecks is a major issue with Drupal based
application
• Common understanding among people, product stakeholders
and web developers is:
Drupal is not a right choice for large application with lot
of users and content.
It consumes lot of memory and resources.
3
4. 4
Drupal Performance
Why Drupal is Slow?
• Because it’s not configured/deployed correctly…
• Contents are dynamic not static.
• Bootstrap process is complex where series of events occurs
behind the scene:
Establishing a database connection
Loading all settings and modules
Initializing a user session
Mapping the URL to page callback
Render the Page (theme initialization)
On every single page request all the above events occurs in backend.
5. 5
Drupal Performance
When do you think about performance?
(Before/After Development)
Discuss and freeze the performance related NFRs carefully
under requirement document, before starting the development.
Set a goal for performance which needs to be achieved.
Finalize Caching strategies.
9. 7
Best Practices - Application Level
Disable and Delete unused and non-essential modules
Disable the Update Manager module on Production.
Database logging (dblog) is enabled by default in Drupal 7, and errors can
fill up your database quickly.
A better solution is to fix all PHP notices and warnings to reduce logging
overhead.
10. 8
Best Practices - Application Level
Put JS at the bottom of the page.
Custom JS/CSS should be added in the application only using
drupal_add_js() and drupal_add_css() function respectively.
Aggregate and minify JS/CSS file through Drupal Admin.
Use the Fast 404 module to serve static 404s for image, icon,
CSS, or other static files, rather than bootstrapping Drupal.
12. 9
Best Practices – Server Configuration
Cache PHP with APC(Alternative PHP cache)
Cache everything to reduce the page load time for
anonymous user (Boost, Memcache/Varnish).
13. 10
Best Practices – Server Configuration
Configure CRON to be executed at a certain timestamp in a day, instead of
executing this on every request. Drupal executes cron hook on every page request.
CDN Integration – to store all static files e.g. css, js and images.
Leverage browser caching
Optimize images to reduce the total page size.
14. 11
Best Practices – Server Configuration
Boost + Memcache – Works best in most of the case as it
solves performance issue for anonymous and authenticated user
both
Boost provides static page caching for Drupal enabling a very significant performance and
scalability boost for sites that receive mostly anonymous traffic
Precache everything through warmup script
Use cache-expire module to update cache on node insert/update/detele.
16. 13
Best Practices – Server Configuration
• Memcache
You can use the Memcache module to move some common cache queries out of the database
and into memory. Information held in memory will always be retrieved more quickly than
information retrieved from a database query.
• APC (Alternative PHP Cache)
PHP is an interpreted language, which means the files have to be reduced down into
opcodes in order to actually be executed by the server.
Once APC is installed on the server and configured, it will store the intermediate code of
PHP files in memory so that every request does not result in fetching all those PHP files off disk
and interpreting the files every time.
17. 14
Best Practices – Server Configuration
• Integrate CDN to store all static files(JS/Images/CSS)
A content delivery network (CDN) is a collection of web servers distributed across multiple
locations to deliver content more efficiently to users. The server selected for delivering content to
a specific user is typically based on a measure of network proximity.
18. 15
Best Practices – Server Configuration
• Leverage Brower Caching
What browser caching does:
“Remember" the resources that the browser has already loaded. When a visitor goes to
another page on your website your logo or CSS file does not need to be loaded again,
because the browser has them "remembered". The end result is that your pages load
much faster.
Browser caching can be enabled with few configuration added in the .htaccess file on the
server.
• Set expiry time of static contents
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
19. 16
Best Practices – Server Configuration
• Leverage Brower Caching
• Set max-age header
<FilesMatch "(.js.gz|.css.gz)$">
Header set Cache-Control "max-age=2678400, public"
ExpiresActive On
ExpiresDefault "access plus 1 month“
Requirements:
• mod_expire and mod_header modules needs to be installed and enabled on the
server(Apache).
20. 17
Best Practices – Server Configuration
• CRON Configuration
Misconfiguration of CRON settings results into major performance issue as Drupal executes all
the cron hooks on every single page request by default.
Configure CRON to be executed at a certain timestamp in a day
Elysia cron module works perfectly for configuring cron.
It extends Drupal standard cron, allowing a fine grain control over each task and several
ways to add custom cron jobs to your site.
21. 18
Best Practices – Server Configuration
• CRON Configuration
Configuration on Server side:
Connect to server through ssh
Login as root user (sudo su)
Command to view/edit crontab file
crontab –l (to view the list of cron script configured on the server)
crontab –e (opens the crontab configuration)
Add the below line to excute the cron at 2:10 AM daily
10 2 * * * /usr/bin/wget -O - -q -t 1
http://www.createdbespoke.com/sites/all/modules/community/elysia_cron/cron.php?cr
on_key=sfaslsfklsfjlksfjlfsaf
Save the file and quit – wq
23. 19
Best Practices – Database
Do not use InnoDB for the semaphore table, use Memory
ALTER TABLE semaphore ENGINE=MEMORY;
innodb_buffer_pool_size 70-80% of memory is a safe bet. I set it to 12G on 16GB box.
innodb_log_file_size – This depends on your recovery speed needs but 256M seems to be a
good balance between reasonable recovery time and good performance
innodb_log_buffer_size=4M is good for most cases unless you’re piping large blobs to Innodb
in this case increase it a bit.
24. 20
Best Practices – Database
Enable MySQL query cache (i.e. query_cache_size)
Find Slow query through slow query log file.
Create indexes to optimize the query