Drupal is a powerful and flexible platform to build websites with rich funcionalities without building almost anything from scratch. This flexibility brought by the usage of a powerful framework and the work of a super active community can abstract people to understand what is Drupal doing behind the scenes.
Most of performance talks regarding Drupal focus on aspects like infrastructure changes, caching strategies, and comparison of performance between modules or platforms. Unfortunately when performance problems occur, development teams also follow several strategies to replace several aspects in their platforms, jump directly to look for slow queries before trying really to understand where is the bottleneck.
However, most of the times what really needs to be done is to look to what the application is doing and understanding why is it taking so long to do it. Drupal is a platform used by million of websites worldwide and its performance is easy to measure and compare.
At Acquia we have done dozens of performance assessments, and even if we usually face the same problems, sometimes we found weird situations that are only possible to be detected when measured. Measuring and profiling is the only way to understand performance problems in a site and provide valid fixes.
In this talk I will explain how to detect problems regarding performance in Drupal, using simple modules like devel, profilers like XhProf and looking to logs to understand the impact done on the application.
One Drupal to rule them all - Drupalcamp Londonhernanibf
Dries famous sentence (http://buytaert.net/one-drupal-to-rule-them-all) is becoming a reality for many organisations from small shops to the enterprise space. More and more stakeholders are following the idea of standardising their online presence in Drupal and leverage the same code and infrastructure amongst their different sites. What they are seeking is a drastic reduction in the time needed to create, launch and configure a Drupal site at the same time that they reduce the maintenance effort of the whole sites' network.
To achieve it, a drastic change needs to happen on the standardisation of development processes, more strict control of the overall architecture while supporting new changes and requirements, and repeatable and trustable deployment process to avoid the opposite pitfall of "one site to break them all".
In this session we will look to what needs to be thought when creating such an architecture from the development process to the infrastructure to host the different environments needed. We will look at different solutions that allow maintain these sites factories and walk you through several architectures explaining their advantages and differences.
Finally, we will look in detail to Acquia's Cloud Site Factory, a fully-hosted SaaS solution that allows organisations to quickly deploy and manage websites by the hundreds. Pre-define site templates, create new sites in a single click, manage roles and permissions across sites and connect to existing analytics and data systems.
Drupal architectures for flexible content - Drupalcon Barcelonahernanibf
We got to the point where the old Drupal mantra of creating content first to see it later is not enough to suceed with content editors. Drupal is competing and replacing other CMS and platforms where the lack of flexibility is the problem #1 for content editors. They are expecting full flexibity on how content is created, displayed, approved and published. However this introduce a common problem for web developers and site builders: how can you provide this full flexibility without having to be constantly on the hook for further development or configuration.
Modules like panels and panelizer, projects like Spark and distributions like panopoly and demo framework helped change the panorama in Drupal and the expectations that are set when sites are built.
In this session we will look to a set of common problems and real examples when creating content and layout for pages with demanding editorial teams. We will look and evaluate common options and recipes.
How can complex content and rich pages be structured ? Free HTML format in different fields? Structured data in complex fields? Use paragraphs or field collection? Different content items in different items/entities? How to glue it all together?
How can indivual page layout be managed providing flexibility but also control? Rely on templating system and view modes? Use contrib modules like panels and panelizer or display suite? Mix several approaches and modules?
How can I add any content to any page and choose its display ? How can I have a list of curated widgets ready to use by the content team to deploy anywhere or in any section?
How can pages and sections be managed before approved and published? Use preview systems and inline editors? Use workbench or workflow for layout? Rely on more complex content staging systems? Use separated environments?
These are daily problems that architects and developers face in every project. As a technical architect in Acquia it is uncommon a project where I am involved that does not need to solve one or more of these problems. In this session I will give some real examples and resume options and recipes that can be used to solve those problems today in Drupal 7 and look to Drupal 8 to explain how it can improve some of our possibilities and options and easy the life of one of our most important personas: the content editor.
We got to the point where the old Drupal mantra of creating content first to see it later is not enough to suceed with content editors. Drupal is competing and replacing other CMS and platforms where the lack of flexibility is the problem #1 for content editors. They are expecting full flexibity on how content is created, displayed, approved and published. However this introduce a common problem for web developers and site builders: how can you provide this full flexibility without having to be constantly on the hook for further development or configuration.
Modules like panels and panelizer, projects like Spark and distributions like panopoly and demo framework helped change the panorama in Drupal and the expectations that are set when sites are built.
In this session we will look to a set of common problems and real examples when creating content and layout for pages with demanding editorial teams. We will look and evaluate common options and recipes.
- How can complex content and rich pages be structured ? Free HTML format in different fields? Structured data in complex fields? Use paragraphs or field collection? Different content items in different items/entities? How to glue it all together?
- How can indivual page layout be managed providing flexibility but also control? Rely on templating system and view modes? Use contrib modules like panels and panelizer or display suite? Mix several approaches and modules?
- How can I add any content to any page and choose its display ? How can I have a list of curated widgets ready to use by the content team to deploy anywhere or in any section?
- How can pages and sections be managed before approved and published? Use prewiew systems and inline editors? Use workbench or workflow for layout? Rely on more complex content staging systems? Use separated environments?
These are daily problems that architects and developers face in every project. As a technical architect in Acquia it is uncommon a project where I am involved that does not need to solve one or more of these problems. In this session I will give some real examples and resume options and recipes that can be used to solve those problems today in Drupal 7 and look to Drupal 8 to explain how it can improve some of our possibilities and options and easy the life of one of our most important personas: the content editor.
One Drupal to rule them all - Drupalcamp Londonhernanibf
Dries famous sentence (http://buytaert.net/one-drupal-to-rule-them-all) is becoming a reality for many organisations from small shops to the enterprise space. More and more stakeholders are following the idea of standardising their online presence in Drupal and leverage the same code and infrastructure amongst their different sites. What they are seeking is a drastic reduction in the time needed to create, launch and configure a Drupal site at the same time that they reduce the maintenance effort of the whole sites' network.
To achieve it, a drastic change needs to happen on the standardisation of development processes, more strict control of the overall architecture while supporting new changes and requirements, and repeatable and trustable deployment process to avoid the opposite pitfall of "one site to break them all".
In this session we will look to what needs to be thought when creating such an architecture from the development process to the infrastructure to host the different environments needed. We will look at different solutions that allow maintain these sites factories and walk you through several architectures explaining their advantages and differences.
Finally, we will look in detail to Acquia's Cloud Site Factory, a fully-hosted SaaS solution that allows organisations to quickly deploy and manage websites by the hundreds. Pre-define site templates, create new sites in a single click, manage roles and permissions across sites and connect to existing analytics and data systems.
Drupal architectures for flexible content - Drupalcon Barcelonahernanibf
We got to the point where the old Drupal mantra of creating content first to see it later is not enough to suceed with content editors. Drupal is competing and replacing other CMS and platforms where the lack of flexibility is the problem #1 for content editors. They are expecting full flexibity on how content is created, displayed, approved and published. However this introduce a common problem for web developers and site builders: how can you provide this full flexibility without having to be constantly on the hook for further development or configuration.
Modules like panels and panelizer, projects like Spark and distributions like panopoly and demo framework helped change the panorama in Drupal and the expectations that are set when sites are built.
In this session we will look to a set of common problems and real examples when creating content and layout for pages with demanding editorial teams. We will look and evaluate common options and recipes.
How can complex content and rich pages be structured ? Free HTML format in different fields? Structured data in complex fields? Use paragraphs or field collection? Different content items in different items/entities? How to glue it all together?
How can indivual page layout be managed providing flexibility but also control? Rely on templating system and view modes? Use contrib modules like panels and panelizer or display suite? Mix several approaches and modules?
How can I add any content to any page and choose its display ? How can I have a list of curated widgets ready to use by the content team to deploy anywhere or in any section?
How can pages and sections be managed before approved and published? Use preview systems and inline editors? Use workbench or workflow for layout? Rely on more complex content staging systems? Use separated environments?
These are daily problems that architects and developers face in every project. As a technical architect in Acquia it is uncommon a project where I am involved that does not need to solve one or more of these problems. In this session I will give some real examples and resume options and recipes that can be used to solve those problems today in Drupal 7 and look to Drupal 8 to explain how it can improve some of our possibilities and options and easy the life of one of our most important personas: the content editor.
We got to the point where the old Drupal mantra of creating content first to see it later is not enough to suceed with content editors. Drupal is competing and replacing other CMS and platforms where the lack of flexibility is the problem #1 for content editors. They are expecting full flexibity on how content is created, displayed, approved and published. However this introduce a common problem for web developers and site builders: how can you provide this full flexibility without having to be constantly on the hook for further development or configuration.
Modules like panels and panelizer, projects like Spark and distributions like panopoly and demo framework helped change the panorama in Drupal and the expectations that are set when sites are built.
In this session we will look to a set of common problems and real examples when creating content and layout for pages with demanding editorial teams. We will look and evaluate common options and recipes.
- How can complex content and rich pages be structured ? Free HTML format in different fields? Structured data in complex fields? Use paragraphs or field collection? Different content items in different items/entities? How to glue it all together?
- How can indivual page layout be managed providing flexibility but also control? Rely on templating system and view modes? Use contrib modules like panels and panelizer or display suite? Mix several approaches and modules?
- How can I add any content to any page and choose its display ? How can I have a list of curated widgets ready to use by the content team to deploy anywhere or in any section?
- How can pages and sections be managed before approved and published? Use prewiew systems and inline editors? Use workbench or workflow for layout? Rely on more complex content staging systems? Use separated environments?
These are daily problems that architects and developers face in every project. As a technical architect in Acquia it is uncommon a project where I am involved that does not need to solve one or more of these problems. In this session I will give some real examples and resume options and recipes that can be used to solve those problems today in Drupal 7 and look to Drupal 8 to explain how it can improve some of our possibilities and options and easy the life of one of our most important personas: the content editor.
My Site is slow - Drupal Camp London 2013hernanibf
Drupal is a powerful and flexible tool to create web applications without building everything from scratch. This ability can drive developers to build complex websites without understanding what is Drupal doing behind the scenes.
The majority of Drupal performance talks mostly focus in aspects like infrastructure changes, caching strategies or comparisons between modules and architectures. Unfortunately when performance problems occur, development teams also follow strategies to replace different aspects of the platform looking only to standard aspects like slow queries without understanding and profiling the real problem.
The majority of times it is fundamental to measure and analyze what is the application is actually doing to understand te real problems. Drupal is a platform used by million of websites worlwide and its performance can in most cases be compared after measured.
In Acquia we do dozens of performance assessments per year, and even in most clients we find the same problems, often we find situations that only can be detected when measured and analized when looking to a profiler report.
In this session, I will explain how to detect performance problems looking to simple data, from logs to profiler data and providing some nice targets that can be analyzed to understand what is causing the uncommon bad performance of a site.
Alfresco Share provides a rich platform for further development, allowing you to tweak and customize to your heart’s content, using only lightweight scripting and templating. But with great power, comes great responsibility, as they say. So this session looks at what it means to customize Share, before discussing how best to go about it, with tips and tricks based on real-world examples.
An overview of all the different content related technologies at the Apache Software Foundation
Talk from ApacheCon NA 2010 in Atlanta in November 2010
Walks through the top 8 improvements coming to Drupal 8, including videos and code samples to demonstrate "before vs. after."
Given to the @DrupalNS meet up in Bedford, Nova Scotia on July 28, 2014.
This introduction to Drupal 6 was presented to the Chicago Web Professionals meetup as the third in a series of CMS introductions (following WordPress and Joomla)
This PPT gives information about:
1.Drupal overview,
2.basic concepts and terminology of Drupal,
3. Basic Site Building Concepts
4. Advantages
5. Disadvantages
6. Drupal Terminology
Evolution of Drupal and the Drupal communityAngela Byron
The Drupal project has experienced phenomenal growth over its more than 14 years, growing from a small hobby project to over 1 million known installations, over 1 million Drupal.org users, and more than doubling the active contributors and commits in Drupal core between Drupal 7 and Drupal 8, as well as thousands of people who depend on Drupal in some way for a living.
This talk will "de-mystify" some recent developments in the community, from the technical direction of Drupal 8, to various project governance changes, to the increasing role of the Drupal Association on Drupal.org. We'll look at both the historical context that brought those changes about, and talk about how they'll help us scale to the next 1 million sites and users.
Presentation on itPage, an open-source content management system (CMS) for the Lasso Professional language. Presenter is Eric Landmann of Iterate LLC, Madison, WI, given at the Lasso Developer's Conference, Oct. 1-4, 2009, Amsterdam.
Front End page speed performance improvements for DrupalAndy Kucharski
If you are a developer or business manager with responsibilities over your website, then check out this deck..
What will you learn?
The webinar, created by our Founder and CEO, Andy Kucharski, is a highly accessible, information-rich review on the ways Drupal site performance can be radically improved. Some of the main topics we will cover include:
What is slow site speed?
What tools to use to diagnose it.
Plus six key improvements to make Drupal “run fast!”
And if that’s not already enough, we will also share some best practices monitoring tips for making sure you know how the Drupal server is performing 24/7.
Drupal 8 brings a lot of changes. Many standby contributed modules are now included with Drupal Core, and many small changes add up to the most exciting Drupal release yet! We'll walk through many of the biggest changes, highlighting how Drupal 8 will accelerate your web development and provide tools to make Drupal the best content management platform on any device.
My Site is slow - Drupal Camp London 2013hernanibf
Drupal is a powerful and flexible tool to create web applications without building everything from scratch. This ability can drive developers to build complex websites without understanding what is Drupal doing behind the scenes.
The majority of Drupal performance talks mostly focus in aspects like infrastructure changes, caching strategies or comparisons between modules and architectures. Unfortunately when performance problems occur, development teams also follow strategies to replace different aspects of the platform looking only to standard aspects like slow queries without understanding and profiling the real problem.
The majority of times it is fundamental to measure and analyze what is the application is actually doing to understand te real problems. Drupal is a platform used by million of websites worlwide and its performance can in most cases be compared after measured.
In Acquia we do dozens of performance assessments per year, and even in most clients we find the same problems, often we find situations that only can be detected when measured and analized when looking to a profiler report.
In this session, I will explain how to detect performance problems looking to simple data, from logs to profiler data and providing some nice targets that can be analyzed to understand what is causing the uncommon bad performance of a site.
Alfresco Share provides a rich platform for further development, allowing you to tweak and customize to your heart’s content, using only lightweight scripting and templating. But with great power, comes great responsibility, as they say. So this session looks at what it means to customize Share, before discussing how best to go about it, with tips and tricks based on real-world examples.
An overview of all the different content related technologies at the Apache Software Foundation
Talk from ApacheCon NA 2010 in Atlanta in November 2010
Walks through the top 8 improvements coming to Drupal 8, including videos and code samples to demonstrate "before vs. after."
Given to the @DrupalNS meet up in Bedford, Nova Scotia on July 28, 2014.
This introduction to Drupal 6 was presented to the Chicago Web Professionals meetup as the third in a series of CMS introductions (following WordPress and Joomla)
This PPT gives information about:
1.Drupal overview,
2.basic concepts and terminology of Drupal,
3. Basic Site Building Concepts
4. Advantages
5. Disadvantages
6. Drupal Terminology
Evolution of Drupal and the Drupal communityAngela Byron
The Drupal project has experienced phenomenal growth over its more than 14 years, growing from a small hobby project to over 1 million known installations, over 1 million Drupal.org users, and more than doubling the active contributors and commits in Drupal core between Drupal 7 and Drupal 8, as well as thousands of people who depend on Drupal in some way for a living.
This talk will "de-mystify" some recent developments in the community, from the technical direction of Drupal 8, to various project governance changes, to the increasing role of the Drupal Association on Drupal.org. We'll look at both the historical context that brought those changes about, and talk about how they'll help us scale to the next 1 million sites and users.
Presentation on itPage, an open-source content management system (CMS) for the Lasso Professional language. Presenter is Eric Landmann of Iterate LLC, Madison, WI, given at the Lasso Developer's Conference, Oct. 1-4, 2009, Amsterdam.
Front End page speed performance improvements for DrupalAndy Kucharski
If you are a developer or business manager with responsibilities over your website, then check out this deck..
What will you learn?
The webinar, created by our Founder and CEO, Andy Kucharski, is a highly accessible, information-rich review on the ways Drupal site performance can be radically improved. Some of the main topics we will cover include:
What is slow site speed?
What tools to use to diagnose it.
Plus six key improvements to make Drupal “run fast!”
And if that’s not already enough, we will also share some best practices monitoring tips for making sure you know how the Drupal server is performing 24/7.
Drupal 8 brings a lot of changes. Many standby contributed modules are now included with Drupal Core, and many small changes add up to the most exciting Drupal release yet! We'll walk through many of the biggest changes, highlighting how Drupal 8 will accelerate your web development and provide tools to make Drupal the best content management platform on any device.
Performance metrics for a social network.
Presentation on Fashiolista's usage of Newrelic, Statsd/Graphite and PgFouine to say on top of load times.
See the blogost at
http://www.mellowmorning.com
Web Performance tuning presentation given at http://www.chippewavalleycodecamp.com/
Covers basic http flow, measuring performance, common changes to improve performance now, and several tools and techniques you can use now.
Hangfire
An easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required.
Why Background Processing?
Lengthy operations like updating lot of records in DB
Checking every 2 hours for new data or files
Invoice generation at the end of every billing period
Monthly Reporting
Rebuild data, indexes or search-optimized index after data change
Automatic subscription renewal
Regular Mailings
Send an email due to an action
Background service provisioning
DrupalSouth 2015 - Performance: Not an AfterthoughtNick Santamaria
Nick Santamaria's performance and scalability presentation from DrupalSouth 2015.
https://melbourne2015.drupal.org.au/session/performance-not-afterthought
My talking points for the presentation on optimization of modern web applications. It is a huge topic, and I concentrated mostly on technical aspects of it.
Drupal Europe 2018: Hackers automate but the drupal community still downloads...hernanibf
“Automatic Updates for Drupal” was, is and will be a matter of debate. In this open discussion, we want to welcome everyone who wants to learn more about the current state of update processes within the Drupal Community, and especially about possible future scenarios in Drupal.
We welcome everyone who’s interested in joining the discussion about auto update possibilities and bringing in critical reflections.
Aiming for automatic updates - Drupal Dev Days Lisbon 2018hernanibf
Drupal recents security updates resulted in many hours of work for different professionals involved in maintenance of Drupal websites from developers to operations teams.
New Drupal 8 release cycle is also requiring organisations to spend more time guaranteeing that their websites are following last minor core release so their sites are updated and ready to receive new features and security updates.
Nevertheless, even with the increasing required effort, we still don’t have an easy way to support automatic updates in Drupal core but options start to appear.
In this session I will talk about different possible alternatives that can minimize the effort to automatically update Drupal while still maintaining best practices in all the required phases.
1. My
site
is
slow
Hernâni
Borges
de
Freitas
Technical
Consultant
hernani@acquia.com
@hernanibf
Madrid,
20th
October,
2012
2. About
me
• .PT
• Acquia
Professional
Services
EMEA
• Technical
Consultant
• Drupal*
many
things
• Travel
lover
• Twitter.com/hernanibf
My
site
is
slow
3. About
us
• Expert Drupal Support
• Optimized Drupal hosting
• Dev Cloud
• Managed Cloud
• Foster Drupal adoption
• Commons
• Drupalgardens.com
• Dev Desktop
My
site
is
slow
4. What
does
my
team
do
?
• Drupal
Jumpstarts
• Architecture
Workshops
• Discovery
workshops
• Site
Audits
• Performance
Assessment
• Security
Audits
• On-‐site
Consulting
My
site
is
slow
5. This is how it starts
My site is slow.
My
site
is
slow
6. This is what usually follows.
We already added We are thinking about
5 more adding more mysql
webservers...
slaves…
We added nginx,
We need more
changed MySql
granularity in slow
Version, added
query logs.
memcache...
We are sure the We tried to patch
problem is in boost module to
PHP Version.
serve our needs.
My
site
is
slow
7. But sometimes it’s even worst.
“We need to rebuild
this site from We need to uber-cache
scratch”.
the whole site.
We will export the
We can’t handle this
site to pure HTML
traffic with Drupal .
and ditch the CMS.
It’s time to move
to node.js
My
site
is
slow
8. The
main
problem
?
Every site is different
• Act
without
analyzing,
thinking
and
measuring.
• Before
touching
your
application
/
server
stack,
you
need:
• Data
about
current
performance
of
production
system.
• Data
about
what
you
are
doing
My
site
is
slow
9. What
you
mean?
“It’s
slow”?
• Backend
slowness
• Services
that
website
use
are
slow
or
unresponsive
(dbs)
• Application
too
complex
• Server
resources
overload
• Frontend
slowness
• Too
many
assets
• Slow
connection
between
browser
and
server.
• JS
slowing
the
DOM
(re)rendering
My
site
is
slow
10. Always true
“If your site is slow, before installing boost, varnish,
last caching module goodie, last crazy technique
you read in a blog, you need to stop and
install your brain.”.
Specially true for sites with:
• Authenticated users.
• Access Control.
• Lots of complexity and
interactions.
My
site
is
slow
11. Science
Base your work in what you can prove
• Find
good
data
that
you
can
use
to
measure.
• Find
good
profiling
data
you
can
use
to
analyze.
• Implement
improvements
for
the
problems
found.
• Measure
again.
My
site
is
slow
12. Data
about
your
site
Understanding
how
much
time
are
you
taking
per
page
You
need
data
to
understand
your
current
situation
and
compare
after
your
changes.
• Apache
logs
with
rendering
times
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
[31/Jan/2008:14:19:07 +0000] "GET / HTTP/1.1" 200 7918 ”" 0/95491
• Accesslog
from
statistics
table
Aid Title Path Ip Uid Timer Timestamp
23557145 Directory node/465 10.156.11.248 2632 7262806 1346855808
23557361 home 10.156.11.248 9263 6967768 1346856897
23557399 home 10.156.11.248 7904 6690128 1346856985
23557081 Search search/node/how2=register=lovefilm 8058
10.156.11.248 6509745 1346855538
My
site
is
slow
13. NewRelic.com
Extra insight about how are you doing
My
site
is
slow
14. Google
Analytics
site
speed
Be sure you know how fast you are delivering front end
My
site
is
slow
15. Analyze
on
a
deeper
level
Generate
your
own
data
• XhProf
• XhProfCli
Aggregates
data
from
XhProf
profiling
data
from
a
set
of
pages.
https://github.com/msonnabaum/XHProfCLI
My
site
is
slow
16. What
you
need
to
find
Before you do anything else
• Find
average/individual
page
load
times.
• Find
average/individual
page
memory
consumption.
• Identify
problematic
pages.
• Compare
time
wasted
in
CPU
vs
Waiting
for
IO.
• Identify
problematic
components
(blocks,
views,
components).
My
site
is
slow
17. Profile
Time for some research
Look
for
pages
you
suspect
• Start
by
easy
ones
• 404
page
(the
fastest
page
you
can
get).
• Node
view
page
• Homepage
• Continue
with
the
ones
your
data
marked
as
slow.
My
site
is
slow
18. Benchmarks
Ideally
your
normal
pages
should
take
• 1
~
1.5
sec
• 40
~
60
mb
of
memory
• 100~300
queries
per
page
Simpler
pages
like
404
are
good
indicators
of
what
is
the
fastest
all
other
pages
will
run.
Measure
pages
for
normal
users,
not
for
super
admin
without
access
checks
and
the
heavy
admin_menu
in
all
pages...
My
site
is
slow
19. Profiling
tools
Chasing
it
• Use
Devel
module
(
http://drupal.org/project/devel
)
to
have
a
fast
indication
of
page
load
times
and
memory
consumption.
• Use
XhProf
to
profile
the
page
and
understand
slower
components.
• Use
timer_start(),
timer_read()
functions
in
situations
where
you
are
unsure.
Short Demo
My
site
is
slow
20. Typical
#1
–
The
single
SLOOOOW
Query
My
site
is
slow
21. Typical
#1
–
The
single
SLOOOOW
Query
• First
look
to
profiling
data
shows
something
really
slow.
Devel
XhProf
Problem
• Related to the database (Wall time vs Total Time).
• Number of queries is low, so probably it’s a single query.
• Unfortunately, occurs in a specially visited page.
• Unfortunately, they are not usually single.
My
site
is
slow
22. Typical
#1
–
The
single
SLOOOOW
Query
• Not
indexed
queries,
views
query
with
a
lot
of
nodes,
SELECT node.nid AS nid, users.picture AS users_picture, users.uid AS users_uid, users.name AS
users_name, users.mail AS users_mail, node.title AS node_title, GREATEST(node.changed,
node_comment_statistics.last_comment_timestamp) AS node_comment_statistics_last_updated
FROM node node
INNER JOIN users users ON node.uid = users.uid
INNER JOIN node_comment_statistics node_comment_statistics ON node.nid =
node_comment_statistics.nid
ORDER BY node_comment_statistics_last_updated DESC
• Count(*)
queries
by
views
pagers
with
a
lot
of
nodes
in
InnoDb.
My
site
is
slow
23. Typical
#2
–
The
super
fast
queries
My
site
is
slow
24. Typical
#2
–
The
super
fast
queries
Devel
XhProf
Problem
• High number of queries
• High memory consumption
• High number of function calls
• All those little queries and memory consumption mean that you
are loading lots of information from the database.
My
site
is
slow
25. Typical
#2
–
The
super
fast
queries
Usually
• Big Menus with lots of menu items.
• Page contains elements that are slow to render (several views,
minipanels in megamenu, nodes loaded everywhere).
• Nodes/users/menus being loaded all the time:
Search-result.tpl.php
<?php
$nid = $result[node]->nid;
$node = node_load($nid);
My
site
is
slow
26. Typical
#3
–
The
castaway
• Edge conditions that occur in every page load
// we will need to mark users who saw the xmas page
function xmas_init() {
global $user;
$user->xmas_count++;
user_save($user);
variable_set(‘xmas_is_coming’, 1);
}
// connect to webservice to get information and show in footer homepage
function hook_footer() {
$webservice = new WeatherService();
$weather_c = $webservice->get('weather', 'Madrid');
if ($_GET['q'] == 'home')
return t('%degrees degrees.', array('%degrees', $weather_c));
}
My
site
is
slow
27. Typical
#3
–
The
castaway
• Edge conditions that occur in every page load
// we will need to mark users who saw the xmas page
function xmas_init() {
global $user;
$user = add_xmas_tree_to_user($user);
user_save($user);
variable_set(‘xmas_is_coming’, 1);
}
// connect to webservice to get information and show in footer homepage
function hook_footer() {
$webservice = new WeatherService();
$weather_c = $webservice->get('weather', 'Madrid');
if ($_GET['q'] == 'home')
return t('%degrees degrees.', array('%degrees', $weather_c));
}
My
site
is
slow
28. Typical
#3
–
The
castaway
• More common things on this topic
• Blocks rendered. But not shown.
• Menus computed to a special task. But not used.
• Theme_rebuild and cache_clear_all in middle of
code.Yes code executed in frontend pages.
My
site
is
slow
30. Typical
#4
–
The
missile
killer
• Usually
a
task
executed
in
special
situations
or
in
certain
pages
that
seriously
slows
down
the
platform.
• Synchronizations
of
thousand
of
nodes
from
web
services.
• Synchronization
of
all
user
base
from
LDAP.
• Sending
thousand
of
mails
via
Cron.
• Saving
a
node,
clearing
the
full
cache.
• Even
worst
when
those
tasks
are
called
by
frontend
pages.
My
site
is
slow
31. Typical
#5
–
Killing
me
softly
• Several
small
percentages
take
as
much
hit
as
a
big
one.
• It’s
almost
18%
of
all
page
load
times
to
simply
render
Google
Analytics
Js.
• Look
to
sections
or
functions
that
take
more
than
10%
of
time
and
look
if
they
can
be
improved.
My
site
is
slow
32. Solutions
After you identified the problems
1. Reduce
complexity.
Make
sure
your
site
is
as
slim
as
possible.
2. Cache
where
you
can.
At
all
levels.
3. Maintain
cache
as
longer
as
possible
until
it
is
acceptable.
4. Compute
behind
the
scenes
when
you
can.
5. Distribute
the
heavier
tasks
to
larger
intervals.
6. Grow
infrastructure
if
you
are
reaching
server
limits.
My
site
is
slow
33. Performance
Can
it
be
cached?
Cache
it!
• Page
caching,
block
caching,
panels
caching,
views
caching,
caching
API..
• Review
caching
strategy:
• https://www.acquia.com/blog/when-‐and-‐how-‐caching-‐can-‐
save-‐your-‐site-‐part-‐2-‐authenticated-‐users
• Guarantee
that
caching
is
effectively
helping
you.
• Don t
clear
it
too
often.
• Not
used
only
by
a
minority.
My
site
is
slow
34. Measuring
in
high
load
• With
sample
load
• Locally
Jmeter
with
a
list
of
urls
• With
decent
load
• Blazemeter
• Blitz.io
• Measure
again
a
subset
of
results.
My
site
is
slow
35. So,
before
your
questions.
I
do
have
a
question.
Would
you
like
to
join
Acquia?
We are hiring EVERYWHERE!
• Consultants
• Support
• Sales
• Engineering