SlideShare a Scribd company logo
1 of 53
Download to read offline
© Ibuildings 2014/2015 - All rights reserved
#DrupalDaysEU
Optimizing MariaDB
for Drupal
and other Web Applications
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Gold Sponsors
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Media Sponsors
Silver Sponsors
© Ibuildings 2014/2015 - All rights reserved
Speaker Info
Federico Razzoli
Database Engineer
federico@ibuildings.it
© Ibuildings 2014/2015 - All rights reserved
MariaDB Essentials
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
MySQL fork
●
Created by Monty Widenius
●
Protected and promoted by the MariaDB Foundation
●
Supported by the community
●
"Community" includes Google, Facebook, Twitter...
●
Compatible with MySQL
What is MariaDB?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Monty Widenius has two daughters called
●
My
●
Maria
Incidentally, he created two DBMSs with the same names :)
Genesis of a name
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
mysql is the command-line client. To run it:
mysql -uroot -p
●
Any MySQL GUI will work with MariaDB. Recommended ones are:
●
SQLyog on Linux
●
HeidiSQL on Windows
●
phpMyAdmin is ok if you can't run a GUI locally
MariaDB clients
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Configuration file:
●
/etc/mysql/my.cnf (on Debian, Ubuntu, etc)
●
my.cnf (on Windows)
Setting a variable at runtime:
SET GLOBAL variable_name = 'value';
Starting the server with a particular setting:
mysql --variable-name=value
Configuring MariaDB
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
datadir = /var/mysql
max_connections = 200
lock_wait_timeout = 60
max_packet_size = 2M
For most variables, default parameters work fine.
Configuring more than 10 variables is generally wrong.
Basic Configuration
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Clients connect to MariaDB server and send queries.
The workflow of a query processing is:
●
Connection manager
●
Query Cache
●
Parser
●
Optimizer
●
Storage engines
MariaDB architecture
© Ibuildings 2014/2015 - All rights reserved
Drivers (connectors)
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Generic truths:
●
MySQL drivers work with MariaDB
●
MySQL drivers do not support some MariaDB specific features:
●
Non-blocking API
●
Progress reporting
●
ODBC drivers work with MariaDB
Drivers (connectors)
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
PHP doesn't have a specific MariaDB driver
●
PHP has 3 modules for MySQL:
●
mysql (not supported anymore)
●
mysqli (most performant)
●
PDO (abstract layer)
●
Drupal uses PDO; it's ok
PHP drivers
© Ibuildings 2014/2015 - All rights reserved
Connection Methods
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Thread per connection
●
Pool of threads
Connection methods:
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Traditional method, used by MySQL; still the default one
●
When a connection is opened, a new thread is created
●
When a connection is closed, the thread is destroyed
●
On a simple web page, 1 click opens needs a connection
●
With AJAX, an open page can periodically create many connections
●
With Drupal, more plugins = more connections
Constantly creating and destroying threads cause an overhead.
Therefore this connection method well suites to desktop applications, not to web
applications.
Thread per connection
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Connections are handled by one or more pools
●
Usually, one pool per core
●
No need to often create / destroy threads
●
Doesn't suite to environments where some long queries could be executed together
●
root will still be able to connect with the traditional method to kill long running queries
Perfect for web applications, as long as we don't "lock" the cores with long running
queries.
Pool of threads
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
To use Thread per connection... do nothing. It's the default method.
To use Pool of threads:
connection_method = pool-of-threads
Choosing a connection method
© Ibuildings 2014/2015 - All rights reserved
Query Cache
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Can be disabled
●
When a query is issued, MariaDB looks in the cache for in an identical way
●
If the query is found, MariaDB returns the whole resultset
●
Otherwise, it executes the query and caches it
●
While doing so, it probably has to evict an old query from the cache
Query Cache
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Short answer: NONO.
Should I use Query Cache?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Long answer:
●
Query Cache needs a lot of memory
●
Whole resultsets are stored. Rows returned by 10 queries are stored 5 times.
●
Data invalidation
●
Every time a table is modified, all queries that mention that tables are invalidated.
●
Overhead
●
Looking for a query in the cache has a cost.
Should I use Query Cache?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
query_cache_type = OFF
query_cache_size = 0
Disabling Query Cache
© Ibuildings 2014/2015 - All rights reserved
Storage Engines
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Storage Engines are a particular type of plugins.
They implement data access:
●
data format (compression level, etc)
●
indexing
●
caching
●
special features, like transactions, foreign keys..
Storage Engines: an overview
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
If you are uncertain, just use InnoDB. It's impressive for most workloads.
MySQL is only focusing on InnoDB, ignoring the other Storage Engines.
But:
●
Each storage engine is optimized for some types of workload.
●
Storage Engines can do special things.
Why don't we have only one Storage Engine?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
InnoDB - Fast, reliable for OLTP.
MEMORY - Data are written in memory, not on disk
MyISAM - Simple. Doesn't support transactions.
Aria - A crash-safe MyISAM
ARCHIVE - Compressed append-only tables
TokuDB - Reduces I/O; great compression level
BLACKHOLE - A Black Hole that makes data disappear
SPIDER - Connects to remote servers
CONNECT - Reads data files or remote DBMS's as if they were local tables
OQGRAPH - Handles trees and graphs
...and others.
Which Storage Engines exist?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
InnoDB is faster for a typical workload.
MyISAM does not support transactions: rows are written immediately.
A MyISAM table can be compressed (it becomes read-only).
Aria is crash-safe: if tables are damaged, you can always recover data.
Drupal uses InnoDB for most table, and MyISAM for:
●
Logs
●
Caches
InnoDB vs. MyISAM vs. Aria
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
innodb_buffer_pool_size = <a_lot_of_memory>
innodb_log_buffer_size = 64M (at least)
innodb_lock_wait_timeout = 30
InnoDB basic configuration
© Ibuildings 2014/2015 - All rights reserved
Optimizer
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Receives a request and (tries to) find the best execution strategy
●
For simple applications, it usually succeeds
●
But if s query is slow, the optimizer probably failed to elaborate a good query plan
MariaDB Optimizer
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Slow Query Log
slow_query_log = ON
long_query_time = 5
log_queries_not_using_indexes = ON
min_examined_row_limit = 100
Restart MariaDB and run your application.
Then, just open the slow query log file and see which queries are slow.
One step behind...
how do I know which queries are slow?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Imagine you are searching a book for a specific information.
Reading the whole book wouldn't be an efficient method.
Fortunately, books start with an index. The index allows us to read a small amount of text
to find information.
Table indexes are similar to book indexes: they allow MariaDB to quickly find the rows we
are looking for.
What are those index things you mentioned?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
An index can consist of one or more columns
●
An index can be built on whole columns or prefix (for text columns)
●
There are no ascending/descending indexes (MariaDB/MySQL limitation)
Index essentials
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Almost all operators in the WHERE clause:
●
=, <, >, >=, <=, IN, BETWEEN, LIKE
●
JOIN
●
GROUP BY
●
ORDER BY
Supported operations:
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
A sufficient number of rows will be examined
●
Index has a sufficient number of unique values
●
MariaDB can use whole index or the leftmost part
(yes, columns order matters)
●
With functions, indexes cannot be used:
SELECT * FROM my_table WHERE CHAR_LENGTH(indexed_column) = 1;
When are indexes used?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Indexes:
CREATE INDEX idx_user ON username (username);
CREATE INDEX idx_userpass ON username (username, password);
CREATE INDEX idx_birthdate_user ON username (birth_date, username);
Queries:
SELECT username, password FROM users WHERE username = 'batman';
SELECT username FROM users WHERE username LIKE 'batman%';
SELECT username FROM users WHERE username LIKE '%batman%';
Leftmost part?
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
CREATE INDEX idx_a ON my_table (a);
CREATE INDEX idx_b ON my_table (b);
CREATE INDEX idx_abc ON my_table (a, b, c);
SELECT * FROM my_table WHERE a = 1 AND c = 1;
SELECT * FROM my_table WHERE a = 1 AND b = 1;
SELECT * FROM my_table WHERE a = 1 OR b = 1 OR c = 1;
SELECT * FROM my_table WHERE a = 1 OR b = 1;
Indexes: AND, OR
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Sometimes, we think that an index can be used to speedup a query,
but we are wrong.
Sometimes an index can be used, but the optimizer chooses to discard it.
There could be a good reason for this, but the optimizer can be wrong.
If a query is slow, we need to check if it uses a good index:
EXPLAIN EXTENDED SELECT …
The output of EXPLAIN can optionally be included in the Slow Query Log.
EXPLAIN statement
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
EXPLAIN returns a row for each table that is read by the query.
The rows are sorted.
There are several columns. The most important are:
●
table_name: Name of a table read by the query.
●
possible_keys: List of indexes that could be used.
●
key: The index choosen by the optimizer.
●
extra: Extra information; for example, wether
an internal temporary table is used.
EXPLAIN statement
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Everyone knows/remembers JOIN?
JOIN "links" two tables.
SELECT u.username, p.title
FROM users u
JOIN posts p
ON u.id = p.author;
SELECT u.username, p.title, c.text
FROM users u
JOIN posts p
ON u.id = p.author
LEFT JOIN comments c
ON p.id = c.post_id;
JOIN optimization
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Suppose that we have the following tables:
users: 30 rows
posts: 2,000 rows
comments: 10,000 rows
●
SELECT … FROM users JOIN posts JOIN comments
This query is completely non-optimized.
●
SELECT … FROM comments JOIN posts JOIN comments
will read 10,000 rows; for each row: 2,000; for each match: 10
The optimizer will determine the best JOIN order.... maybe.
JOIN optimization
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
The optimzer will choose a bad JOIN order if it doesn't know the number of rows in a
table, or the number of unique values in a column.
Solutions:
●
ANALYZE TABLE comments;
●
use_stat_tables = complementary
●
SELECT STRAIGHT_JOIN … FROM t1 JOIN t2
JOIN optimization
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
GROUP BY and ORDER BY can take advantage of indexes.
CREATE INDEX idx_a ON my_table (a, b);
SELECT * FROM my_table GROUP BY a;
SELECT * FROM my_table ORDER BY a;
SELECT * FROM my_table GROUP BY a ORDER BY a;
SELECT * FROM my_table WHERE a < 100 GROUP BY a ORDER BY a;
SELECT * FROM my_table WHERE a > b GROUP BY a ORDER BY a;
SELECT * FROM my_table WHERE b < 100 GROUP BY a ORDER BY a;
Optimization of grouping and ordering
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
If WHERE, GROUP BY and ORDER BY use different columns,
MariaDB creates a temporary table, in memory or on disk,
CREATE INDEX idx_a ON my_table (a, b, c);
SELECT * FROM my_table WHERE a < 100 GROUP BY b ORDER BY b;
SELECT * FROM my_table WHERE a > b GROUP BY a ORDER BY b;
SELECT * FROM my_table WHERE c < 100 GROUP BY a ORDER BY a;
Try to avoid this when a big amount of data is examined!
Optimization of grouping and ordering
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Some queries can only be executed by using temporary tables:
SELECT c.id, u.users_num
FROM (
SELECT city_id, COUNT(*) AS users_num
FROM users
GROUP BY city) u
JOIN city c ON u.city_id = c.id;
Often, these queries can be rewritten to avoid using a temp table:
SELECT c.id, COUNT(u.id) AS users_num
FROM city c
JOIN user u
ON c.id = u.city_id
GROUP BY c.id;
Internal temporary tables
© Ibuildings 2014/2015 - All rights reserved
Debugging problems
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
error_log = <file_name>
If not specified, errors are written:
●
to the console (on Linux)
●
on a file with a default name (onWindows)
Error Log
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
To start logging SQL errors:
INSTALL SONAME 'sql_errlog';
To rotate the log:
SET GLOBAL sql_error_log_rotate = 1;
To stop logging:
UNINSTALL SONAME 'sql_errlog';
FLUSH TABLES;
SQL Error Log
© Ibuildings 2014/2015 - All rights reserved
General Advices
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
●
Don't assume that something will work in practice just because it works in theory
●
Don't assume that theory is useless just because it doesn't work
●
In MariaDB, things always happen for a reason
●
.Well, a complex set of reasons, in fact
●
When you don't understand, investigate. Read the docs. Experiment.
●
Dirty solutions won't save time. Especially if you're sure they will.
General advices
#DrupalDaysEU
© Ibuildings 2014/2015 - All rights reserved
Search the web for:
●
MariaDB Knowledge Base (KB)
●
MySQL documentation (for information missing in the KB)
●
MySQL Performance Blog (Percona)
●
planet.mysql.com
●
MariaDB mailing lists on Launchpad
Good resources

More Related Content

Viewers also liked

Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)Eugenio Minardi
 
Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015
Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015
Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015Eugenio Minardi
 
Secure Drupal, from start to finish (European Drupal Days 2015)
Secure Drupal, from start to finish (European Drupal Days 2015)Secure Drupal, from start to finish (European Drupal Days 2015)
Secure Drupal, from start to finish (European Drupal Days 2015)Eugenio Minardi
 
The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)Eugenio Minardi
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Eugenio Minardi
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Eugenio Minardi
 
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)Eugenio Minardi
 
Drupal for Big Data - is it ready? (European Drupal Days 2015)
Drupal for Big Data - is it ready? (European Drupal Days 2015)Drupal for Big Data - is it ready? (European Drupal Days 2015)
Drupal for Big Data - is it ready? (European Drupal Days 2015)Eugenio Minardi
 
Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)Eugenio Minardi
 
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)Eugenio Minardi
 
A Practical Introduction to Symfony (European Drupal Days 2015)
A Practical Introduction to Symfony (European Drupal Days 2015)A Practical Introduction to Symfony (European Drupal Days 2015)
A Practical Introduction to Symfony (European Drupal Days 2015)Eugenio Minardi
 

Viewers also liked (11)

Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
Deploying an Open Source DAM in SAAS Mode (European Drupal Days 2015)
 
Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015
Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015
Sponsorship Opportunities European Drupal Days & Dutch PHP Conference 2015
 
Secure Drupal, from start to finish (European Drupal Days 2015)
Secure Drupal, from start to finish (European Drupal Days 2015)Secure Drupal, from start to finish (European Drupal Days 2015)
Secure Drupal, from start to finish (European Drupal Days 2015)
 
The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)
 
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
Verifying Drupal modules with OWASP ASVS 2014 (European Drupal Days 2015)
 
Drupal for Big Data - is it ready? (European Drupal Days 2015)
Drupal for Big Data - is it ready? (European Drupal Days 2015)Drupal for Big Data - is it ready? (European Drupal Days 2015)
Drupal for Big Data - is it ready? (European Drupal Days 2015)
 
Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)Drupal Continuous Integration (European Drupal Days 2015)
Drupal Continuous Integration (European Drupal Days 2015)
 
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
UN World Food Programme Standards & Best Practises (European Drupal Days 2015)
 
A Practical Introduction to Symfony (European Drupal Days 2015)
A Practical Introduction to Symfony (European Drupal Days 2015)A Practical Introduction to Symfony (European Drupal Days 2015)
A Practical Introduction to Symfony (European Drupal Days 2015)
 

Similar to Optimizing MariaDB for Web Applications (European Drupal Days 2015)

MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksDave Stokes
 
Secure Drupal, from start to finish
Secure Drupal, from start to finishSecure Drupal, from start to finish
Secure Drupal, from start to finishBoy Baukema
 
Another Copernican Revolution: maintenance first, projects second (European D...
Another Copernican Revolution: maintenance first, projects second (European D...Another Copernican Revolution: maintenance first, projects second (European D...
Another Copernican Revolution: maintenance first, projects second (European D...Eugenio Minardi
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerabilityAnn Lam
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thWong Hoi Sing Edison
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerabilityAnn Lam
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Paul McKibben
 
Verifying Drupal modules with OWASP ASVS 2014
Verifying Drupal modules with OWASP ASVS 2014Verifying Drupal modules with OWASP ASVS 2014
Verifying Drupal modules with OWASP ASVS 2014Boy Baukema
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationAmeex Technologies
 
How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?DrupalGeeks
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1Ivan Ma
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryEDB
 
Building an Apache Hadoop data application
Building an Apache Hadoop data applicationBuilding an Apache Hadoop data application
Building an Apache Hadoop data applicationtomwhite
 
Intro.to.pem webinar.slides-061913
Intro.to.pem webinar.slides-061913Intro.to.pem webinar.slides-061913
Intro.to.pem webinar.slides-061913EDB
 
Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014EDB
 
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014Dave Stokes
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®MariaDB plc
 
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsDave Stokes
 

Similar to Optimizing MariaDB for Web Applications (European Drupal Days 2015) (20)

MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disks
 
Secure Drupal, from start to finish
Secure Drupal, from start to finishSecure Drupal, from start to finish
Secure Drupal, from start to finish
 
Another Copernican Revolution: maintenance first, projects second (European D...
Another Copernican Revolution: maintenance first, projects second (European D...Another Copernican Revolution: maintenance first, projects second (European D...
Another Copernican Revolution: maintenance first, projects second (European D...
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
 
Hong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8thHong Kong Drupal User Group - Nov 8th
Hong Kong Drupal User Group - Nov 8th
 
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group   nov 8th - drupal 7.32 security vulnerabilityHong kong drupal user group   nov 8th - drupal 7.32 security vulnerability
Hong kong drupal user group nov 8th - drupal 7.32 security vulnerability
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Verifying Drupal modules with OWASP ASVS 2014
Verifying Drupal modules with OWASP ASVS 2014Verifying Drupal modules with OWASP ASVS 2014
Verifying Drupal modules with OWASP ASVS 2014
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 Migration
 
How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
 
Building an Apache Hadoop data application
Building an Apache Hadoop data applicationBuilding an Apache Hadoop data application
Building an Apache Hadoop data application
 
Intro.to.pem webinar.slides-061913
Intro.to.pem webinar.slides-061913Intro.to.pem webinar.slides-061913
Intro.to.pem webinar.slides-061913
 
Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014Top10 list planningpostgresdeployment.2014
Top10 list planningpostgresdeployment.2014
 
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
Scaling MySQl 1 to N Servers -- Los Angelese MySQL User Group Feb 2014
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®
 
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
 

More from Eugenio Minardi

Delphi and ExtJS (26 ottobre 2017)
Delphi and ExtJS (26 ottobre 2017)Delphi and ExtJS (26 ottobre 2017)
Delphi and ExtJS (26 ottobre 2017)Eugenio Minardi
 
ExtJS: La piattaforma vincente (tools)
ExtJS: La piattaforma vincente (tools)ExtJS: La piattaforma vincente (tools)
ExtJS: La piattaforma vincente (tools)Eugenio Minardi
 
ExtJS: La piattaforma vincente (multiple screens)
ExtJS: La piattaforma vincente (multiple screens)ExtJS: La piattaforma vincente (multiple screens)
ExtJS: La piattaforma vincente (multiple screens)Eugenio Minardi
 
ExtJS: La piattaforma vincente (rich UI)
ExtJS: La piattaforma vincente (rich UI)ExtJS: La piattaforma vincente (rich UI)
ExtJS: La piattaforma vincente (rich UI)Eugenio Minardi
 
ExtJS: La piattaforma vincente (class system)
ExtJS: La piattaforma vincente (class system)ExtJS: La piattaforma vincente (class system)
ExtJS: La piattaforma vincente (class system)Eugenio Minardi
 
ExtJS: La piattaforma vincente
ExtJS: La piattaforma vincenteExtJS: La piattaforma vincente
ExtJS: La piattaforma vincenteEugenio Minardi
 
Distributed Team Management: 
Pitfall, Challenges and Advantages
Distributed Team Management: 
Pitfall, Challenges and AdvantagesDistributed Team Management: 
Pitfall, Challenges and Advantages
Distributed Team Management: 
Pitfall, Challenges and AdvantagesEugenio Minardi
 
MongoDB: What, why, when
MongoDB: What, why, whenMongoDB: What, why, when
MongoDB: What, why, whenEugenio Minardi
 
Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS Eugenio Minardi
 
MEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del webMEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del webEugenio Minardi
 
Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Eugenio Minardi
 
Labortatorio di Information Design e UX con Drupal
Labortatorio di Information Design e UX con DrupalLabortatorio di Information Design e UX con Drupal
Labortatorio di Information Design e UX con DrupalEugenio Minardi
 
Drupal dashboard for dummies with d3
Drupal dashboard for dummies with d3Drupal dashboard for dummies with d3
Drupal dashboard for dummies with d3Eugenio Minardi
 

More from Eugenio Minardi (13)

Delphi and ExtJS (26 ottobre 2017)
Delphi and ExtJS (26 ottobre 2017)Delphi and ExtJS (26 ottobre 2017)
Delphi and ExtJS (26 ottobre 2017)
 
ExtJS: La piattaforma vincente (tools)
ExtJS: La piattaforma vincente (tools)ExtJS: La piattaforma vincente (tools)
ExtJS: La piattaforma vincente (tools)
 
ExtJS: La piattaforma vincente (multiple screens)
ExtJS: La piattaforma vincente (multiple screens)ExtJS: La piattaforma vincente (multiple screens)
ExtJS: La piattaforma vincente (multiple screens)
 
ExtJS: La piattaforma vincente (rich UI)
ExtJS: La piattaforma vincente (rich UI)ExtJS: La piattaforma vincente (rich UI)
ExtJS: La piattaforma vincente (rich UI)
 
ExtJS: La piattaforma vincente (class system)
ExtJS: La piattaforma vincente (class system)ExtJS: La piattaforma vincente (class system)
ExtJS: La piattaforma vincente (class system)
 
ExtJS: La piattaforma vincente
ExtJS: La piattaforma vincenteExtJS: La piattaforma vincente
ExtJS: La piattaforma vincente
 
Distributed Team Management: 
Pitfall, Challenges and Advantages
Distributed Team Management: 
Pitfall, Challenges and AdvantagesDistributed Team Management: 
Pitfall, Challenges and Advantages
Distributed Team Management: 
Pitfall, Challenges and Advantages
 
MongoDB: What, why, when
MongoDB: What, why, whenMongoDB: What, why, when
MongoDB: What, why, when
 
Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS
 
MEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del webMEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del web
 
Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8
 
Labortatorio di Information Design e UX con Drupal
Labortatorio di Information Design e UX con DrupalLabortatorio di Information Design e UX con Drupal
Labortatorio di Information Design e UX con Drupal
 
Drupal dashboard for dummies with d3
Drupal dashboard for dummies with d3Drupal dashboard for dummies with d3
Drupal dashboard for dummies with d3
 

Recently uploaded

Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirtrahman018755
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebJie Liau
 
Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...
Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...
Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...mikehavy0
 
原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样AS
 
一比一定制波士顿学院毕业证学位证书
一比一定制波士顿学院毕业证学位证书一比一定制波士顿学院毕业证学位证书
一比一定制波士顿学院毕业证学位证书A
 
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证hfkmxufye
 
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC
 
一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理AS
 
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Dewi Agency
 
一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样
一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样
一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样AS
 
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样Fi
 
原版定制美国加州大学河滨分校毕业证原件一模一样
原版定制美国加州大学河滨分校毕业证原件一模一样原版定制美国加州大学河滨分校毕业证原件一模一样
原版定制美国加州大学河滨分校毕业证原件一模一样A
 
AI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model GeneratorAI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model Generator3DailyAI1
 
APNIC Updates presented by Paul Wilson at CaribNOG 27
APNIC Updates presented by Paul Wilson at  CaribNOG 27APNIC Updates presented by Paul Wilson at  CaribNOG 27
APNIC Updates presented by Paul Wilson at CaribNOG 27APNIC
 
一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样
一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样
一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样AS
 
HUMANIZE YOUR BRAND - FREE E-WORKBOOK Download Now
HUMANIZE YOUR BRAND - FREE E-WORKBOOK Download NowHUMANIZE YOUR BRAND - FREE E-WORKBOOK Download Now
HUMANIZE YOUR BRAND - FREE E-WORKBOOK Download NowIdeoholics
 
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样AS
 
Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303Dewi Agency
 
一比一定制(USC毕业证书)美国南加州大学毕业证学位证书
一比一定制(USC毕业证书)美国南加州大学毕业证学位证书一比一定制(USC毕业证书)美国南加州大学毕业证学位证书
一比一定制(USC毕业证书)美国南加州大学毕业证学位证书Fir
 
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样asdafd
 

Recently uploaded (20)

Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirt
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 
Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...
Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...
Abortion Clinic in Kwa thema +27791653574 Kwa thema WhatsApp Abortion Clinic ...
 
原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样原版定制英国赫瑞瓦特大学毕业证原件一模一样
原版定制英国赫瑞瓦特大学毕业证原件一模一样
 
一比一定制波士顿学院毕业证学位证书
一比一定制波士顿学院毕业证学位证书一比一定制波士顿学院毕业证学位证书
一比一定制波士顿学院毕业证学位证书
 
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
 
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
 
一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理
 
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
 
一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样
一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样
一比一原版(Design毕业证书)新加坡科技设计大学毕业证原件一模一样
 
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
 
原版定制美国加州大学河滨分校毕业证原件一模一样
原版定制美国加州大学河滨分校毕业证原件一模一样原版定制美国加州大学河滨分校毕业证原件一模一样
原版定制美国加州大学河滨分校毕业证原件一模一样
 
AI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model GeneratorAI Generated 3D Models | AI 3D Model Generator
AI Generated 3D Models | AI 3D Model Generator
 
APNIC Updates presented by Paul Wilson at CaribNOG 27
APNIC Updates presented by Paul Wilson at  CaribNOG 27APNIC Updates presented by Paul Wilson at  CaribNOG 27
APNIC Updates presented by Paul Wilson at CaribNOG 27
 
一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样
一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样
一比一原版(Wintec毕业证书)新西兰怀卡托理工学院毕业证原件一模一样
 
HUMANIZE YOUR BRAND - FREE E-WORKBOOK Download Now
HUMANIZE YOUR BRAND - FREE E-WORKBOOK Download NowHUMANIZE YOUR BRAND - FREE E-WORKBOOK Download Now
HUMANIZE YOUR BRAND - FREE E-WORKBOOK Download Now
 
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
 
Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303
 
一比一定制(USC毕业证书)美国南加州大学毕业证学位证书
一比一定制(USC毕业证书)美国南加州大学毕业证学位证书一比一定制(USC毕业证书)美国南加州大学毕业证学位证书
一比一定制(USC毕业证书)美国南加州大学毕业证学位证书
 
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
 

Optimizing MariaDB for Web Applications (European Drupal Days 2015)

  • 1. © Ibuildings 2014/2015 - All rights reserved #DrupalDaysEU Optimizing MariaDB for Drupal and other Web Applications
  • 2. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Gold Sponsors
  • 3. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Media Sponsors Silver Sponsors
  • 4. © Ibuildings 2014/2015 - All rights reserved Speaker Info Federico Razzoli Database Engineer federico@ibuildings.it
  • 5. © Ibuildings 2014/2015 - All rights reserved MariaDB Essentials
  • 6. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● MySQL fork ● Created by Monty Widenius ● Protected and promoted by the MariaDB Foundation ● Supported by the community ● "Community" includes Google, Facebook, Twitter... ● Compatible with MySQL What is MariaDB?
  • 7. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Monty Widenius has two daughters called ● My ● Maria Incidentally, he created two DBMSs with the same names :) Genesis of a name
  • 8. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● mysql is the command-line client. To run it: mysql -uroot -p ● Any MySQL GUI will work with MariaDB. Recommended ones are: ● SQLyog on Linux ● HeidiSQL on Windows ● phpMyAdmin is ok if you can't run a GUI locally MariaDB clients
  • 9. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Configuration file: ● /etc/mysql/my.cnf (on Debian, Ubuntu, etc) ● my.cnf (on Windows) Setting a variable at runtime: SET GLOBAL variable_name = 'value'; Starting the server with a particular setting: mysql --variable-name=value Configuring MariaDB
  • 10. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved datadir = /var/mysql max_connections = 200 lock_wait_timeout = 60 max_packet_size = 2M For most variables, default parameters work fine. Configuring more than 10 variables is generally wrong. Basic Configuration
  • 11. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Clients connect to MariaDB server and send queries. The workflow of a query processing is: ● Connection manager ● Query Cache ● Parser ● Optimizer ● Storage engines MariaDB architecture
  • 12. © Ibuildings 2014/2015 - All rights reserved Drivers (connectors)
  • 13. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Generic truths: ● MySQL drivers work with MariaDB ● MySQL drivers do not support some MariaDB specific features: ● Non-blocking API ● Progress reporting ● ODBC drivers work with MariaDB Drivers (connectors)
  • 14. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● PHP doesn't have a specific MariaDB driver ● PHP has 3 modules for MySQL: ● mysql (not supported anymore) ● mysqli (most performant) ● PDO (abstract layer) ● Drupal uses PDO; it's ok PHP drivers
  • 15. © Ibuildings 2014/2015 - All rights reserved Connection Methods
  • 16. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Thread per connection ● Pool of threads Connection methods:
  • 17. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Traditional method, used by MySQL; still the default one ● When a connection is opened, a new thread is created ● When a connection is closed, the thread is destroyed ● On a simple web page, 1 click opens needs a connection ● With AJAX, an open page can periodically create many connections ● With Drupal, more plugins = more connections Constantly creating and destroying threads cause an overhead. Therefore this connection method well suites to desktop applications, not to web applications. Thread per connection
  • 18. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Connections are handled by one or more pools ● Usually, one pool per core ● No need to often create / destroy threads ● Doesn't suite to environments where some long queries could be executed together ● root will still be able to connect with the traditional method to kill long running queries Perfect for web applications, as long as we don't "lock" the cores with long running queries. Pool of threads
  • 19. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved To use Thread per connection... do nothing. It's the default method. To use Pool of threads: connection_method = pool-of-threads Choosing a connection method
  • 20. © Ibuildings 2014/2015 - All rights reserved Query Cache
  • 21. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Can be disabled ● When a query is issued, MariaDB looks in the cache for in an identical way ● If the query is found, MariaDB returns the whole resultset ● Otherwise, it executes the query and caches it ● While doing so, it probably has to evict an old query from the cache Query Cache
  • 22. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Short answer: NONO. Should I use Query Cache?
  • 23. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Long answer: ● Query Cache needs a lot of memory ● Whole resultsets are stored. Rows returned by 10 queries are stored 5 times. ● Data invalidation ● Every time a table is modified, all queries that mention that tables are invalidated. ● Overhead ● Looking for a query in the cache has a cost. Should I use Query Cache?
  • 24. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved query_cache_type = OFF query_cache_size = 0 Disabling Query Cache
  • 25. © Ibuildings 2014/2015 - All rights reserved Storage Engines
  • 26. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Storage Engines are a particular type of plugins. They implement data access: ● data format (compression level, etc) ● indexing ● caching ● special features, like transactions, foreign keys.. Storage Engines: an overview
  • 27. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved If you are uncertain, just use InnoDB. It's impressive for most workloads. MySQL is only focusing on InnoDB, ignoring the other Storage Engines. But: ● Each storage engine is optimized for some types of workload. ● Storage Engines can do special things. Why don't we have only one Storage Engine?
  • 28. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved InnoDB - Fast, reliable for OLTP. MEMORY - Data are written in memory, not on disk MyISAM - Simple. Doesn't support transactions. Aria - A crash-safe MyISAM ARCHIVE - Compressed append-only tables TokuDB - Reduces I/O; great compression level BLACKHOLE - A Black Hole that makes data disappear SPIDER - Connects to remote servers CONNECT - Reads data files or remote DBMS's as if they were local tables OQGRAPH - Handles trees and graphs ...and others. Which Storage Engines exist?
  • 29. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved InnoDB is faster for a typical workload. MyISAM does not support transactions: rows are written immediately. A MyISAM table can be compressed (it becomes read-only). Aria is crash-safe: if tables are damaged, you can always recover data. Drupal uses InnoDB for most table, and MyISAM for: ● Logs ● Caches InnoDB vs. MyISAM vs. Aria
  • 30. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved innodb_buffer_pool_size = <a_lot_of_memory> innodb_log_buffer_size = 64M (at least) innodb_lock_wait_timeout = 30 InnoDB basic configuration
  • 31. © Ibuildings 2014/2015 - All rights reserved Optimizer
  • 32. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Receives a request and (tries to) find the best execution strategy ● For simple applications, it usually succeeds ● But if s query is slow, the optimizer probably failed to elaborate a good query plan MariaDB Optimizer
  • 33. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Slow Query Log slow_query_log = ON long_query_time = 5 log_queries_not_using_indexes = ON min_examined_row_limit = 100 Restart MariaDB and run your application. Then, just open the slow query log file and see which queries are slow. One step behind... how do I know which queries are slow?
  • 34. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Imagine you are searching a book for a specific information. Reading the whole book wouldn't be an efficient method. Fortunately, books start with an index. The index allows us to read a small amount of text to find information. Table indexes are similar to book indexes: they allow MariaDB to quickly find the rows we are looking for. What are those index things you mentioned?
  • 35. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● An index can consist of one or more columns ● An index can be built on whole columns or prefix (for text columns) ● There are no ascending/descending indexes (MariaDB/MySQL limitation) Index essentials
  • 36. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Almost all operators in the WHERE clause: ● =, <, >, >=, <=, IN, BETWEEN, LIKE ● JOIN ● GROUP BY ● ORDER BY Supported operations:
  • 37. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● A sufficient number of rows will be examined ● Index has a sufficient number of unique values ● MariaDB can use whole index or the leftmost part (yes, columns order matters) ● With functions, indexes cannot be used: SELECT * FROM my_table WHERE CHAR_LENGTH(indexed_column) = 1; When are indexes used?
  • 38. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Indexes: CREATE INDEX idx_user ON username (username); CREATE INDEX idx_userpass ON username (username, password); CREATE INDEX idx_birthdate_user ON username (birth_date, username); Queries: SELECT username, password FROM users WHERE username = 'batman'; SELECT username FROM users WHERE username LIKE 'batman%'; SELECT username FROM users WHERE username LIKE '%batman%'; Leftmost part?
  • 39. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved CREATE INDEX idx_a ON my_table (a); CREATE INDEX idx_b ON my_table (b); CREATE INDEX idx_abc ON my_table (a, b, c); SELECT * FROM my_table WHERE a = 1 AND c = 1; SELECT * FROM my_table WHERE a = 1 AND b = 1; SELECT * FROM my_table WHERE a = 1 OR b = 1 OR c = 1; SELECT * FROM my_table WHERE a = 1 OR b = 1; Indexes: AND, OR
  • 40. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Sometimes, we think that an index can be used to speedup a query, but we are wrong. Sometimes an index can be used, but the optimizer chooses to discard it. There could be a good reason for this, but the optimizer can be wrong. If a query is slow, we need to check if it uses a good index: EXPLAIN EXTENDED SELECT … The output of EXPLAIN can optionally be included in the Slow Query Log. EXPLAIN statement
  • 41. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved EXPLAIN returns a row for each table that is read by the query. The rows are sorted. There are several columns. The most important are: ● table_name: Name of a table read by the query. ● possible_keys: List of indexes that could be used. ● key: The index choosen by the optimizer. ● extra: Extra information; for example, wether an internal temporary table is used. EXPLAIN statement
  • 42. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Everyone knows/remembers JOIN? JOIN "links" two tables. SELECT u.username, p.title FROM users u JOIN posts p ON u.id = p.author; SELECT u.username, p.title, c.text FROM users u JOIN posts p ON u.id = p.author LEFT JOIN comments c ON p.id = c.post_id; JOIN optimization
  • 43. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Suppose that we have the following tables: users: 30 rows posts: 2,000 rows comments: 10,000 rows ● SELECT … FROM users JOIN posts JOIN comments This query is completely non-optimized. ● SELECT … FROM comments JOIN posts JOIN comments will read 10,000 rows; for each row: 2,000; for each match: 10 The optimizer will determine the best JOIN order.... maybe. JOIN optimization
  • 44. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved The optimzer will choose a bad JOIN order if it doesn't know the number of rows in a table, or the number of unique values in a column. Solutions: ● ANALYZE TABLE comments; ● use_stat_tables = complementary ● SELECT STRAIGHT_JOIN … FROM t1 JOIN t2 JOIN optimization
  • 45. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved GROUP BY and ORDER BY can take advantage of indexes. CREATE INDEX idx_a ON my_table (a, b); SELECT * FROM my_table GROUP BY a; SELECT * FROM my_table ORDER BY a; SELECT * FROM my_table GROUP BY a ORDER BY a; SELECT * FROM my_table WHERE a < 100 GROUP BY a ORDER BY a; SELECT * FROM my_table WHERE a > b GROUP BY a ORDER BY a; SELECT * FROM my_table WHERE b < 100 GROUP BY a ORDER BY a; Optimization of grouping and ordering
  • 46. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved If WHERE, GROUP BY and ORDER BY use different columns, MariaDB creates a temporary table, in memory or on disk, CREATE INDEX idx_a ON my_table (a, b, c); SELECT * FROM my_table WHERE a < 100 GROUP BY b ORDER BY b; SELECT * FROM my_table WHERE a > b GROUP BY a ORDER BY b; SELECT * FROM my_table WHERE c < 100 GROUP BY a ORDER BY a; Try to avoid this when a big amount of data is examined! Optimization of grouping and ordering
  • 47. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Some queries can only be executed by using temporary tables: SELECT c.id, u.users_num FROM ( SELECT city_id, COUNT(*) AS users_num FROM users GROUP BY city) u JOIN city c ON u.city_id = c.id; Often, these queries can be rewritten to avoid using a temp table: SELECT c.id, COUNT(u.id) AS users_num FROM city c JOIN user u ON c.id = u.city_id GROUP BY c.id; Internal temporary tables
  • 48. © Ibuildings 2014/2015 - All rights reserved Debugging problems
  • 49. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved error_log = <file_name> If not specified, errors are written: ● to the console (on Linux) ● on a file with a default name (onWindows) Error Log
  • 50. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved To start logging SQL errors: INSTALL SONAME 'sql_errlog'; To rotate the log: SET GLOBAL sql_error_log_rotate = 1; To stop logging: UNINSTALL SONAME 'sql_errlog'; FLUSH TABLES; SQL Error Log
  • 51. © Ibuildings 2014/2015 - All rights reserved General Advices
  • 52. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved ● Don't assume that something will work in practice just because it works in theory ● Don't assume that theory is useless just because it doesn't work ● In MariaDB, things always happen for a reason ● .Well, a complex set of reasons, in fact ● When you don't understand, investigate. Read the docs. Experiment. ● Dirty solutions won't save time. Especially if you're sure they will. General advices
  • 53. #DrupalDaysEU © Ibuildings 2014/2015 - All rights reserved Search the web for: ● MariaDB Knowledge Base (KB) ● MySQL documentation (for information missing in the KB) ● MySQL Performance Blog (Percona) ● planet.mysql.com ● MariaDB mailing lists on Launchpad Good resources