First and foremost important thing, Achieving great performance on any web application is NOT the turnkey solution. OR it is not one-time activity. You need to continuously move forward inch by inch to achieve great performance for your drupal application.
Achieve better performance on Drupal website
Let’s get serious now. There are 15 steps which I have documented as since last 8 years of my Drupal development and Application management.
The easiest steps are listed first.
1- Uninstall Unused Modules/Themes:
Remove all unused or less used features and their respective modules. Remove unused themes also.
2- Update all module with the latest version:
Keep all modules up to date. Enrol yourself to drupal newsletters. Put your drupal userid in the url or check the newsletter section in account/edit tab My newsletters
3- Use Content Delivery Network (CDN)
Investing in good CDN helps if you have lots of files and you have world-wide users who access the website.
4- Cache Optimisation:
Enable basic drupal cache from here admin/config/development/performance
5- Advanced Cache:
Varnish will be useful in case of Anonymous users but for authenticated users, you will need Memcached
6- Image Styles:
Use different image styles and sizes, Do not render a big image and then squeeze that image with css.
7- Use Optimised images:
8- Bandwidth Optimisation:
9- Remove 404 URL + Add 301 redirects on broken/modified URLs.
Effective management of 301 and 404 URLs boost performance and help in better ranking in SEO
10- Additional Tweaks: Follow coding standards Optimizing Drupal to load faster (Server, MySQL, caching, theming, HTML)
11. If your site has large number of authenticated users then,
-DB optimization helps
-Identify mysql slow queries (enable slow_query_log), Most of them will be Drupal Views queries.
-Put column indexing on JOINs of slow queries (like nid,uid etc)
-Check if changing Mysql Storage engine type helps ( MyISAM/InnoDB/heap)
12. Webserver optimization
- Use of optimum use of apache module like deflate,
-MPM fork module to control the number of max and min threads on the server.
13. If you have VPS, Optimising server OS is also worth, remove unused software keeps OS lean so if will be using its resources for apache & MySQL only.
14. If you have quick learner team then try nginx instead of apache. From performance point of view Nginx is better NGINX | High Performance Load Balancer, Web Server, & Reverse Proxy
15. Load Balancers
Some of the hosting providers give load balancers as part of their hosting plan. If the project has the budget then effective use of load balancers help a lot in performance.