(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
MySQL For Linux Sysadmins
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
MySQL	
  For	
  Linux	
  
Sysadmins
Morgan	
  Tocker	
  
MySQL	
  Community	
  Manager	
  
August,	
  2014
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Safe	
  Harbor	
  Statement
The	
  following	
  is	
  intended	
  to	
  outline	
  our	
  general	
  product	
  direction.	
  
It	
  is	
  intended	
  for	
  information	
  purposes	
  only,	
  and	
  may	
  not	
  be	
  
incorporated	
  into	
  any	
  contract.	
  It	
  is	
  not	
  a	
  commitment	
  to	
  deliver	
  
any	
  material,	
  code,	
  or	
  functionality,	
  and	
  should	
  not	
  be	
  relied	
  upon	
  
in	
  making	
  purchasing	
  decisions.	
  The	
  development,	
  release,	
  and	
  
timing	
  of	
  any	
  features	
  or	
  functionality	
  described	
  for	
  Oracle’s	
  
products	
  remains	
  at	
  the	
  sole	
  discretion	
  of	
  Oracle.
Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
3
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
4
Program	
  Agenda
Introduction	
  
MySQL	
  Architecture	
  
Backup	
  &	
  Replication	
  
Performance	
  &	
  Capacity	
  Planning
1
2
3
4
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
The	
  Career	
  Path	
  to	
  DBA
• Start	
  as	
  a	
  Developer	
  
• Start	
  as	
  a	
  Sysadmin	
  
• Train	
  to	
  be	
  a	
  DBA
5
Usually either #1 or #2.
I started as a Developer
}
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Non	
  Exhaustive	
  List	
  of	
  Duties
• Backup	
  
• Replication	
  
• Patching	
  &	
  Upgrades	
  
• Performance	
  and	
  Capacity	
  Planning	
  
• Coaching	
  &	
  Mentoring	
  
• Fighting	
  Fires
6
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
7
Program	
  Agenda
Introduction	
  
MySQL	
  Architecture	
  
Backup	
  &	
  Replication	
  
Performance	
  &	
  Capacity	
  Planning
1
2
3
4
2
1
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
About	
  MySQL
• Version	
  numbers	
  are	
  misleading:	
  
• 5.5	
  to	
  5.6	
  was	
  the	
  biggest	
  upgrade	
  in	
  history	
  
• 5.6.xx	
  
• Micro-­‐release	
  approximately	
  every	
  2	
  months.	
  
• Fixes	
  bugs	
  and	
  security	
  vulnerabilities.
8
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
About	
  MySQL	
  (cont.)
• 5.7.xx	
  
• Current	
  focus	
  of	
  development.	
  
• Release	
  cycle	
  is	
  2-­‐3	
  years.	
  
• 5.5	
  and	
  5.6	
  are	
  under	
  active	
  support.
9
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
10
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Storage	
  Engines	
  in	
  MySQL
• InnoDB	
  (default)	
  
• MyISAM	
  (previous	
  default)	
  
• NDB	
  Cluster	
  
• Other
11
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Memory	
  Usage
• Databases	
  like	
  to	
  allocate	
  large	
  amounts	
  of	
  memory	
  
for	
  caches	
  
• Better	
  to	
  run	
  with	
  smaller	
  caches	
  than	
  swap	
  
• Kind	
  of	
  works	
  as	
  “double	
  buffering”	
  of	
  operating	
  
system	
  caches
12
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
MySQL	
  Server
• Single	
  process	
  of	
  mysqld	
  
• Supervisor	
  process	
  is	
  mysqld_safe	
  
• Each	
  new	
  MySQL	
  connection	
  consumes	
  a	
  thread	
  
• With	
  the	
  server	
  maintaining	
  a	
  small	
  thread	
  cache
13
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
14
Transaction
System
StorageCaching
SYS_TABLES
ibdata1
space0
Page Cache
A.ibd
B.ibd
C.ibd
IBUF_HEADER
IBUF_TREE
TRX_SYS
FIRST_RSEG
DICT_HDR
Data Dict.
SYS_COLUMNS
SYS_INDEXES
SYS_FIELDS
Block 1 (64 pages)
Block 2 (64 pages)
iblogfile0 iblogfile1 iblogfile2
Tables with
file_per_tableDoublewrite Buffer
BufferPool
Data Dictionary Cache
Adaptive Hash Indexes
Buffer Pool LRU
Additional Mem Pool
Log Buffer
LogGroup
Buffer Pool Flush List
In Memory
On Diskhttps://github.com/jeremycole/innodb_diagrams
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
15
InnoDBTransaction
System
StorageCaching
SYS_TABLES
ibdata1
space0
Page Cache
A.ibd
B.ibd
C.ibd
IBUF_HEADER
IBUF_TREE
TRX_SYS
FIRST_RSEG
DICT_HDR
Data Dict.
SYS_COLUMNS
SYS_INDEXES
SYS_FIELDS
Block 1 (64 pages)
Block 2 (64 pages)
iblogfile0 iblogfile1 iblogfile2
Tables with
file_per_tableDoublewrite Buffer
BufferPool Data Dictionary Cache
Adaptive Hash Indexes
Buffer Pool LRU
Additional Mem Pool
Log Buffer LogGroup
Buffer Pool Flush List
SELECT * FROM a
WHERE id = 10;
mysqld
Not Found
Query	
  -­‐	
  Non	
  Cached
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
16
InnoDBTransaction
System
StorageCaching
SYS_TABLES
ibdata1
space0
Page Cache
A.ibd
B.ibd
C.ibd
IBUF_HEADER
IBUF_TREE
TRX_SYS
FIRST_RSEG
DICT_HDR
Data Dict.
SYS_COLUMNS
SYS_INDEXES
SYS_FIELDS
Block 1 (64 pages)
Block 2 (64 pages)
iblogfile0 iblogfile1 iblogfile2
Tables with
file_per_tableDoublewrite Buffer
BufferPool Data Dictionary Cache
Adaptive Hash Indexes
Buffer Pool LRU
Additional Mem Pool
Log Buffer LogGroup
Buffer Pool Flush List
SELECT * FROM a
WHERE id = 10;
mysqld
Query	
  -­‐	
  Cached
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
17
Update	
  Query	
  in	
  a	
  	
  
Transaction	
  (simplified)
InnoDB
Transaction
System
StorageCaching
SYS_TABLES
ibdata1
space0
Page Cache
A.ibd
B.ibd
C.ibd
IBUF_HEADER
IBUF_TREE
TRX_SYS
FIRST_RSEG
DICT_HDR
Data Dict.
SYS_COLUMNS
SYS_INDEXES
SYS_FIELDS
Block 1 (64 pages)
Block 2 (64 pages)
iblogfile0 iblogfile1 iblogfile2
Tables with
file_per_tableDoublewrite Buffer
BufferPool
Data Dictionary Cache
Adaptive Hash Indexes
Buffer Pool LRU
Additional Mem Pool
Log Buffer
LogGroup
Buffer Pool Flush List
UPDATE a SET col1 =
‘new’ WHERE id = 10;
mysqld
commit;
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Log	
  Files
• Provide	
  recovery.	
  
• Only	
  written	
  to	
  in	
  regular	
  operation.	
  
• Read	
  only	
  required	
  if	
  there	
  is	
  a	
  crash.	
  
• Are	
  rewritten	
  over-­‐and-­‐over	
  again.	
  
• Think	
  of	
  it	
  like	
  a	
  tank	
  tread.
18
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
19
Program	
  Agenda
Introduction	
  
MySQL	
  Architecture	
  
Backup	
  &	
  Replication	
  
Performance	
  &	
  Capacity	
  Planning
1
2
3
4
1
3
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Backup	
  (Theory)
• Cold	
  
• Warm	
  
• Hot
20
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Backup	
  Consistency
• Must	
  represent	
  a	
  single	
  point	
  in	
  time
21
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 22
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 23
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 24
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 25
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
4 Savvy Squirrel Global
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
4 4 # Savvy Squirrels
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
6 4 Premium Acorn $999
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 26
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
4 Savvy Squirrel Global
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
4 4 # Savvy Squirrels
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
6 4 Premium Acorn $999
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 27
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
4 Savvy Squirrel Global
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
4 4 # Savvy Squirrels
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
6 4 Premium Acorn $999
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | 28
customerid name
1 Acorn Enterprises
2 First National Squirrel Bank
3 Squirrels 5000 Inc
4 Savvy Squirrel Global
invoiceid customerid ...
1 1 # Acorn Enterprises
2 1 # Acorn Enterprises
3 3 # Squirrels 5000 Inc
4 4 # Savvy Squirrels
customer
invoice
itemid invoiceid Description Amount
1 1 1 hrs Professional
Services
$10
2 2 Acorn Parts $12.50
3 2 5 hrs Professional
Services
$50
4 3 Delivery Fee $17.50
5 3 Replacement
Acorn
$20
6 4 Premium Acorn $999
invoice_item
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Backup	
  Methods
• mysqldump	
  
• Is	
  warm	
  by	
  default.	
  	
  Can	
  safely	
  be	
  set	
  hot	
  if	
  all	
  InnoDB.	
  
• Logical	
  backup.	
  	
  Slow	
  to	
  recover.	
  
• Snapshot	
  Based	
  -­‐	
  i.e.	
  LVM	
  snapshot.	
  
• Consistent	
  +	
  Hot	
  
• May	
  have	
  higher	
  impact	
  during	
  snapshot	
  phase.	
  
• Best	
  used	
  with	
  a	
  script	
  like	
  mylvmbackup.
29
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Backup	
  Methods	
  (cont.)
• MySQL	
  Enterprise	
  Backup	
  
• Commercial	
  Tool	
  
• Hot	
  with	
  InnoDB.	
  	
  Warm	
  for	
  MyISAM	
  phase	
  
• Low	
  Impact
30
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
How	
  to	
  Decide?
• MTTR	
  of	
  logical	
  backups	
  is	
  much	
  higher.	
  
• Most	
  failures	
  are	
  accidents	
  (either	
  by	
  DBA	
  or	
  user).	
  
• “I	
  accidentally	
  updated	
  the	
  phone	
  number	
  of	
  the	
  
wrong	
  customer!”
31
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Replication
• Built	
  in	
  to	
  MySQL	
  
• Easy	
  to	
  setup	
  and	
  get	
  running	
  
• Uses	
  same	
  port	
  3306	
  
• Most	
  deployments	
  will	
  use	
  Replication
32
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Replication	
  Options
• Row	
  Format	
  
• Statement	
  Based	
  (default)	
  
• Row	
  Based	
  
• Global	
  Transaction	
  IDs	
  
• Semi-­‐Synchronous	
  
• Time	
  delayed
33
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
34
Program	
  Agenda
Introduction	
  
MySQL	
  Architecture	
  
Backup	
  &	
  Replication	
  
Performance	
  &	
  Capacity	
  Planning
1
2
3
4
1
4
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Quality	
  of	
  Service
• Often	
  better	
  to	
  let	
  one	
  too	
  demanding	
  user	
  go	
  
unserviced	
  than	
  all	
  users	
  go	
  unserviced	
  
• Statement	
  Timeout	
  coming	
  to	
  MySQL	
  5.7.
35
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Quality	
  of	
  Service	
  (cont.)
• Replication	
  Slaves,	
  Hadoop	
  very	
  useful.	
  
• Important	
  to	
  Optimize	
  for	
  Response	
  Time	
  (user	
  facing)	
  
before	
  sub	
  optimizing	
  for	
  background	
  tasks.
36
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Configuration
Most	
  important	
  settings
• innodb_buffer_pool_size	
  -­‐	
  50-­‐80%	
  of	
  memory	
  
• innodb_log_file_size	
  -­‐	
  up	
  to	
  4G	
  quite	
  safe
37
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Configuration
Also	
  Useful
• innodb_flush_method	
  
• innodb_flush_neighbors	
  
• innodb_io_capacity	
  and	
  innodb_lru_scan_depth	
  
• Explained	
  here:	
  
• http://www.tocker.ca/2013/09/17/what-­‐to-­‐tune-­‐in-­‐
mysql-­‐56-­‐after-­‐installation.html
38
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
How	
  much	
  can	
  you	
  expect	
  from	
  config?
Versus	
  other	
  optimizations
• Optimizing	
  Queries	
  is	
  critical	
  to	
  performance	
  
• SQL	
  is	
  hard	
  
• Easy	
  to	
  write	
  
• Hard	
  to	
  sight	
  check	
  for	
  performance
39
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
How	
  to	
  find	
  slow	
  queries?
• Pro-­‐active:	
  
• Design	
  or	
  review	
  all	
  schema	
  and	
  queries.	
  
• Re-­‐active:	
  
• Find	
  worst	
  offenders	
  and	
  suggest	
  improvements	
  to	
  
development	
  staff.
40
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Realistic	
  Compromise
• Query	
  and	
  index	
  usage	
  changes	
  over	
  time	
  
• You	
  have	
  to	
  have	
  tools	
  in	
  place	
  to	
  find	
  slow	
  SQL	
  
• We	
  release	
  MySQL	
  Enterprise	
  Monitor	
  for	
  this	
  purpose
41
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Hardware	
  Choices
• Frequently	
  memory	
  is	
  under-­‐provisioned	
  
• http://rhaas.blogspot.ca/2014/08/memory-­‐
matters.html	
  (PostgreSQL)	
  
• http://www.tocker.ca/2013/05/10/twice-­‐as-­‐much-­‐
ram-­‐does-­‐not-­‐equal-­‐twice-­‐as-­‐fast.html	
  (Me;	
  MySQL)
42
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Hardware	
  Choices	
  (cont.)
• SSD	
  transition	
  is	
  real	
  
• But	
  still	
  better	
  to	
  buy	
  more	
  memory	
  first	
  
• Database	
  need	
  to	
  write	
  for	
  persistence.	
  	
  Heavier	
  IO	
  
requirements	
  than	
  any	
  other	
  tier
43
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
Hardware	
  Choices	
  (cont.)
• More	
  CPUs	
  can	
  mean	
  more	
  consistent	
  performance	
  
• Some	
  level	
  of	
  scale	
  up	
  +	
  scale	
  out	
  is	
  best:	
  
• http://www.tocker.ca/2014/04/22/five-­‐reasons-­‐why-­‐
vertical-­‐scalability-­‐matters.html	
  
44
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |
Non	
  Exhaustive	
  List	
  of	
  Duties
• Backup	
  
• Replication	
  
• Patching	
  &	
  Upgrades	
  
• Performance	
  and	
  Capacity	
  Planning	
  
• Coaching	
  &	
  Mentoring	
  
• Fighting	
  Fires
45
Copyright	
  ©	
  2014	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  | Oracle	
  Confidential	
  –	
  Internal/Restricted/Highly	
  Restricted
46
MySQL For Linux Sysadmins

More Related Content

What's hot

MySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMySQL 5.7: Core Server Changes
MySQL 5.7: Core Server Changes
Morgan Tocker
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
Morgan Tocker
 
InnoDB Tablespace Encryption
InnoDB Tablespace Encryption InnoDB Tablespace Encryption
InnoDB Tablespace Encryption
Satya Bodapati
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
Oleksii(Alexey) Porytskyi
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
Mario Beck
 
Optimizing MySQL
Optimizing MySQLOptimizing MySQL
Optimizing MySQL
Morgan Tocker
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
Abel Flórez
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
Dave Stokes
 
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
Dave Stokes
 
Locking and Concurrency Control
Locking and Concurrency ControlLocking and Concurrency Control
Locking and Concurrency Control
Morgan Tocker
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Jaime Crespo
 
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
Dave Stokes
 
MySQL partitioning
MySQL partitioning MySQL partitioning
MySQL partitioning
OracleMySQL
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
Mark Swarbrick
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
Ted Wennmark
 
Understanding MySql locking issues
Understanding MySql locking issuesUnderstanding MySql locking issues
Understanding MySql locking issues
Om Vikram Thapa
 
Barcelona mysqlnd qc
Barcelona mysqlnd qcBarcelona mysqlnd qc
Barcelona mysqlnd qc
Anis Berejeb
 

What's hot (20)

MySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMySQL 5.7: Core Server Changes
MySQL 5.7: Core Server Changes
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
InnoDB Tablespace Encryption
InnoDB Tablespace Encryption InnoDB Tablespace Encryption
InnoDB Tablespace Encryption
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
Optimizing MySQL
Optimizing MySQLOptimizing MySQL
Optimizing MySQL
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
 
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
 
Locking and Concurrency Control
Locking and Concurrency ControlLocking and Concurrency Control
Locking and Concurrency Control
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
 
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
 
MySQL partitioning
MySQL partitioning MySQL partitioning
MySQL partitioning
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
Understanding MySql locking issues
Understanding MySql locking issuesUnderstanding MySql locking issues
Understanding MySql locking issues
 
Barcelona mysqlnd qc
Barcelona mysqlnd qcBarcelona mysqlnd qc
Barcelona mysqlnd qc
 

Viewers also liked

The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Morgan Tocker
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
Tuyen Vuong
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
webhostingguy
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
Morgan Tocker
 
Mastering InnoDB Diagnostics
Mastering InnoDB DiagnosticsMastering InnoDB Diagnostics
Mastering InnoDB Diagnostics
guest8212a5
 
1&1 MySQL Experience at SkySQL Roadshow
1&1 MySQL Experience at SkySQL Roadshow1&1 MySQL Experience at SkySQL Roadshow
1&1 MySQL Experience at SkySQL Roadshow
MariaDB Corporation
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
Ted Wennmark
 
MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and Engine
Abdul Manaf
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
Fuenteovejuna
 
MariaDB: Connect Storage Engine
MariaDB: Connect Storage EngineMariaDB: Connect Storage Engine
MariaDB: Connect Storage Engine
Kangaroot
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
Mark Swarbrick
 
Web vulnerability seminar2
Web vulnerability seminar2Web vulnerability seminar2
Web vulnerability seminar2
Sakuya Izayoi
 
GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항
정명훈 Jerry Jeong
 
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
sprdd
 
The care and feeding of a MySQL database
The care and feeding of a MySQL databaseThe care and feeding of a MySQL database
The care and feeding of a MySQL database
Dave Stokes
 
Performance Schema in MySQL (Danil Zburivsky)
Performance Schema in MySQL (Danil Zburivsky)Performance Schema in MySQL (Danil Zburivsky)
Performance Schema in MySQL (Danil Zburivsky)
Ontico
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS Schema
Ted Wennmark
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011
Graham Weldon
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
Sveta Smirnova
 

Viewers also liked (19)

The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
Mastering InnoDB Diagnostics
Mastering InnoDB DiagnosticsMastering InnoDB Diagnostics
Mastering InnoDB Diagnostics
 
1&1 MySQL Experience at SkySQL Roadshow
1&1 MySQL Experience at SkySQL Roadshow1&1 MySQL Experience at SkySQL Roadshow
1&1 MySQL Experience at SkySQL Roadshow
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
 
MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and Engine
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
 
MariaDB: Connect Storage Engine
MariaDB: Connect Storage EngineMariaDB: Connect Storage Engine
MariaDB: Connect Storage Engine
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
Web vulnerability seminar2
Web vulnerability seminar2Web vulnerability seminar2
Web vulnerability seminar2
 
GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항
 
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
 
The care and feeding of a MySQL database
The care and feeding of a MySQL databaseThe care and feeding of a MySQL database
The care and feeding of a MySQL database
 
Performance Schema in MySQL (Danil Zburivsky)
Performance Schema in MySQL (Danil Zburivsky)Performance Schema in MySQL (Danil Zburivsky)
Performance Schema in MySQL (Danil Zburivsky)
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS Schema
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
 

Similar to MySQL For Linux Sysadmins

Apouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12cApouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12c
OUGTH Oracle User Group in Thailand
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
Ted Wennmark
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of Choice
Mark Swarbrick
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
Mario Beck
 
Updated Power of the AWR Warehouse, Dallas, HQ, etc.
Updated Power of the AWR Warehouse, Dallas, HQ, etc.Updated Power of the AWR Warehouse, Dallas, HQ, etc.
Updated Power of the AWR Warehouse, Dallas, HQ, etc.
Kellyn Pot'Vin-Gorman
 
New data dictionary an internal server api that matters
New data dictionary an internal server api that mattersNew data dictionary an internal server api that matters
New data dictionary an internal server api that matters
Alexander Nozdrin
 
Power of the AWR Warehouse
Power of the AWR WarehousePower of the AWR Warehouse
Power of the AWR Warehouse
Kellyn Pot'Vin-Gorman
 
Power of the AWR Warehouse- HotSos Symposium 2015
Power of the AWR Warehouse-  HotSos Symposium 2015Power of the AWR Warehouse-  HotSos Symposium 2015
Power of the AWR Warehouse- HotSos Symposium 2015
Kellyn Pot'Vin-Gorman
 
OOW-TBE-12c-CON7307-Sharable
OOW-TBE-12c-CON7307-SharableOOW-TBE-12c-CON7307-Sharable
OOW-TBE-12c-CON7307-Sharable
Obaidur (OB) Rashid
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
Mark Swarbrick
 
Oracle database in cloud, dr in cloud and overview of oracle database 18c
Oracle database in cloud, dr in cloud and overview of oracle database 18cOracle database in cloud, dr in cloud and overview of oracle database 18c
Oracle database in cloud, dr in cloud and overview of oracle database 18c
AiougVizagChapter
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Mark Matthews
 
Oracle NoSQL
Oracle NoSQLOracle NoSQL
Oracle NoSQL
Oracle Korea
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster
Fran Navarro
 
Oracle EM12c Release 4 New Features!
Oracle EM12c Release 4 New Features!Oracle EM12c Release 4 New Features!
Oracle EM12c Release 4 New Features!
Kellyn Pot'Vin-Gorman
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
AiougVizagChapter
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
MySQL Brasil
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
Kellyn Pot'Vin-Gorman
 
Kscope Not Your Father's Enterprise Manager
Kscope Not Your Father's Enterprise ManagerKscope Not Your Father's Enterprise Manager
Kscope Not Your Father's Enterprise Manager
Kellyn Pot'Vin-Gorman
 
Coherence 12.1.3 hidden gems
Coherence 12.1.3 hidden gemsCoherence 12.1.3 hidden gems
Coherence 12.1.3 hidden gems
harvraja
 

Similar to MySQL For Linux Sysadmins (20)

Apouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12cApouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12c
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
MySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of ChoiceMySQL London Tech Tour March 2015 - Embedded Database of Choice
MySQL London Tech Tour March 2015 - Embedded Database of Choice
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
Updated Power of the AWR Warehouse, Dallas, HQ, etc.
Updated Power of the AWR Warehouse, Dallas, HQ, etc.Updated Power of the AWR Warehouse, Dallas, HQ, etc.
Updated Power of the AWR Warehouse, Dallas, HQ, etc.
 
New data dictionary an internal server api that matters
New data dictionary an internal server api that mattersNew data dictionary an internal server api that matters
New data dictionary an internal server api that matters
 
Power of the AWR Warehouse
Power of the AWR WarehousePower of the AWR Warehouse
Power of the AWR Warehouse
 
Power of the AWR Warehouse- HotSos Symposium 2015
Power of the AWR Warehouse-  HotSos Symposium 2015Power of the AWR Warehouse-  HotSos Symposium 2015
Power of the AWR Warehouse- HotSos Symposium 2015
 
OOW-TBE-12c-CON7307-Sharable
OOW-TBE-12c-CON7307-SharableOOW-TBE-12c-CON7307-Sharable
OOW-TBE-12c-CON7307-Sharable
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
Oracle database in cloud, dr in cloud and overview of oracle database 18c
Oracle database in cloud, dr in cloud and overview of oracle database 18cOracle database in cloud, dr in cloud and overview of oracle database 18c
Oracle database in cloud, dr in cloud and overview of oracle database 18c
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
Oracle NoSQL
Oracle NoSQLOracle NoSQL
Oracle NoSQL
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster
 
Oracle EM12c Release 4 New Features!
Oracle EM12c Release 4 New Features!Oracle EM12c Release 4 New Features!
Oracle EM12c Release 4 New Features!
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
Kscope Not Your Father's Enterprise Manager
Kscope Not Your Father's Enterprise ManagerKscope Not Your Father's Enterprise Manager
Kscope Not Your Father's Enterprise Manager
 
Coherence 12.1.3 hidden gems
Coherence 12.1.3 hidden gemsCoherence 12.1.3 hidden gems
Coherence 12.1.3 hidden gems
 

More from Morgan Tocker

Introducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeIntroducing Spirit - Online Schema Change
Introducing Spirit - Online Schema Change
Morgan Tocker
 
MySQL Usability Guidelines
MySQL Usability GuidelinesMySQL Usability Guidelines
MySQL Usability Guidelines
Morgan Tocker
 
My First 90 days with Vitess
My First 90 days with VitessMy First 90 days with Vitess
My First 90 days with Vitess
Morgan Tocker
 
FOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends DevroomFOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends Devroom
Morgan Tocker
 
Introducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live FrankfurtIntroducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live Frankfurt
Morgan Tocker
 
TiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup GroupTiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup Group
Morgan Tocker
 
TiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupTiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL Meetup
Morgan Tocker
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
Morgan Tocker
 
MySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer Guide
Morgan Tocker
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
Morgan Tocker
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
Morgan Tocker
 

More from Morgan Tocker (11)

Introducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeIntroducing Spirit - Online Schema Change
Introducing Spirit - Online Schema Change
 
MySQL Usability Guidelines
MySQL Usability GuidelinesMySQL Usability Guidelines
MySQL Usability Guidelines
 
My First 90 days with Vitess
My First 90 days with VitessMy First 90 days with Vitess
My First 90 days with Vitess
 
FOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends DevroomFOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends Devroom
 
Introducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live FrankfurtIntroducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live Frankfurt
 
TiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup GroupTiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup Group
 
TiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupTiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL Meetup
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
MySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer Guide
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
 

Recently uploaded

BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
Ortus Solutions, Corp
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Asher Sterkin
 
Panvel @Call @Girls Whatsapp 9833363713 With High Profile Offer
Panvel @Call @Girls Whatsapp 9833363713 With High Profile OfferPanvel @Call @Girls Whatsapp 9833363713 With High Profile Offer
Panvel @Call @Girls Whatsapp 9833363713 With High Profile Offer
$A19
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
Ortus Solutions, Corp
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
Ortus Solutions, Corp
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
avufu
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
AUGNYC
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
e-Definers Technology
 
ANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdfANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdf
sachin chaurasia
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Estuary Flow
 
@ℂall @Girls Kolkata ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
@ℂall @Girls Kolkata  ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe@ℂall @Girls Kolkata  ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
@ℂall @Girls Kolkata ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Misti Soneji
 
How to Break Your App with Playwright Tests
How to Break Your App with Playwright TestsHow to Break Your App with Playwright Tests
How to Break Your App with Playwright Tests
Ortus Solutions, Corp
 
Development of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML TechnologiesDevelopment of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML Technologies
MaisnamLuwangPibarel
 
mobile-app-development-company-in-noida.pdf
mobile-app-development-company-in-noida.pdfmobile-app-development-company-in-noida.pdf
mobile-app-development-company-in-noida.pdf
Mobile App Development Company in Noida - Drona Infotech
 
YouTube SEO Mastery ......................
YouTube SEO Mastery ......................YouTube SEO Mastery ......................
YouTube SEO Mastery ......................
islamiato717
 
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
 @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S... @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
Mona Rathore
 
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdf
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdfNon-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdf
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdf
kalichargn70th171
 
dachnug51 - HCL Domino Roadmap .pdf
dachnug51 - HCL Domino Roadmap      .pdfdachnug51 - HCL Domino Roadmap      .pdf
dachnug51 - HCL Domino Roadmap .pdf
DNUG e.V.
 
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
Hironori Washizaki
 

Recently uploaded (20)

BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
 
Panvel @Call @Girls Whatsapp 9833363713 With High Profile Offer
Panvel @Call @Girls Whatsapp 9833363713 With High Profile OfferPanvel @Call @Girls Whatsapp 9833363713 With High Profile Offer
Panvel @Call @Girls Whatsapp 9833363713 With High Profile Offer
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
 
Migrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS CloudMigrate your Infrastructure to the AWS Cloud
Migrate your Infrastructure to the AWS Cloud
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
 
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
一比一原版英国牛津大学毕业证(oxon毕业证书)如何办理
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
 
ANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdfANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdf
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
 
@ℂall @Girls Kolkata ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
@ℂall @Girls Kolkata  ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe@ℂall @Girls Kolkata  ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
@ℂall @Girls Kolkata ꧁❤ 000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
How to Break Your App with Playwright Tests
How to Break Your App with Playwright TestsHow to Break Your App with Playwright Tests
How to Break Your App with Playwright Tests
 
Development of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML TechnologiesDevelopment of Chatbot Using AI\ML Technologies
Development of Chatbot Using AI\ML Technologies
 
mobile-app-development-company-in-noida.pdf
mobile-app-development-company-in-noida.pdfmobile-app-development-company-in-noida.pdf
mobile-app-development-company-in-noida.pdf
 
YouTube SEO Mastery ......................
YouTube SEO Mastery ......................YouTube SEO Mastery ......................
YouTube SEO Mastery ......................
 
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
 @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S... @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
 
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdf
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdfNon-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdf
Non-Functional Testing Guide_ Exploring Its Types, Importance and Tools.pdf
 
dachnug51 - HCL Domino Roadmap .pdf
dachnug51 - HCL Domino Roadmap      .pdfdachnug51 - HCL Domino Roadmap      .pdf
dachnug51 - HCL Domino Roadmap .pdf
 
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
 

MySQL For Linux Sysadmins

  • 2. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | MySQL  For  Linux   Sysadmins Morgan  Tocker   MySQL  Community  Manager   August,  2014
  • 3. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Safe  Harbor  Statement The  following  is  intended  to  outline  our  general  product  direction.   It  is  intended  for  information  purposes  only,  and  may  not  be   incorporated  into  any  contract.  It  is  not  a  commitment  to  deliver   any  material,  code,  or  functionality,  and  should  not  be  relied  upon   in  making  purchasing  decisions.  The  development,  release,  and   timing  of  any  features  or  functionality  described  for  Oracle’s   products  remains  at  the  sole  discretion  of  Oracle. Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 3
  • 4. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 4 Program  Agenda Introduction   MySQL  Architecture   Backup  &  Replication   Performance  &  Capacity  Planning 1 2 3 4
  • 5. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | The  Career  Path  to  DBA • Start  as  a  Developer   • Start  as  a  Sysadmin   • Train  to  be  a  DBA 5 Usually either #1 or #2. I started as a Developer }
  • 6. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Non  Exhaustive  List  of  Duties • Backup   • Replication   • Patching  &  Upgrades   • Performance  and  Capacity  Planning   • Coaching  &  Mentoring   • Fighting  Fires 6
  • 7. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 7 Program  Agenda Introduction   MySQL  Architecture   Backup  &  Replication   Performance  &  Capacity  Planning 1 2 3 4 2 1
  • 8. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | About  MySQL • Version  numbers  are  misleading:   • 5.5  to  5.6  was  the  biggest  upgrade  in  history   • 5.6.xx   • Micro-­‐release  approximately  every  2  months.   • Fixes  bugs  and  security  vulnerabilities. 8
  • 9. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | About  MySQL  (cont.) • 5.7.xx   • Current  focus  of  development.   • Release  cycle  is  2-­‐3  years.   • 5.5  and  5.6  are  under  active  support. 9
  • 10. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 10
  • 11. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Storage  Engines  in  MySQL • InnoDB  (default)   • MyISAM  (previous  default)   • NDB  Cluster   • Other 11
  • 12. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Memory  Usage • Databases  like  to  allocate  large  amounts  of  memory   for  caches   • Better  to  run  with  smaller  caches  than  swap   • Kind  of  works  as  “double  buffering”  of  operating   system  caches 12
  • 13. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted MySQL  Server • Single  process  of  mysqld   • Supervisor  process  is  mysqld_safe   • Each  new  MySQL  connection  consumes  a  thread   • With  the  server  maintaining  a  small  thread  cache 13
  • 14. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 14 Transaction System StorageCaching SYS_TABLES ibdata1 space0 Page Cache A.ibd B.ibd C.ibd IBUF_HEADER IBUF_TREE TRX_SYS FIRST_RSEG DICT_HDR Data Dict. SYS_COLUMNS SYS_INDEXES SYS_FIELDS Block 1 (64 pages) Block 2 (64 pages) iblogfile0 iblogfile1 iblogfile2 Tables with file_per_tableDoublewrite Buffer BufferPool Data Dictionary Cache Adaptive Hash Indexes Buffer Pool LRU Additional Mem Pool Log Buffer LogGroup Buffer Pool Flush List In Memory On Diskhttps://github.com/jeremycole/innodb_diagrams
  • 15. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 15 InnoDBTransaction System StorageCaching SYS_TABLES ibdata1 space0 Page Cache A.ibd B.ibd C.ibd IBUF_HEADER IBUF_TREE TRX_SYS FIRST_RSEG DICT_HDR Data Dict. SYS_COLUMNS SYS_INDEXES SYS_FIELDS Block 1 (64 pages) Block 2 (64 pages) iblogfile0 iblogfile1 iblogfile2 Tables with file_per_tableDoublewrite Buffer BufferPool Data Dictionary Cache Adaptive Hash Indexes Buffer Pool LRU Additional Mem Pool Log Buffer LogGroup Buffer Pool Flush List SELECT * FROM a WHERE id = 10; mysqld Not Found Query  -­‐  Non  Cached
  • 16. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 16 InnoDBTransaction System StorageCaching SYS_TABLES ibdata1 space0 Page Cache A.ibd B.ibd C.ibd IBUF_HEADER IBUF_TREE TRX_SYS FIRST_RSEG DICT_HDR Data Dict. SYS_COLUMNS SYS_INDEXES SYS_FIELDS Block 1 (64 pages) Block 2 (64 pages) iblogfile0 iblogfile1 iblogfile2 Tables with file_per_tableDoublewrite Buffer BufferPool Data Dictionary Cache Adaptive Hash Indexes Buffer Pool LRU Additional Mem Pool Log Buffer LogGroup Buffer Pool Flush List SELECT * FROM a WHERE id = 10; mysqld Query  -­‐  Cached
  • 17. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 17 Update  Query  in  a     Transaction  (simplified) InnoDB Transaction System StorageCaching SYS_TABLES ibdata1 space0 Page Cache A.ibd B.ibd C.ibd IBUF_HEADER IBUF_TREE TRX_SYS FIRST_RSEG DICT_HDR Data Dict. SYS_COLUMNS SYS_INDEXES SYS_FIELDS Block 1 (64 pages) Block 2 (64 pages) iblogfile0 iblogfile1 iblogfile2 Tables with file_per_tableDoublewrite Buffer BufferPool Data Dictionary Cache Adaptive Hash Indexes Buffer Pool LRU Additional Mem Pool Log Buffer LogGroup Buffer Pool Flush List UPDATE a SET col1 = ‘new’ WHERE id = 10; mysqld commit;
  • 18. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Log  Files • Provide  recovery.   • Only  written  to  in  regular  operation.   • Read  only  required  if  there  is  a  crash.   • Are  rewritten  over-­‐and-­‐over  again.   • Think  of  it  like  a  tank  tread. 18
  • 19. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 19 Program  Agenda Introduction   MySQL  Architecture   Backup  &  Replication   Performance  &  Capacity  Planning 1 2 3 4 1 3
  • 20. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Backup  (Theory) • Cold   • Warm   • Hot 20
  • 21. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Backup  Consistency • Must  represent  a  single  point  in  time 21
  • 22. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 22 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 invoice_item
  • 23. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 23 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 invoice_item
  • 24. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 24 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 invoice_item
  • 25. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 25 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc 4 Savvy Squirrel Global invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc 4 4 # Savvy Squirrels customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 6 4 Premium Acorn $999 invoice_item
  • 26. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 26 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc 4 Savvy Squirrel Global invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc 4 4 # Savvy Squirrels customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 6 4 Premium Acorn $999 invoice_item
  • 27. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 27 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc 4 Savvy Squirrel Global invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc 4 4 # Savvy Squirrels customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 6 4 Premium Acorn $999 invoice_item
  • 28. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | 28 customerid name 1 Acorn Enterprises 2 First National Squirrel Bank 3 Squirrels 5000 Inc 4 Savvy Squirrel Global invoiceid customerid ... 1 1 # Acorn Enterprises 2 1 # Acorn Enterprises 3 3 # Squirrels 5000 Inc 4 4 # Savvy Squirrels customer invoice itemid invoiceid Description Amount 1 1 1 hrs Professional Services $10 2 2 Acorn Parts $12.50 3 2 5 hrs Professional Services $50 4 3 Delivery Fee $17.50 5 3 Replacement Acorn $20 6 4 Premium Acorn $999 invoice_item
  • 29. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Backup  Methods • mysqldump   • Is  warm  by  default.    Can  safely  be  set  hot  if  all  InnoDB.   • Logical  backup.    Slow  to  recover.   • Snapshot  Based  -­‐  i.e.  LVM  snapshot.   • Consistent  +  Hot   • May  have  higher  impact  during  snapshot  phase.   • Best  used  with  a  script  like  mylvmbackup. 29
  • 30. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Backup  Methods  (cont.) • MySQL  Enterprise  Backup   • Commercial  Tool   • Hot  with  InnoDB.    Warm  for  MyISAM  phase   • Low  Impact 30
  • 31. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | How  to  Decide? • MTTR  of  logical  backups  is  much  higher.   • Most  failures  are  accidents  (either  by  DBA  or  user).   • “I  accidentally  updated  the  phone  number  of  the   wrong  customer!” 31
  • 32. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Replication • Built  in  to  MySQL   • Easy  to  setup  and  get  running   • Uses  same  port  3306   • Most  deployments  will  use  Replication 32
  • 33. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Replication  Options • Row  Format   • Statement  Based  (default)   • Row  Based   • Global  Transaction  IDs   • Semi-­‐Synchronous   • Time  delayed 33
  • 34. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 34 Program  Agenda Introduction   MySQL  Architecture   Backup  &  Replication   Performance  &  Capacity  Planning 1 2 3 4 1 4
  • 35. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Quality  of  Service • Often  better  to  let  one  too  demanding  user  go   unserviced  than  all  users  go  unserviced   • Statement  Timeout  coming  to  MySQL  5.7. 35
  • 36. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Quality  of  Service  (cont.) • Replication  Slaves,  Hadoop  very  useful.   • Important  to  Optimize  for  Response  Time  (user  facing)   before  sub  optimizing  for  background  tasks. 36
  • 37. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Configuration Most  important  settings • innodb_buffer_pool_size  -­‐  50-­‐80%  of  memory   • innodb_log_file_size  -­‐  up  to  4G  quite  safe 37
  • 38. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Configuration Also  Useful • innodb_flush_method   • innodb_flush_neighbors   • innodb_io_capacity  and  innodb_lru_scan_depth   • Explained  here:   • http://www.tocker.ca/2013/09/17/what-­‐to-­‐tune-­‐in-­‐ mysql-­‐56-­‐after-­‐installation.html 38
  • 39. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted How  much  can  you  expect  from  config? Versus  other  optimizations • Optimizing  Queries  is  critical  to  performance   • SQL  is  hard   • Easy  to  write   • Hard  to  sight  check  for  performance 39
  • 40. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted How  to  find  slow  queries? • Pro-­‐active:   • Design  or  review  all  schema  and  queries.   • Re-­‐active:   • Find  worst  offenders  and  suggest  improvements  to   development  staff. 40
  • 41. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Realistic  Compromise • Query  and  index  usage  changes  over  time   • You  have  to  have  tools  in  place  to  find  slow  SQL   • We  release  MySQL  Enterprise  Monitor  for  this  purpose 41
  • 42. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Hardware  Choices • Frequently  memory  is  under-­‐provisioned   • http://rhaas.blogspot.ca/2014/08/memory-­‐ matters.html  (PostgreSQL)   • http://www.tocker.ca/2013/05/10/twice-­‐as-­‐much-­‐ ram-­‐does-­‐not-­‐equal-­‐twice-­‐as-­‐fast.html  (Me;  MySQL) 42
  • 43. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Hardware  Choices  (cont.) • SSD  transition  is  real   • But  still  better  to  buy  more  memory  first   • Database  need  to  write  for  persistence.    Heavier  IO   requirements  than  any  other  tier 43
  • 44. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted Hardware  Choices  (cont.) • More  CPUs  can  mean  more  consistent  performance   • Some  level  of  scale  up  +  scale  out  is  best:   • http://www.tocker.ca/2014/04/22/five-­‐reasons-­‐why-­‐ vertical-­‐scalability-­‐matters.html   44
  • 45. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Non  Exhaustive  List  of  Duties • Backup   • Replication   • Patching  &  Upgrades   • Performance  and  Capacity  Planning   • Coaching  &  Mentoring   • Fighting  Fires 45
  • 46. Copyright  ©  2014  Oracle  and/or  its  affiliates.  All  rights  reserved.    | Oracle  Confidential  –  Internal/Restricted/Highly  Restricted 46