SlideShare a Scribd company logo
1 of 52
Download to read offline
 Linux	
  Filesystems	
  and	
  MySQL
	
  
Ammon	
  Sutherland
April	
  23,	
  2013
Friday, April 26, 13
 Preface...
"Who	
  is	
  it?"	
  said	
  Arthur.
"Well,"	
  said	
  Ford,	
  "if	
  we're	
  lucky	
  it's	
  just	
  the	
  Vogons	
  
come	
  to	
  throw	
  us	
  into	
  space."
"And	
  if	
  we're	
  unlucky?"
"If	
  we're	
  unlucky,"	
  said	
  Ford	
  grimly,	
  "the	
  captain	
  might	
  
be	
  serious	
  in	
  his	
  threat	
  that	
  he's	
  going	
  to	
  read	
  us	
  some	
  of	
  
his	
  poetry	
  first	
  ..."	
  
Friday, April 26, 13
Background
• Long-­‐time	
  Linux	
  System	
  Administrator	
  turned	
  DBA
– University	
  systems
– Managed	
  Hosting
– Online	
  Auctions
– E-­‐commerce,	
  SEO,	
  marketing,	
  data-­‐mining
A	
  bit	
  of	
  an	
  optimization	
  junkie…
Once	
  in	
  a	
  while	
  I	
  share:	
  	
  http://shamallu.blogspot.com/
3
Friday, April 26, 13
Agenda
• Basic	
  Theory
– Directory	
  structure
– LVM
– RAID
– SSD
– Filesystem	
  concepts
• Filesystem	
  choices
4
• MySQL	
  Tuning
• Benchmarks
– IO	
  tests
– FS	
  maintenance
– OLTP
• AWS	
  EC2
• Conclusions
Friday, April 26, 13
 
Basic	
  Theory
5
deadlock	
  detected
we	
  rollback	
  transaction	
  two
err	
  one	
  two	
  one	
  three
-­‐	
  A	
  MySQL	
  Haiku	
  -­‐
Friday, April 26, 13
Directory	
  Structure
Things	
  that	
  must	
  be	
  stored	
  on	
  disk
• Data	
  files	
  (.ibd	
  or	
  .MYD	
  and	
  .MYI)	
  –	
  Random	
  IO
• Main	
  InnoDB	
  data	
  file	
  (ibdata1)	
  –	
  Random	
  IO
• InnoDB	
  Log	
  files	
  (ib_logfile0,	
  ib_logfile1)	
  –	
  Sequential	
  IO	
  (one	
  
at	
  a	
  time)
• Binary	
  logs	
  and	
  relay	
  logs	
  –	
  Sequential	
  IO
• General	
  query	
  log	
  and	
  Slow	
  query	
  log	
  –	
  Sequential	
  IO
• Master.info	
  –	
  technically	
  Random	
  IO
• Error	
  log	
  –	
  Infrequent	
  Sequential	
  IO
6
Friday, April 26, 13
Linux	
  IO	
  Sub-­‐System
7
Friday, April 26, 13
Hard	
  Drives
• Rotating	
  platters
• SAS	
  vs.	
  SATA
– SAS	
  6gb/s	
  connectors	
  can	
  handle	
  SATA	
  3gb/s	
  drives
– SAS	
  typically	
  cost	
  more	
  (much	
  more	
  for	
  larger	
  size)
– SAS	
  often	
  will	
  do	
  higher	
  rpm	
  rates	
  (10k,	
  15k	
  rpm)
– SAS	
  has	
  more	
  logic	
  on	
  the	
  drives
– SAS	
  has	
  more	
  data	
  consistency	
  and	
  error	
  reporting	
  logic	
  vs.	
  
SATA	
  	
  S.M.A.R.T.
– SAS	
  uses	
  higher	
  voltages	
  allowing	
  for	
  external	
  arrays	
  with	
  
longer	
  signal	
  runs
– SAS	
  does	
  TCQ	
  vs.	
  SATA	
  NCQ	
  (provides	
  some	
  similar	
  effect)
– Both	
  do	
  8b10b	
  encoding	
  (25%	
  parity	
  overhead)
8
Friday, April 26, 13
SSD
• Pros:
– Very	
  fast	
  random	
  reads	
  and	
  writes
– Handle	
  high	
  concurrency	
  very	
  well
• Cons:
– Cost	
  per	
  GB
– Lifespan	
  and	
  performance	
  depend	
  on	
  write-­‐cycles.	
  	
  Beware	
  
write	
  amplification
– Requires	
  care	
  with	
  RAID	
  cards
9
Friday, April 26, 13
RAID
Typical	
  RAID	
  Modes:
• RAID-­‐0:	
  	
  Data	
  striped,	
  no	
  redundancy	
  (2+	
  disks)
• RAID-­‐1:	
  	
  Data	
  mirrored,	
  1:1	
  redundancy	
  (2+	
  disks)
• RAID-­‐5:	
  	
  Data	
  striped	
  with	
  parity	
  (3+	
  disks)
• RAID-­‐6:	
  	
  Data	
  striped	
  with	
  double	
  parity	
  (4+	
  disks)
• RAID-­‐10:	
  	
  Data	
  striped	
  and	
  mirrored	
  (4+	
  disks)
• RAID-­‐50:	
  	
  RAID-­‐0	
  striping	
  of	
  multiple	
  RAID-­‐5	
  groups	
  (6+	
  
	
   	
   disks)
10
Friday, April 26, 13
RAID	
  (cont.)
Typical	
  RAID	
  Benefits	
  and	
  risks:
• RAID-­‐0	
  -­‐	
  Scales	
  reads	
  and	
  writes,	
  multiplies	
  space	
  (risky,	
  no	
  disks	
  can	
  fail)
• RAID-­‐1	
  -­‐	
  Scales	
  reads	
  not	
  writes,	
  no	
  additional	
  space	
  gain	
  (data	
  intact	
  
with	
  only	
  one	
  disk	
  and	
  rebuilt)
• RAID-­‐5	
  -­‐	
  Scales	
  reads	
  and	
  some	
  writes	
  (parity	
  penalty,	
  can	
  survive	
  one	
  
disk	
  failure	
  and	
  rebuild)
• RAID-­‐6	
  -­‐	
  Scales	
  reads	
  and	
  less	
  writes	
  than	
  RAID-­‐5	
  (double	
  parity	
  penalty,	
  
can	
  survive	
  2	
  disk	
  failures	
  and	
  rebuild)
• RAID-­‐10	
  -­‐	
  Scales	
  2x	
  reads	
  vs	
  writes,	
  (can	
  lose	
  up	
  to	
  two	
  disks	
  in	
  particular	
  
combinations)
• RAID-­‐50	
  -­‐	
  Scales	
  reads	
  and	
  writes	
  (can	
  lose	
  one	
  disk	
  per	
  RAID-­‐5	
  group	
  and	
  still	
  
rebuild)
11
Friday, April 26, 13
RAID	
  Cards
• Purpose:
– Offload	
  RAID	
  calculations	
  from	
  CPU,	
  including	
  parity
– Routine	
  disk	
  consistency	
  checks
– Cache
• Tips:
– Controller	
  Cache	
  is	
  best	
  mostly	
  for	
  writes
– Write-­‐back	
  cache	
  is	
  good	
  -­‐	
  Beware	
  of	
  “learn	
  cycles”
– Disk	
  Cache	
  -­‐	
  best	
  disabled	
  on	
  SAS	
  drives.	
  	
  SATA	
  drives	
  frequently	
  use	
  for	
  NCQ
– Stripe	
  size	
  -­‐	
  should	
  be	
  at	
  least	
  the	
  size	
  of	
  the	
  basic	
  block	
  being	
  accessed.	
  	
  
Bigger	
  usually	
  better	
  for	
  larger	
  files
– Read	
  ahead	
  -­‐	
  depends	
  on	
  access	
  patterns
12
Friday, April 26, 13
LVM
Why	
  use	
  it?
• Ability	
  to	
  easily	
  expand	
  disk
• Snapshots	
  (easy	
  for	
  dev,	
  proof	
  of	
  concept,	
  backups)
Cost?
• Straight	
  usage	
  usually	
  2-­‐3%	
  performance	
  penalty
• With	
  1	
  snapshot	
  40-­‐80%	
  penalty
• Additional	
  snapshots	
  are	
  only	
  1-­‐2%	
  additional	
  penalty	
  each
13
Friday, April 26, 13
IO	
  Scheduler
Goal	
  -­‐	
  minimize	
  seeks,	
  prioritize	
  process	
  io
• CFQ	
  -­‐	
  multiple	
  queues,	
  priorities,	
  sync	
  and	
  async
• Anticipatory	
  -­‐	
  anticipatory	
  pauses	
  after	
  reads,	
  not	
  useful	
  
with	
  RAID	
  or	
  TCQ
• Deadline	
  -­‐	
  "deadline"	
  contract	
  for	
  starting	
  all	
  requests,	
  best	
  
with	
  many	
  disk	
  RAID	
  or	
  TCQ
• Noop	
  -­‐	
  tries	
  to	
  not	
  interfere,	
  simple	
  FIFO,	
  recommended	
  for	
  
VM's	
  and	
  SSD's
14
Friday, April 26, 13
Filesystem	
  Concepts
• Inode	
  -­‐	
  stores,	
  block	
  pointers	
  and	
  metadata	
  of	
  a	
  file	
  or	
  directory
• Block	
  -­‐	
  stores	
  data
• Superblock	
  -­‐	
  stores	
  filesystem	
  metadata
• Extent	
  -­‐	
  contiguous	
  "chunk"	
  of	
  free	
  blocks
• Journal	
  -­‐	
  record	
  of	
  pending	
  and	
  completed	
  writes
• Barrier	
  -­‐	
  safety	
  mechanism	
  when	
  dealing	
  with	
  RAID	
  or	
  disk	
  
caches	
  
• fsck	
  -­‐	
  filesystem	
  check
15
Friday, April 26, 13
VFS	
  Layer
• API	
  layer	
  between	
  system	
  calls	
  and	
  filesystems,	
  
similar	
  to	
  MySQL	
  storage	
  engine	
  API	
  layer
16
Friday, April 26, 13
Linux	
  IO	
  Sub-­‐System
17
Friday, April 26, 13
 
Filesystem	
  Choices
18
In	
  the	
  style	
  of	
  Edgar	
  Allan	
  Poe’s	
  “The	
  Raven”…
Once	
  upon	
  a	
  SQL	
  query
While	
  I	
  joked	
  with	
  Apple's	
  Siri
Formatting	
  many	
  a	
  logical	
  volume	
  on	
  my	
  quad	
  core
Suddenly	
  there	
  came	
  an	
  alert	
  by	
  email
as	
  of	
  some	
  threshold	
  starting	
  to	
  wail
wailing	
  like	
  my	
  SMS	
  tone
"Tis	
  just	
  Nagios"	
  I	
  muttered,
"sending	
  alerts	
  unto	
  my	
  phone,
Only	
  this	
  -­‐	
  I	
  might	
  have	
  known."
Friday, April 26, 13
Ext	
  filesystems
• ext2	
  -­‐	
  no	
  journal
• ext3	
  -­‐	
  adds	
  journal,	
  some	
  enhancements	
  like	
  directory	
  hashes,	
  online	
  
resizing
• ext4	
  -­‐	
  adds	
  extents,	
  barriers,	
  journal	
  checksum,	
  removes	
  inode	
  locking
• common	
  features	
  -­‐	
  block	
  groups,	
  reserved	
  blocks
• ex2/3	
  max	
  FS	
  size=32	
  TiB,	
  max	
  file	
  size=2	
  TiB
• ext4	
  max	
  FS	
  size=1	
  EiB,	
  max	
  file	
  size=16	
  TiB
19
Friday, April 26, 13
XFS
• extents,	
  data=writeback	
  style	
  journaling,	
  
barriers,	
  delayed	
  allocation,	
  dynamic	
  inode	
  
creation,	
  online	
  growth,	
  cannot	
  be	
  shrunk
• max	
  FS	
  size=16	
  EiB,	
  max	
  file	
  size	
  8	
  EiB
20
Friday, April 26, 13
Btrfs
• extents,	
  data	
  and	
  metadata	
  checksums,	
  
compression,	
  subvolumes,	
  snapshots,	
  online	
  b-­‐
tree	
  rebalancing	
  and	
  defrag,	
  SSD	
  TRIM	
  support
• max	
  FS	
  size=16	
  EiB,	
  max	
  file	
  size	
  16	
  EiB
21
Friday, April 26, 13
ZFS*
• volume	
  management,	
  RAID-­‐Z,	
  continuous	
  integrity	
  
checking,	
  extents,	
  data	
  and	
  metadata	
  checksums,	
  
compression,	
  subvolumes,	
  snapshots,	
  encryption,	
  
ARC	
  cache,	
  transactional	
  writes,	
  deduplication
• max	
  FS	
  size=16	
  EiB,	
  max	
  file	
  size	
  16	
  
• *	
  note	
  that	
  not	
  all	
  these	
  features	
  are	
  yet	
  supported	
  natively	
  on	
  Linux
22
Friday, April 26, 13
Filesystem	
  Maintenance
• FS	
  Creation	
  (732GB)
– Less	
  is	
  better
• FSCK
– Less	
  is	
  better
23
0" 20" 40" 60" 80" 100"
Time"
btrfs"
xfs"
ext4"
ext3"
ext2"
0" 50" 100" 150" 200" 250" 300"
1"
btrfs"
xfs"
ext4"
ext3"
ext2"
Friday, April 26, 13
 
MySQL	
  Tuning	
  Options
24
Continuing	
  in	
  the	
  style	
  of	
  “The	
  Raven”…
Ah	
  distinctly	
  I	
  remember
as	
  I	
  documented	
  for	
  each	
  member
of	
  the	
  team	
  just	
  last	
  Movember
in	
  the	
  wiki	
  that	
  we	
  keep
write	
  and	
  keep	
  and	
  nothing	
  more…
When	
  my	
  query	
  thus	
  completed
Fourteen	
  duplicate	
  rows	
  deleted
All	
  my	
  replicas	
  then	
  repeated
repeated	
  the	
  changes	
  as	
  before
I	
  dumped	
  it	
  all	
  to	
  a	
  shared	
  disk
kept	
  as	
  a	
  backup	
  forever	
  more.
Friday, April 26, 13
MySQL	
  Tuning	
  Options	
  for	
  IO
• innodb_flush_logs_at_trx_commit
• innodb_flush_method
• innodb_buffer_pool_size
• innodb_io_capacity
• Innodb_adaptive_flushing
• Innodb_change_buffering
• Innodb_log_buffer_size
• Innodb_log_file_size
• innodb_max_dirty_pages_pct
• innodb_max_purge_lag
• innodb_open_files
• table_open_cache
• innodb_page_size
• innodb_random_read_ahead
• innodb_read_ahead_threshold
• innodb_read_io_threads
• innodb_write_io_threads
• sync_binlog
• general_log
• slow_log
• tmp_table_size,	
  max_heap_table_size
25
Friday, April 26, 13
InnoDB	
  Flush	
  Method
• Applies	
  to	
  InnoDB	
  Log	
  and	
  Data	
  file	
  writes
• O_DIRECT	
  -­‐	
  “Try	
  to	
  minimize	
  cache	
  effects	
  of	
  the	
  I/O	
  to	
  and	
  from	
  this	
  file.	
  In	
  general	
  
this	
  will	
  degrade	
  performance,	
  but	
  it	
  is	
  useful	
  in	
  special	
  situations,	
  such	
  as	
  when	
  
applications	
  do	
  their	
  own	
  caching.	
  File	
  I/O	
  is	
  done	
  directly	
  to/from	
  user	
  space	
  buffers.”	
  -­‐	
  
Applies	
  to	
  log	
  and	
  data	
  files,	
  follows	
  up	
  with	
  fsync,	
  eliminates	
  need	
  for	
  doublewrite	
  buffer
• DSYNC	
  -­‐	
  “Write	
  I/O	
  operalons	
  on	
  the	
  file	
  descriptor	
  shall	
  complete	
  as	
  defined	
  by	
  
synchronized	
  I/O	
  data	
  integrity	
  complelon.”	
  -­‐	
  Applies	
  to	
  log	
  files,	
  data	
  files	
  get	
  fsync
• fdatasync	
  -­‐	
  (deprecated	
  option	
  in	
  5.6)	
  Default	
  mode.	
  	
  fdatasync	
  on	
  every	
  write	
  to	
  log	
  
or	
  disk
• O_DIRECT_NO_FSYNC	
  -­‐	
  (5.6	
  only)	
  O_DIRECT	
  without	
  fsync	
  (not	
  suitable	
  for	
  XFS)
• fsync	
  -­‐	
  flush	
  all	
  data	
  and	
  metadata	
  for	
  a	
  file	
  to	
  disk	
  before	
  returning
• fdatasync	
  -­‐	
  flush	
  all	
  data	
  and	
  only	
  metadata	
  necessary	
  to	
  read	
  the	
  file	
  properly	
  to	
  disk	
  
before	
  returning
26
Friday, April 26, 13
InnoDB	
  Flush	
  Method	
  -­‐	
  Notes
• O_DIRECT	
  -­‐	
  “The	
  thing	
  that	
  has	
  always	
  disturbed	
  me	
  about	
  O_DIRECT	
  is	
  that	
  the	
  whole	
  interface	
  
is	
  just	
  stupid,	
  and	
  was	
  probably	
  designed	
  by	
  a	
  deranged	
  monkey	
  on	
  some	
  serious	
  mind-­‐controlling	
  
substances.”	
  -­‐-­‐Linus	
  Torvalds
• O_DIRECT	
  -­‐	
  “The	
  behaviour	
  of	
  O_DIRECT	
  with	
  NFS	
  will	
  differ	
  from	
  local	
  file	
  systems.	
  Older	
  kernels,	
  
or	
  kernels	
  configured	
  in	
  certain	
  ways,	
  may	
  not	
  support	
  this	
  combination.	
  	
  The	
  NFS	
  protocol	
  does	
  not	
  
support	
  passing	
  the	
  flag	
  to	
  the	
  server,	
  so	
  O_DIRECT	
  I/O	
  will	
  only	
  bypass	
  the	
  page	
  cache	
  on	
  the	
  client;	
  
the	
  server	
  may	
  still	
  cache	
  the	
  I/O.	
  	
  The	
  client	
  asks	
  the	
  server	
  to	
  make	
  the	
  I/O	
  synchronous	
  to	
  preserve	
  
the	
  synchronous	
  semantics	
  of	
  O_DIRECT.	
  	
  Some	
  servers	
  will	
  perform	
  poorly	
  under	
  these	
  
circumstances,	
  especially	
  if	
  the	
  I/O	
  size	
  is	
  small.	
  	
  Some	
  servers	
  may	
  also	
  be	
  configured	
  to	
  lie	
  to	
  clients	
  
about	
  the	
  I/O	
  having	
  reached	
  stable	
  storage;	
  this	
  will	
  avoid	
  the	
  performance	
  penalty	
  at	
  some	
  risk	
  to	
  
data	
  integrity	
  in	
  the	
  event	
  of	
  server	
  power	
  failure.	
  	
  The	
  Linux	
  NFS	
  client	
  places	
  no	
  alignment	
  
restrictions	
  on	
  O_DIRECT	
  I/O.”
• DSYNC	
  -­‐	
  “POSIX	
  provides	
  for	
  three	
  different	
  variants	
  of	
  synchronized	
  I/O,	
  corresponding	
  to	
  the	
  
flags	
  O_SYNC,	
  O_DSYNC,	
  and	
  O_RSYNC.	
  	
  Currently	
  (2.6.31),	
  Linux	
  only	
  implements	
  O_SYNC,	
  but	
  glibc	
  
maps	
  O_DSYNC	
  and	
  O_RSYNC	
  to	
  the	
  same	
  numerical	
  value	
  as	
  O_SYNC.	
  	
  Most	
  Linux	
  file	
  systems	
  
don't	
  actually	
  implement	
  the	
  POSIX	
  O_SYNC	
  semanqcs,	
  which	
  require	
  all	
  metadata	
  updates	
  of	
  a	
  
write	
  to	
  be	
  on	
  disk	
  on	
  returning	
  to	
  user	
  space,	
  but	
  only	
  the	
  O_DSYNC	
  semanqcs,	
  which	
  require	
  only	
  
actual	
  file	
  data	
  and	
  metadata	
  necessary	
  to	
  retrieve	
  it	
  to	
  be	
  on	
  disk	
  by	
  the	
  qme	
  the	
  system	
  call	
  
returns.”
27
Friday, April 26, 13
 
Benchmarks
28
There	
  once	
  was	
  a	
  small	
  database	
  program
	
   It	
  had	
  InnoDB	
  and	
  MyISAM
	
   One	
  did	
  transactions	
  well,
	
   and	
  one	
  would	
  crash	
  like	
  hell
Between	
  the	
  two	
  they	
  used	
  all	
  of	
  my	
  RAM
-­‐	
  A	
  database	
  Limerick	
  -­‐
Friday, April 26, 13
Testing	
  Setup...
• Dell	
  PowerEdge	
  1950
– 2x	
  Quad-­‐core	
  Intel	
  Xeon	
  5150	
  @	
  2.66	
  Ghz
– 16	
  GB	
  RAM
– 4	
  x	
  300	
  GB	
  SAS	
  disks	
  at	
  10k	
  rpm	
  (RAID-­‐5,	
  64KB	
  
stripe	
  size)
– Dell	
  Perc	
  6/i	
  RAID	
  Controller	
  with	
  512MB	
  cache
– CentOS	
  6.4	
  (sysbench	
  io	
  tests	
  done	
  with	
  Ubuntu	
  
12.10)
– MySQL	
  	
  5.5.30
29
Friday, April 26, 13
Testing	
  Setup	
  (cont)
my.cnf	
  settings:
log-­‐error
skip-­‐name-­‐resolve
key_buffer	
  =	
  1G
max_allowed_packet	
  =	
  1G
query_cache_type=0
query_cache_size=0
slow-­‐query_log=1
long-­‐query-­‐time=1
log-­‐bin=mysql-­‐bin
max_binlog_size=1G
binlog_format=MIXED
innodb_buffer_pool_size	
  =	
  4G	
  #	
  or	
  14G,	
  see	
  tests
innodb_additional_mem_pool_size	
  =	
  16M
innodb_log_file_size	
  	
  	
  	
  =	
  1G
innodb_file_per_table	
  	
  	
  =	
  1
innodb_flush_method	
  	
  	
  	
  	
  =	
  O_DIRECT	
  	
  	
  #	
  Unless	
  specified	
  as	
  fdatasync	
  or	
  O_DSYNC
innodb_flush_log_at_trx_commit	
  =	
  1
###	
  innodb_doublewrite_buffer=0	
  	
  	
  #	
  for	
  zfs	
  tests	
  only
30
Friday, April 26, 13
IO	
  Tests	
  -­‐	
  Sysbench	
  -­‐	
  Sequential	
  Reads
31
0"
50"
100"
150"
200"
250"
300"
350"
400"
450"
500"
1"thread" 2"thread" 4"thread" 8"thread" 16"thread"32"thread"64"thread"
ext2"
ext3"
ext4"
xfs"
btrfs"
MB/s
Higher is better
Friday, April 26, 13
IO	
  Tests	
  -­‐	
  Sysbench	
  -­‐	
  Sequential	
  Writes
32
0"
50"
100"
150"
200"
250"
300"
1"thread" 2"thread" 4"thread" 8"thread" 16"thread"32"thread"64"thread"
ext2"
ext3"
ext4"
xfs"
btrfs"
MB/s
Higher is better
Friday, April 26, 13
IO	
  Tests	
  -­‐	
  Sysbench	
  -­‐	
  Random	
  Reads
33
0"
5"
10"
15"
20"
25"
30"
1"thread" 2"thread" 4"thread" 8"thread" 16"thread" 32"thread" 64"thread"
ext2"
ext3"
ext4"
xfs"
btrfs"
MB/s
Higher is better
Friday, April 26, 13
IO	
  Tests	
  -­‐	
  Sysbench	
  -­‐	
  Random	
  Writes
34
0"
1"
2"
3"
4"
5"
6"
7"
8"
9"
10"
1"thread" 2"thread" 4"thread" 8"thread" 16"thread"32"thread"64"thread"
ext2"
ext3"
ext4"
xfs"
btrfs"
MB/s
Higher is better
Friday, April 26, 13
Mount	
  Options
ext2: noatime
ext3: noatime
ext4: noatime,barrier=0
xfs: inode64,nobarrier,noatime,logbufs=8
btrfs: noatime,nodatacow,space_cache
zfs: noatime (recordsize=16k, compression=off, dedup=off)
all - noatime - Do not update access times (atime) metadata on files after reading or writing them
ext4 / xfs - barrier=0 / nobarrier - Do not use barriers to pause and receive assurance when writing (aka,
trust the hardware)
xfs - inode64 - use 64 bit inode numbering - became default in most recent kernel trees
xfs - logbufs=8 - Number of in-memory log buffers (between 2 and 8, inclusive)
btrfs - space_cache - Btrfs stores the free space data ondisk to make the caching of a block group much
quicker (Kernel 2.6.37+). It's a persistent change and is safe to boot into old kernels
btrfs - nodatacow - Do not copy-on-write data. datacow is used to ensure the user either has access to
the old version of a file, or to the newer version of the file. datacow makes sure we never have partially
updated files written to disk. nodatacow gives slight performance boost by directly overwriting data (like
ext[234]), at the expense of potentially getting partially updated files on system failures. Performance
gain is usually < 5% unless the workload is random writes to large database files, where the difference
can become very large
btrfs - compress=zlib - Better compression ratio. It's the default and safe for olders kernels
btrfs - compress=lzo - Fastest compression. btrfs-progs 0.19 or olders will fail with this option. The
default in the kernel 2.6.39 and newer
35
Friday, April 26, 13
iobench	
  with	
  mount	
  options
0"
500"
1000"
1500"
2000"
2500"
Read"MB/s" Write"MB/s"
ext2"
ext2"+"op6ons"
ext3"
ext3"+"op6ons"
ext4"
ext4"+"op6ons"
xfs"
xfs"+"op6ons"
btrfs"
btrfs"+"op6ons"
MB/s
Higher is better
Friday, April 26, 13
 
IO	
  Scheduler	
  Choices
37
Round	
  and	
  round	
  the	
  disk	
  drive	
  spins
but	
  SSD	
  sits	
  still	
  and	
  grins.
It	
  is	
  randomly	
  fast
for	
  data	
  current	
  and	
  past.
My	
  database	
  upgrade	
  begins
Friday, April 26, 13
SQLite
0"
20"
40"
60"
80"
100"
120"
140"
160"
ext2" ext3" ext4" xfs" btrfs"
CFQ"
An5cipatory"
Deadline"
Noop"
Seconds
lower is better
Friday, April 26, 13
aio-­‐stress
0"
100"
200"
300"
400"
500"
600"
700"
800"
900"
1000"
ext2" ext3" ext4" xfs" btrfs"
CFQ"
An8cipatory"
Deadline"
Noop"
MB/s
Higher is better
Friday, April 26, 13
iozone	
  read
2150%
2200%
2250%
2300%
2350%
2400%
2450%
ext2% ext3% ext4% xfs% btrfs%
CFQ%
An4cipatory%
Deadline%
Noop%
MB/s
Higher is Better
Friday, April 26, 13
iozone	
  write
0"
50"
100"
150"
200"
250"
ext2" ext3" ext4" xfs" btrfs"
CFQ"
An4cipatory"
Deadline"
Noop"
MB/s
Higher is Better
Friday, April 26, 13
 
Real	
  World	
  Workloads
Flush	
  local	
  tables
Make	
  an	
  LVM	
  snapshot
Backup	
  with	
  rsync
-­‐	
  A	
  Haiku	
  on	
  easy	
  backups	
  -­‐
Friday, April 26, 13
Data	
  Loading	
  Performance
43
7000#
8000#
9000#
10000#
11000#
12000#
13000#
14000#
15000#
16000#
O_DIRECT#4#ext2#
O_DIRECT#4#NFS#(ext2)#
O_DIRECT#4#ext3#
O_DIRECT#4#ext4#
O_DIRECT#4#xfs#
O_DIRECT#4#zfs#
O_DIRECT#btrfs#
fdatasync#4#ext2#
fdatasync#4#NFS#(ext2)#
fdatasync#4#ext3#
fdatasync#4#ext4#
fdatasync#4#xfs#
fdatasync#4#zfs#
fdatasync#4#btrfs#
O_DSYNC#4#ext2#
O_DSYNC##4#NFS#(ext2)#
O_DSYNC#4#ext3#
O_DSYNC#4#ext4#
O_DSYNC#4#xfs#
O_DSYNC#4#zfs#
O_DSYNC#4#btrfs#
Load%&me%115GB%
Time in Seconds
Lower is Better
Friday, April 26, 13
OLTP	
  Performance	
  -­‐	
  1	
  thread
44
1000#
1200#
1400#
1600#
1800#
2000#
2200#
2400#
O_DIRECT#0#ext2#
O_DIRECT#0#NFS#(ext2)#
O_DIRECT#0#ext3#
O_DIRECT#0#ext4#
O_DIRECT#0#xfs#
O_DIRECT#0#zfs#
O_DIRECT#btrfs#
fdatasync#0#ext2#
fdatasync#0#NFS#(ext2)#
fdatasync#0#ext3#
fdatasync#0#ext4#
fdatasync#0#xfs#
fdatasync#0#zfs#
fdatasync#0#btrfs#
O_DSYNC#0#ext2#
O_DSYNC#0#NFS#(ext2)#
O_DSYNC#0#ext3#
O_DSYNC#0#ext4#
O_DSYNC#0#xfs#
O_DSYNC#0#zfs#
O_DSYNC#0#btrfs#
1/4#ram#0#1#thread#
1#thread,#7/8#ram#
Time in Seconds
Lower is Better
Friday, April 26, 13
OLTP	
  Performance	
  -­‐	
  16	
  thread
45
0"
500"
1000"
1500"
2000"
2500"
3000"
3500"
4000"
O_DIRECT"0"ext2"
O_DIRECT"0"NFS"(ext2)"
O_DIRECT"0"ext3"
O_DIRECT"0"ext4"
O_DIRECT"0"xfs"
O_DIRECT"0"zfs"
O_DIRECT"btrfs"
fdatasync"0"ext2"
fdatasync"0"NFS"(ext2)"
fdatasync"0"ext3"
fdatasync"0"ext4"
fdatasync"0"xfs"
fdatasync"0"zfs"
fdatasync"0"btrfs"
O_DSYNC"0"ext2"
O_DSYNC"0"NFS"(ext2)"
O_DSYNC"0"ext3"
O_DSYNC"0"ext4"
O_DSYNC"0"xfs"
O_DSYNC"0"zfs"
O_DSYNC"0"btrfs"
16"thread"1/4"ram"
16"thread,"7/8"ram"
Time in Seconds
Lower is Better
Friday, April 26, 13
 
AWS	
  Cloud	
  Options
46
Performance,	
  uptime,
Consistency	
  and	
  scale-­‐up:
No,	
  this	
  is	
  a	
  cloud…
-­‐	
  A	
  haiku	
  on	
  clouds	
  -­‐
Friday, April 26, 13
Cloud	
  Performance
• EC2	
  -­‐	
  Slightly	
  unpredictable
• *Note:	
  not	
  my	
  research	
  or	
  graphs.	
  	
  See	
  blog.scalyr.com	
  for	
  benchmarks	
  and	
  writeup
47
Friday, April 26, 13
 
Conclusions
48
Oracle	
  is	
  Red,
IBM	
  is	
  Blue,
I	
  like	
  stuff	
  for	
  free
MySQL	
  will	
  do.
Friday, April 26, 13
Conclusions
IO	
  Schedulers	
  -­‐	
  Deadline	
  or	
  Noop
Filesystem	
  -­‐	
  Ext3	
  is	
  usually	
  slowest.	
  	
  Btrfs	
  not	
  there	
  
quite	
  yet	
  but	
  looking	
  better.	
  	
  Linux	
  zfs	
  is	
  cool,	
  but	
  
performance	
  is	
  sub-­‐par.
InnoDB	
  Flush	
  Method	
  -­‐	
  O_DIRECT	
  not	
  always	
  best
Filesystem	
  Mount	
  options	
  make	
  a	
  difference
Artificial	
  benchmarks	
  are	
  fun,	
  but	
  like	
  most	
  things	
  
comparative	
  speed	
  is	
  very	
  workload	
  dependent
49
Friday, April 26, 13
Further	
  Reading...
For	
  more	
  information	
  please	
  see	
  these	
  great	
  resources:
Wikipedia:
http://en.wikipedia.org/wiki/Ext2	
  and	
  http://en.wikipedia.org/wiki/Ext3	
  and	
  http://en.wikipedia.org/wiki/Ext4	
  and	
  http://
en.wikipedia.org/wiki/XFS	
  and	
  http://en.wikipedia.org/wiki/Btrfs
MySQL	
  Performance	
  Blog:
http://www.mysqlperformanceblog.com/2009/02/05/disaster-­‐lvm-­‐performance-­‐in-­‐snapshot-­‐mode/
http://www.mysqlperformanceblog.com/2012/05/22/btrfs-­‐probably-­‐not-­‐ready-­‐yet/
http://www.mysqlperformanceblog.com/2013/01/03/is-­‐there-­‐a-­‐room-­‐for-­‐more-­‐mysql-­‐io-­‐optimization/
http://www.mysqlperformanceblog.com/2012/03/15/ext4-­‐vs-­‐xfs-­‐on-­‐ssd/
http://www.mysqlperformanceblog.com/2011/12/16/setting-­‐up-­‐xfs-­‐the-­‐simple-­‐edition/
MySQL	
  at	
  Facebook	
  (and	
  dom.as	
  blog):
http://dom.as/2008/11/03/xfs-­‐write-­‐barriers/
http://www.facebook.com/note.php?note_id=10150210901610933
Dimitrik:
http://dimitrik.free.fr/blog/archives/2012/01/mysql-­‐performance-­‐linux-­‐io.html
http://dimitrik.free.fr/blog/archives/02-­‐01-­‐2013_02-­‐28-­‐2013.html#159
http://dimitrik.free.fr/blog/archives/2011/01/mysql-­‐performance-­‐innodb-­‐double-­‐write-­‐buffer-­‐redo-­‐log-­‐size-­‐impacts-­‐mysql-­‐55.html
50
Friday, April 26, 13
...Further	
  Reading
For	
  more	
  information	
  please	
  see	
  these	
  great	
  resources:
Phoronix:
http://www.phoronix.com/scan.php?page=article&item=ubuntu_1204_fs&num=1
http://www.phoronix.com/scan.php?page=article&item=linux_39_fs&num=1
http://www.phoronix.com/scan.php?page=article&item=fedora_15_lvm&num=3
Misc:
http://erikugel.wordpress.com/2011/04/14/the-­‐quest-­‐for-­‐the-­‐fastest-­‐linux-­‐filesystem/
https://raid.wiki.kernel.org/index.php/Performance
http://uclibc.org/~aldot/mkfs_stride.html
http://indico.cern.ch/getFile.py/access?contribId=3&sessionId=0&resId=1&materialId=paper&confId=13797
http://linux.die.net/man/2/open
http://linux.die.net/man/2/fsync
http://blog.scalyr.com/2012/10/16/a-­‐systematic-­‐look-­‐at-­‐ec2-­‐io/
http://docs.openstack.org/trunk/openstack-­‐object-­‐storage/admin/content/filesystem-­‐considerations.html
https://btrfs.wiki.kernel.org/index.php/Main_Page
http://zfsonlinux.org/
https://blogs.oracle.com/realneel/entry/mysql_innodb_zfs_best_practices
51
Friday, April 26, 13
Parting	
  thought
Do	
  you	
  like	
  MyISAM?
I	
  do	
  not	
  like	
  it,	
  Sam-­‐I-­‐am.
I	
  do	
  not	
  like	
  MyISAM.
Would	
  you	
  use	
  it	
  here	
  or	
  there?
I	
  would	
  not	
  use	
  it	
  here	
  or	
  there.
I	
  would	
  not	
  use	
  it	
  anywhere.
I	
  do	
  not	
  like	
  MyISAM.
I	
  do	
  not	
  like	
  it,	
  Sam-­‐I-­‐am.
Would	
  you	
  like	
  it	
  in	
  an	
  e-­‐commerce	
  site?
Would	
  you	
  like	
  it	
  with	
  in	
  the	
  middle	
  of	
  the	
  night?
I	
  do	
  not	
  like	
  it	
  for	
  an	
  e-­‐commerce	
  site.
I	
  do	
  not	
  like	
  it	
  in	
  the	
  middle	
  of	
  the	
  night.
I	
  would	
  not	
  use	
  it	
  here	
  or	
  there.
I	
  would	
  not	
  use	
  it	
  anywhere.
I	
  do	
  not	
  like	
  MyISAM.
I	
  do	
  not	
  like	
  it	
  Sam-­‐I-­‐am.
Would	
  you	
  could	
  you	
  for	
  foreign	
  keys?
Use	
  it,	
  use	
  it,	
  just	
  use	
  it	
  please!
You	
  may	
  like	
  it,	
  you	
  will	
  see
Just	
  convert	
  these	
  tables	
  three…
Not	
  for	
  foreign	
  keys,	
  not	
  for	
  those	
  tables	
  three!
I	
  will	
  not	
  use	
  it,	
  you	
  let	
  me	
  be!
Friday, April 26, 13

More Related Content

What's hot

When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good? Alkin Tezuysal
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookThe Hive
 
ZFS for Databases
ZFS for DatabasesZFS for Databases
ZFS for Databasesahl0003
 
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Storage Systems for big data - HDFS, HBase, and intro to KV Store - RedisStorage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Storage Systems for big data - HDFS, HBase, and intro to KV Store - RedisSameer Tiwari
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
RocksDB compaction
RocksDB compactionRocksDB compaction
RocksDB compactionMIJIN AN
 
An Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageAn Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageTakashi Hoshino
 
Demystifying Storage - Building large SANs
Demystifying  Storage - Building large SANsDemystifying  Storage - Building large SANs
Demystifying Storage - Building large SANsDirecti Group
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redisiammutex
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesNETWAYS
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance ImprovementBiju Nair
 
Ceph and RocksDB
Ceph and RocksDBCeph and RocksDB
Ceph and RocksDBSage Weil
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank:  Rocking the Database World with RocksDBThe Hive Think Tank:  Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDBThe Hive
 
Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structureZhichao Liang
 
Raid data recovery Tips
Raid data recovery TipsRaid data recovery Tips
Raid data recovery TipsHone Software
 
RocksDB detail
RocksDB detailRocksDB detail
RocksDB detailMIJIN AN
 
HBase Blockcache 101
HBase Blockcache 101HBase Blockcache 101
HBase Blockcache 101Nick Dimiduk
 

What's hot (19)

When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good?
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
ZFS for Databases
ZFS for DatabasesZFS for Databases
ZFS for Databases
 
Raid level 4
Raid level 4Raid level 4
Raid level 4
 
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Storage Systems for big data - HDFS, HBase, and intro to KV Store - RedisStorage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
RocksDB compaction
RocksDB compactionRocksDB compaction
RocksDB compaction
 
An Efficient Backup and Replication of Storage
An Efficient Backup and Replication of StorageAn Efficient Backup and Replication of Storage
An Efficient Backup and Replication of Storage
 
Demystifying Storage - Building large SANs
Demystifying  Storage - Building large SANsDemystifying  Storage - Building large SANs
Demystifying Storage - Building large SANs
 
深入了解Redis
深入了解Redis深入了解Redis
深入了解Redis
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin Charles
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance Improvement
 
Ceph and RocksDB
Ceph and RocksDBCeph and RocksDB
Ceph and RocksDB
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank:  Rocking the Database World with RocksDBThe Hive Think Tank:  Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDB
 
Some key value stores using log-structure
Some key value stores using log-structureSome key value stores using log-structure
Some key value stores using log-structure
 
Raid data recovery Tips
Raid data recovery TipsRaid data recovery Tips
Raid data recovery Tips
 
RocksDB detail
RocksDB detailRocksDB detail
RocksDB detail
 
Nachos 2
Nachos 2Nachos 2
Nachos 2
 
HBase Blockcache 101
HBase Blockcache 101HBase Blockcache 101
HBase Blockcache 101
 

Viewers also liked

PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSTomas Vondra
 
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016Tomas Vondra
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSTomas Vondra
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?Pradeep Kumar
 
PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6Tomas Vondra
 
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red_Hat_Storage
 
Deep Dive: OpenStack Summit (Red Hat Summit 2014)
Deep Dive: OpenStack Summit (Red Hat Summit 2014)Deep Dive: OpenStack Summit (Red Hat Summit 2014)
Deep Dive: OpenStack Summit (Red Hat Summit 2014)Stephen Gordon
 

Viewers also liked (8)

PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
 
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
Xen Project: Windows PV Drivers
Xen Project: Windows PV DriversXen Project: Windows PV Drivers
Xen Project: Windows PV Drivers
 
PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6
 
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
Red Hat Storage Day Dallas - Red Hat Ceph Storage Acceleration Utilizing Flas...
 
Deep Dive: OpenStack Summit (Red Hat Summit 2014)
Deep Dive: OpenStack Summit (Red Hat Summit 2014)Deep Dive: OpenStack Summit (Red Hat Summit 2014)
Deep Dive: OpenStack Summit (Red Hat Summit 2014)
 

Similar to Percona live linux filesystems and my sql

SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)Lars Marowsky-Brée
 
Windows Server 2012 R2 Software-Defined Storage
Windows Server 2012 R2 Software-Defined StorageWindows Server 2012 R2 Software-Defined Storage
Windows Server 2012 R2 Software-Defined StorageAidan Finn
 
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)Lars Marowsky-Brée
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptxJawaharPrasad3
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Colin Charles
 
RAID--16112022-093218am-16022024-061222pm.pdf
RAID--16112022-093218am-16022024-061222pm.pdfRAID--16112022-093218am-16022024-061222pm.pdf
RAID--16112022-093218am-16022024-061222pm.pdfzainm7032
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesHazelcast
 
Cba lecture 6 intro_ch_06_a_br
Cba lecture 6 intro_ch_06_a_brCba lecture 6 intro_ch_06_a_br
Cba lecture 6 intro_ch_06_a_brnazninislamnipa
 
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Raid Data Recovery
 
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...Lucidworks
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Kyle Hailey
 
Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...
Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...
Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...DataStax Academy
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGlusterFS
 

Similar to Percona live linux filesystems and my sql (20)

SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)SUSE Storage: Sizing and Performance (Ceph)
SUSE Storage: Sizing and Performance (Ceph)
 
Windows Server 2012 R2 Software-Defined Storage
Windows Server 2012 R2 Software-Defined StorageWindows Server 2012 R2 Software-Defined Storage
Windows Server 2012 R2 Software-Defined Storage
 
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
Modeling, estimating, and predicting Ceph (Linux Foundation - Vault 2015)
 
Unit 4 DBMS.ppt
Unit 4 DBMS.pptUnit 4 DBMS.ppt
Unit 4 DBMS.ppt
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptx
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
RAID--16112022-093218am-16022024-061222pm.pdf
RAID--16112022-093218am-16022024-061222pm.pdfRAID--16112022-093218am-16022024-061222pm.pdf
RAID--16112022-093218am-16022024-061222pm.pdf
 
DAS RAID NAS SAN
DAS RAID NAS SANDAS RAID NAS SAN
DAS RAID NAS SAN
 
9_Storage_Devices.pptx
9_Storage_Devices.pptx9_Storage_Devices.pptx
9_Storage_Devices.pptx
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & Techniques
 
Cba lecture 6 intro_ch_06_a_br
Cba lecture 6 intro_ch_06_a_brCba lecture 6 intro_ch_06_a_br
Cba lecture 6 intro_ch_06_a_br
 
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
Understanding RAID Levels (RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5)
 
Tuning Solr & Pipeline for Logs
Tuning Solr & Pipeline for LogsTuning Solr & Pipeline for Logs
Tuning Solr & Pipeline for Logs
 
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
Tuning Solr and its Pipeline for Logs: Presented by Rafał Kuć & Radu Gheorghe...
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
 
Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...
Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...
Cassandra Day Chicago 2015: DataStax Enterprise & Apache Cassandra Hardware B...
 
09. storage-part-1
09. storage-part-109. storage-part-1
09. storage-part-1
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & Tricks
 
Storage Managment
Storage ManagmentStorage Managment
Storage Managment
 

More from Michael Zhang

廣告系統在Docker/Mesos上的可靠性實踐
廣告系統在Docker/Mesos上的可靠性實踐廣告系統在Docker/Mesos上的可靠性實踐
廣告系統在Docker/Mesos上的可靠性實踐Michael Zhang
 
HKIX Upgrade to 100Gbps-Based Two-Tier Architecture
HKIX Upgrade to 100Gbps-Based Two-Tier ArchitectureHKIX Upgrade to 100Gbps-Based Two-Tier Architecture
HKIX Upgrade to 100Gbps-Based Two-Tier ArchitectureMichael Zhang
 
2014 GITC 帶上數據去創業 talkingdata—高铎
 2014 GITC 帶上數據去創業 talkingdata—高铎 2014 GITC 帶上數據去創業 talkingdata—高铎
2014 GITC 帶上數據去創業 talkingdata—高铎Michael Zhang
 
Fastsocket Linxiaofeng
Fastsocket LinxiaofengFastsocket Linxiaofeng
Fastsocket LinxiaofengMichael Zhang
 
2014 Hpocon 李志刚 1号店 - puppet在1号店的实践
2014 Hpocon 李志刚   1号店 - puppet在1号店的实践2014 Hpocon 李志刚   1号店 - puppet在1号店的实践
2014 Hpocon 李志刚 1号店 - puppet在1号店的实践Michael Zhang
 
2014 Hpocon 姚仁捷 唯品会 - data driven ops
2014 Hpocon 姚仁捷   唯品会 - data driven ops2014 Hpocon 姚仁捷   唯品会 - data driven ops
2014 Hpocon 姚仁捷 唯品会 - data driven opsMichael Zhang
 
2014 Hpocon 高驰涛 云智慧 - apm在高性能架构中的应用
2014 Hpocon 高驰涛   云智慧 - apm在高性能架构中的应用2014 Hpocon 高驰涛   云智慧 - apm在高性能架构中的应用
2014 Hpocon 高驰涛 云智慧 - apm在高性能架构中的应用Michael Zhang
 
2014 Hpocon 黄慧攀 upyun - 平台架构的服务监控
2014 Hpocon 黄慧攀   upyun - 平台架构的服务监控2014 Hpocon 黄慧攀   upyun - 平台架构的服务监控
2014 Hpocon 黄慧攀 upyun - 平台架构的服务监控Michael Zhang
 
2014 Hpocon 吴磊 ucloud - 由点到面 提升公有云服务可用性
2014 Hpocon 吴磊   ucloud - 由点到面 提升公有云服务可用性2014 Hpocon 吴磊   ucloud - 由点到面 提升公有云服务可用性
2014 Hpocon 吴磊 ucloud - 由点到面 提升公有云服务可用性Michael Zhang
 
2014 Hpocon 周辉 大众点评 - 大众点评混合开发模式下的加速尝试
2014 Hpocon 周辉   大众点评 - 大众点评混合开发模式下的加速尝试2014 Hpocon 周辉   大众点评 - 大众点评混合开发模式下的加速尝试
2014 Hpocon 周辉 大众点评 - 大众点评混合开发模式下的加速尝试Michael Zhang
 
Cuda 6 performance_report
Cuda 6 performance_reportCuda 6 performance_report
Cuda 6 performance_reportMichael Zhang
 
The Data Center and Hadoop
The Data Center and HadoopThe Data Center and Hadoop
The Data Center and HadoopMichael Zhang
 
Hadoop Hardware @Twitter: Size does matter.
Hadoop Hardware @Twitter: Size does matter.Hadoop Hardware @Twitter: Size does matter.
Hadoop Hardware @Twitter: Size does matter.Michael Zhang
 
Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]
Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]
Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]Michael Zhang
 
Q con shanghai2013-[刘海锋]-[京东文件系统简介]
Q con shanghai2013-[刘海锋]-[京东文件系统简介]Q con shanghai2013-[刘海锋]-[京东文件系统简介]
Q con shanghai2013-[刘海锋]-[京东文件系统简介]Michael Zhang
 
Q con shanghai2013-[韩军]-[超大型电商系统架构解密]
Q con shanghai2013-[韩军]-[超大型电商系统架构解密]Q con shanghai2013-[韩军]-[超大型电商系统架构解密]
Q con shanghai2013-[韩军]-[超大型电商系统架构解密]Michael Zhang
 
Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]
Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]
Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]Michael Zhang
 
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]Michael Zhang
 
Q con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodologyQ con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodologyMichael Zhang
 

More from Michael Zhang (20)

廣告系統在Docker/Mesos上的可靠性實踐
廣告系統在Docker/Mesos上的可靠性實踐廣告系統在Docker/Mesos上的可靠性實踐
廣告系統在Docker/Mesos上的可靠性實踐
 
HKIX Upgrade to 100Gbps-Based Two-Tier Architecture
HKIX Upgrade to 100Gbps-Based Two-Tier ArchitectureHKIX Upgrade to 100Gbps-Based Two-Tier Architecture
HKIX Upgrade to 100Gbps-Based Two-Tier Architecture
 
2014 GITC 帶上數據去創業 talkingdata—高铎
 2014 GITC 帶上數據去創業 talkingdata—高铎 2014 GITC 帶上數據去創業 talkingdata—高铎
2014 GITC 帶上數據去創業 talkingdata—高铎
 
Fastsocket Linxiaofeng
Fastsocket LinxiaofengFastsocket Linxiaofeng
Fastsocket Linxiaofeng
 
Spark sql meetup
Spark sql meetupSpark sql meetup
Spark sql meetup
 
2014 Hpocon 李志刚 1号店 - puppet在1号店的实践
2014 Hpocon 李志刚   1号店 - puppet在1号店的实践2014 Hpocon 李志刚   1号店 - puppet在1号店的实践
2014 Hpocon 李志刚 1号店 - puppet在1号店的实践
 
2014 Hpocon 姚仁捷 唯品会 - data driven ops
2014 Hpocon 姚仁捷   唯品会 - data driven ops2014 Hpocon 姚仁捷   唯品会 - data driven ops
2014 Hpocon 姚仁捷 唯品会 - data driven ops
 
2014 Hpocon 高驰涛 云智慧 - apm在高性能架构中的应用
2014 Hpocon 高驰涛   云智慧 - apm在高性能架构中的应用2014 Hpocon 高驰涛   云智慧 - apm在高性能架构中的应用
2014 Hpocon 高驰涛 云智慧 - apm在高性能架构中的应用
 
2014 Hpocon 黄慧攀 upyun - 平台架构的服务监控
2014 Hpocon 黄慧攀   upyun - 平台架构的服务监控2014 Hpocon 黄慧攀   upyun - 平台架构的服务监控
2014 Hpocon 黄慧攀 upyun - 平台架构的服务监控
 
2014 Hpocon 吴磊 ucloud - 由点到面 提升公有云服务可用性
2014 Hpocon 吴磊   ucloud - 由点到面 提升公有云服务可用性2014 Hpocon 吴磊   ucloud - 由点到面 提升公有云服务可用性
2014 Hpocon 吴磊 ucloud - 由点到面 提升公有云服务可用性
 
2014 Hpocon 周辉 大众点评 - 大众点评混合开发模式下的加速尝试
2014 Hpocon 周辉   大众点评 - 大众点评混合开发模式下的加速尝试2014 Hpocon 周辉   大众点评 - 大众点评混合开发模式下的加速尝试
2014 Hpocon 周辉 大众点评 - 大众点评混合开发模式下的加速尝试
 
Cuda 6 performance_report
Cuda 6 performance_reportCuda 6 performance_report
Cuda 6 performance_report
 
The Data Center and Hadoop
The Data Center and HadoopThe Data Center and Hadoop
The Data Center and Hadoop
 
Hadoop Hardware @Twitter: Size does matter.
Hadoop Hardware @Twitter: Size does matter.Hadoop Hardware @Twitter: Size does matter.
Hadoop Hardware @Twitter: Size does matter.
 
Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]
Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]
Q con shanghai2013-[ben lavender]-[long-distance relationships with robots]
 
Q con shanghai2013-[刘海锋]-[京东文件系统简介]
Q con shanghai2013-[刘海锋]-[京东文件系统简介]Q con shanghai2013-[刘海锋]-[京东文件系统简介]
Q con shanghai2013-[刘海锋]-[京东文件系统简介]
 
Q con shanghai2013-[韩军]-[超大型电商系统架构解密]
Q con shanghai2013-[韩军]-[超大型电商系统架构解密]Q con shanghai2013-[韩军]-[超大型电商系统架构解密]
Q con shanghai2013-[韩军]-[超大型电商系统架构解密]
 
Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]
Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]
Q con shanghai2013-[jains krums]-[real-time-delivery-archiecture]
 
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
Q con shanghai2013-[黄舒泉]-[intel it openstack practice]
 
Q con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodologyQ con shanghai2013-罗婷-performance methodology
Q con shanghai2013-罗婷-performance methodology
 

Recently uploaded

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 

Recently uploaded (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 

Percona live linux filesystems and my sql

  • 1.  Linux  Filesystems  and  MySQL   Ammon  Sutherland April  23,  2013 Friday, April 26, 13
  • 2.  Preface... "Who  is  it?"  said  Arthur. "Well,"  said  Ford,  "if  we're  lucky  it's  just  the  Vogons   come  to  throw  us  into  space." "And  if  we're  unlucky?" "If  we're  unlucky,"  said  Ford  grimly,  "the  captain  might   be  serious  in  his  threat  that  he's  going  to  read  us  some  of   his  poetry  first  ..."   Friday, April 26, 13
  • 3. Background • Long-­‐time  Linux  System  Administrator  turned  DBA – University  systems – Managed  Hosting – Online  Auctions – E-­‐commerce,  SEO,  marketing,  data-­‐mining A  bit  of  an  optimization  junkie… Once  in  a  while  I  share:    http://shamallu.blogspot.com/ 3 Friday, April 26, 13
  • 4. Agenda • Basic  Theory – Directory  structure – LVM – RAID – SSD – Filesystem  concepts • Filesystem  choices 4 • MySQL  Tuning • Benchmarks – IO  tests – FS  maintenance – OLTP • AWS  EC2 • Conclusions Friday, April 26, 13
  • 5.   Basic  Theory 5 deadlock  detected we  rollback  transaction  two err  one  two  one  three -­‐  A  MySQL  Haiku  -­‐ Friday, April 26, 13
  • 6. Directory  Structure Things  that  must  be  stored  on  disk • Data  files  (.ibd  or  .MYD  and  .MYI)  –  Random  IO • Main  InnoDB  data  file  (ibdata1)  –  Random  IO • InnoDB  Log  files  (ib_logfile0,  ib_logfile1)  –  Sequential  IO  (one   at  a  time) • Binary  logs  and  relay  logs  –  Sequential  IO • General  query  log  and  Slow  query  log  –  Sequential  IO • Master.info  –  technically  Random  IO • Error  log  –  Infrequent  Sequential  IO 6 Friday, April 26, 13
  • 8. Hard  Drives • Rotating  platters • SAS  vs.  SATA – SAS  6gb/s  connectors  can  handle  SATA  3gb/s  drives – SAS  typically  cost  more  (much  more  for  larger  size) – SAS  often  will  do  higher  rpm  rates  (10k,  15k  rpm) – SAS  has  more  logic  on  the  drives – SAS  has  more  data  consistency  and  error  reporting  logic  vs.   SATA    S.M.A.R.T. – SAS  uses  higher  voltages  allowing  for  external  arrays  with   longer  signal  runs – SAS  does  TCQ  vs.  SATA  NCQ  (provides  some  similar  effect) – Both  do  8b10b  encoding  (25%  parity  overhead) 8 Friday, April 26, 13
  • 9. SSD • Pros: – Very  fast  random  reads  and  writes – Handle  high  concurrency  very  well • Cons: – Cost  per  GB – Lifespan  and  performance  depend  on  write-­‐cycles.    Beware   write  amplification – Requires  care  with  RAID  cards 9 Friday, April 26, 13
  • 10. RAID Typical  RAID  Modes: • RAID-­‐0:    Data  striped,  no  redundancy  (2+  disks) • RAID-­‐1:    Data  mirrored,  1:1  redundancy  (2+  disks) • RAID-­‐5:    Data  striped  with  parity  (3+  disks) • RAID-­‐6:    Data  striped  with  double  parity  (4+  disks) • RAID-­‐10:    Data  striped  and  mirrored  (4+  disks) • RAID-­‐50:    RAID-­‐0  striping  of  multiple  RAID-­‐5  groups  (6+       disks) 10 Friday, April 26, 13
  • 11. RAID  (cont.) Typical  RAID  Benefits  and  risks: • RAID-­‐0  -­‐  Scales  reads  and  writes,  multiplies  space  (risky,  no  disks  can  fail) • RAID-­‐1  -­‐  Scales  reads  not  writes,  no  additional  space  gain  (data  intact   with  only  one  disk  and  rebuilt) • RAID-­‐5  -­‐  Scales  reads  and  some  writes  (parity  penalty,  can  survive  one   disk  failure  and  rebuild) • RAID-­‐6  -­‐  Scales  reads  and  less  writes  than  RAID-­‐5  (double  parity  penalty,   can  survive  2  disk  failures  and  rebuild) • RAID-­‐10  -­‐  Scales  2x  reads  vs  writes,  (can  lose  up  to  two  disks  in  particular   combinations) • RAID-­‐50  -­‐  Scales  reads  and  writes  (can  lose  one  disk  per  RAID-­‐5  group  and  still   rebuild) 11 Friday, April 26, 13
  • 12. RAID  Cards • Purpose: – Offload  RAID  calculations  from  CPU,  including  parity – Routine  disk  consistency  checks – Cache • Tips: – Controller  Cache  is  best  mostly  for  writes – Write-­‐back  cache  is  good  -­‐  Beware  of  “learn  cycles” – Disk  Cache  -­‐  best  disabled  on  SAS  drives.    SATA  drives  frequently  use  for  NCQ – Stripe  size  -­‐  should  be  at  least  the  size  of  the  basic  block  being  accessed.     Bigger  usually  better  for  larger  files – Read  ahead  -­‐  depends  on  access  patterns 12 Friday, April 26, 13
  • 13. LVM Why  use  it? • Ability  to  easily  expand  disk • Snapshots  (easy  for  dev,  proof  of  concept,  backups) Cost? • Straight  usage  usually  2-­‐3%  performance  penalty • With  1  snapshot  40-­‐80%  penalty • Additional  snapshots  are  only  1-­‐2%  additional  penalty  each 13 Friday, April 26, 13
  • 14. IO  Scheduler Goal  -­‐  minimize  seeks,  prioritize  process  io • CFQ  -­‐  multiple  queues,  priorities,  sync  and  async • Anticipatory  -­‐  anticipatory  pauses  after  reads,  not  useful   with  RAID  or  TCQ • Deadline  -­‐  "deadline"  contract  for  starting  all  requests,  best   with  many  disk  RAID  or  TCQ • Noop  -­‐  tries  to  not  interfere,  simple  FIFO,  recommended  for   VM's  and  SSD's 14 Friday, April 26, 13
  • 15. Filesystem  Concepts • Inode  -­‐  stores,  block  pointers  and  metadata  of  a  file  or  directory • Block  -­‐  stores  data • Superblock  -­‐  stores  filesystem  metadata • Extent  -­‐  contiguous  "chunk"  of  free  blocks • Journal  -­‐  record  of  pending  and  completed  writes • Barrier  -­‐  safety  mechanism  when  dealing  with  RAID  or  disk   caches   • fsck  -­‐  filesystem  check 15 Friday, April 26, 13
  • 16. VFS  Layer • API  layer  between  system  calls  and  filesystems,   similar  to  MySQL  storage  engine  API  layer 16 Friday, April 26, 13
  • 18.   Filesystem  Choices 18 In  the  style  of  Edgar  Allan  Poe’s  “The  Raven”… Once  upon  a  SQL  query While  I  joked  with  Apple's  Siri Formatting  many  a  logical  volume  on  my  quad  core Suddenly  there  came  an  alert  by  email as  of  some  threshold  starting  to  wail wailing  like  my  SMS  tone "Tis  just  Nagios"  I  muttered, "sending  alerts  unto  my  phone, Only  this  -­‐  I  might  have  known." Friday, April 26, 13
  • 19. Ext  filesystems • ext2  -­‐  no  journal • ext3  -­‐  adds  journal,  some  enhancements  like  directory  hashes,  online   resizing • ext4  -­‐  adds  extents,  barriers,  journal  checksum,  removes  inode  locking • common  features  -­‐  block  groups,  reserved  blocks • ex2/3  max  FS  size=32  TiB,  max  file  size=2  TiB • ext4  max  FS  size=1  EiB,  max  file  size=16  TiB 19 Friday, April 26, 13
  • 20. XFS • extents,  data=writeback  style  journaling,   barriers,  delayed  allocation,  dynamic  inode   creation,  online  growth,  cannot  be  shrunk • max  FS  size=16  EiB,  max  file  size  8  EiB 20 Friday, April 26, 13
  • 21. Btrfs • extents,  data  and  metadata  checksums,   compression,  subvolumes,  snapshots,  online  b-­‐ tree  rebalancing  and  defrag,  SSD  TRIM  support • max  FS  size=16  EiB,  max  file  size  16  EiB 21 Friday, April 26, 13
  • 22. ZFS* • volume  management,  RAID-­‐Z,  continuous  integrity   checking,  extents,  data  and  metadata  checksums,   compression,  subvolumes,  snapshots,  encryption,   ARC  cache,  transactional  writes,  deduplication • max  FS  size=16  EiB,  max  file  size  16   • *  note  that  not  all  these  features  are  yet  supported  natively  on  Linux 22 Friday, April 26, 13
  • 23. Filesystem  Maintenance • FS  Creation  (732GB) – Less  is  better • FSCK – Less  is  better 23 0" 20" 40" 60" 80" 100" Time" btrfs" xfs" ext4" ext3" ext2" 0" 50" 100" 150" 200" 250" 300" 1" btrfs" xfs" ext4" ext3" ext2" Friday, April 26, 13
  • 24.   MySQL  Tuning  Options 24 Continuing  in  the  style  of  “The  Raven”… Ah  distinctly  I  remember as  I  documented  for  each  member of  the  team  just  last  Movember in  the  wiki  that  we  keep write  and  keep  and  nothing  more… When  my  query  thus  completed Fourteen  duplicate  rows  deleted All  my  replicas  then  repeated repeated  the  changes  as  before I  dumped  it  all  to  a  shared  disk kept  as  a  backup  forever  more. Friday, April 26, 13
  • 25. MySQL  Tuning  Options  for  IO • innodb_flush_logs_at_trx_commit • innodb_flush_method • innodb_buffer_pool_size • innodb_io_capacity • Innodb_adaptive_flushing • Innodb_change_buffering • Innodb_log_buffer_size • Innodb_log_file_size • innodb_max_dirty_pages_pct • innodb_max_purge_lag • innodb_open_files • table_open_cache • innodb_page_size • innodb_random_read_ahead • innodb_read_ahead_threshold • innodb_read_io_threads • innodb_write_io_threads • sync_binlog • general_log • slow_log • tmp_table_size,  max_heap_table_size 25 Friday, April 26, 13
  • 26. InnoDB  Flush  Method • Applies  to  InnoDB  Log  and  Data  file  writes • O_DIRECT  -­‐  “Try  to  minimize  cache  effects  of  the  I/O  to  and  from  this  file.  In  general   this  will  degrade  performance,  but  it  is  useful  in  special  situations,  such  as  when   applications  do  their  own  caching.  File  I/O  is  done  directly  to/from  user  space  buffers.”  -­‐   Applies  to  log  and  data  files,  follows  up  with  fsync,  eliminates  need  for  doublewrite  buffer • DSYNC  -­‐  “Write  I/O  operalons  on  the  file  descriptor  shall  complete  as  defined  by   synchronized  I/O  data  integrity  complelon.”  -­‐  Applies  to  log  files,  data  files  get  fsync • fdatasync  -­‐  (deprecated  option  in  5.6)  Default  mode.    fdatasync  on  every  write  to  log   or  disk • O_DIRECT_NO_FSYNC  -­‐  (5.6  only)  O_DIRECT  without  fsync  (not  suitable  for  XFS) • fsync  -­‐  flush  all  data  and  metadata  for  a  file  to  disk  before  returning • fdatasync  -­‐  flush  all  data  and  only  metadata  necessary  to  read  the  file  properly  to  disk   before  returning 26 Friday, April 26, 13
  • 27. InnoDB  Flush  Method  -­‐  Notes • O_DIRECT  -­‐  “The  thing  that  has  always  disturbed  me  about  O_DIRECT  is  that  the  whole  interface   is  just  stupid,  and  was  probably  designed  by  a  deranged  monkey  on  some  serious  mind-­‐controlling   substances.”  -­‐-­‐Linus  Torvalds • O_DIRECT  -­‐  “The  behaviour  of  O_DIRECT  with  NFS  will  differ  from  local  file  systems.  Older  kernels,   or  kernels  configured  in  certain  ways,  may  not  support  this  combination.    The  NFS  protocol  does  not   support  passing  the  flag  to  the  server,  so  O_DIRECT  I/O  will  only  bypass  the  page  cache  on  the  client;   the  server  may  still  cache  the  I/O.    The  client  asks  the  server  to  make  the  I/O  synchronous  to  preserve   the  synchronous  semantics  of  O_DIRECT.    Some  servers  will  perform  poorly  under  these   circumstances,  especially  if  the  I/O  size  is  small.    Some  servers  may  also  be  configured  to  lie  to  clients   about  the  I/O  having  reached  stable  storage;  this  will  avoid  the  performance  penalty  at  some  risk  to   data  integrity  in  the  event  of  server  power  failure.    The  Linux  NFS  client  places  no  alignment   restrictions  on  O_DIRECT  I/O.” • DSYNC  -­‐  “POSIX  provides  for  three  different  variants  of  synchronized  I/O,  corresponding  to  the   flags  O_SYNC,  O_DSYNC,  and  O_RSYNC.    Currently  (2.6.31),  Linux  only  implements  O_SYNC,  but  glibc   maps  O_DSYNC  and  O_RSYNC  to  the  same  numerical  value  as  O_SYNC.    Most  Linux  file  systems   don't  actually  implement  the  POSIX  O_SYNC  semanqcs,  which  require  all  metadata  updates  of  a   write  to  be  on  disk  on  returning  to  user  space,  but  only  the  O_DSYNC  semanqcs,  which  require  only   actual  file  data  and  metadata  necessary  to  retrieve  it  to  be  on  disk  by  the  qme  the  system  call   returns.” 27 Friday, April 26, 13
  • 28.   Benchmarks 28 There  once  was  a  small  database  program   It  had  InnoDB  and  MyISAM   One  did  transactions  well,   and  one  would  crash  like  hell Between  the  two  they  used  all  of  my  RAM -­‐  A  database  Limerick  -­‐ Friday, April 26, 13
  • 29. Testing  Setup... • Dell  PowerEdge  1950 – 2x  Quad-­‐core  Intel  Xeon  5150  @  2.66  Ghz – 16  GB  RAM – 4  x  300  GB  SAS  disks  at  10k  rpm  (RAID-­‐5,  64KB   stripe  size) – Dell  Perc  6/i  RAID  Controller  with  512MB  cache – CentOS  6.4  (sysbench  io  tests  done  with  Ubuntu   12.10) – MySQL    5.5.30 29 Friday, April 26, 13
  • 30. Testing  Setup  (cont) my.cnf  settings: log-­‐error skip-­‐name-­‐resolve key_buffer  =  1G max_allowed_packet  =  1G query_cache_type=0 query_cache_size=0 slow-­‐query_log=1 long-­‐query-­‐time=1 log-­‐bin=mysql-­‐bin max_binlog_size=1G binlog_format=MIXED innodb_buffer_pool_size  =  4G  #  or  14G,  see  tests innodb_additional_mem_pool_size  =  16M innodb_log_file_size        =  1G innodb_file_per_table      =  1 innodb_flush_method          =  O_DIRECT      #  Unless  specified  as  fdatasync  or  O_DSYNC innodb_flush_log_at_trx_commit  =  1 ###  innodb_doublewrite_buffer=0      #  for  zfs  tests  only 30 Friday, April 26, 13
  • 31. IO  Tests  -­‐  Sysbench  -­‐  Sequential  Reads 31 0" 50" 100" 150" 200" 250" 300" 350" 400" 450" 500" 1"thread" 2"thread" 4"thread" 8"thread" 16"thread"32"thread"64"thread" ext2" ext3" ext4" xfs" btrfs" MB/s Higher is better Friday, April 26, 13
  • 32. IO  Tests  -­‐  Sysbench  -­‐  Sequential  Writes 32 0" 50" 100" 150" 200" 250" 300" 1"thread" 2"thread" 4"thread" 8"thread" 16"thread"32"thread"64"thread" ext2" ext3" ext4" xfs" btrfs" MB/s Higher is better Friday, April 26, 13
  • 33. IO  Tests  -­‐  Sysbench  -­‐  Random  Reads 33 0" 5" 10" 15" 20" 25" 30" 1"thread" 2"thread" 4"thread" 8"thread" 16"thread" 32"thread" 64"thread" ext2" ext3" ext4" xfs" btrfs" MB/s Higher is better Friday, April 26, 13
  • 34. IO  Tests  -­‐  Sysbench  -­‐  Random  Writes 34 0" 1" 2" 3" 4" 5" 6" 7" 8" 9" 10" 1"thread" 2"thread" 4"thread" 8"thread" 16"thread"32"thread"64"thread" ext2" ext3" ext4" xfs" btrfs" MB/s Higher is better Friday, April 26, 13
  • 35. Mount  Options ext2: noatime ext3: noatime ext4: noatime,barrier=0 xfs: inode64,nobarrier,noatime,logbufs=8 btrfs: noatime,nodatacow,space_cache zfs: noatime (recordsize=16k, compression=off, dedup=off) all - noatime - Do not update access times (atime) metadata on files after reading or writing them ext4 / xfs - barrier=0 / nobarrier - Do not use barriers to pause and receive assurance when writing (aka, trust the hardware) xfs - inode64 - use 64 bit inode numbering - became default in most recent kernel trees xfs - logbufs=8 - Number of in-memory log buffers (between 2 and 8, inclusive) btrfs - space_cache - Btrfs stores the free space data ondisk to make the caching of a block group much quicker (Kernel 2.6.37+). It's a persistent change and is safe to boot into old kernels btrfs - nodatacow - Do not copy-on-write data. datacow is used to ensure the user either has access to the old version of a file, or to the newer version of the file. datacow makes sure we never have partially updated files written to disk. nodatacow gives slight performance boost by directly overwriting data (like ext[234]), at the expense of potentially getting partially updated files on system failures. Performance gain is usually < 5% unless the workload is random writes to large database files, where the difference can become very large btrfs - compress=zlib - Better compression ratio. It's the default and safe for olders kernels btrfs - compress=lzo - Fastest compression. btrfs-progs 0.19 or olders will fail with this option. The default in the kernel 2.6.39 and newer 35 Friday, April 26, 13
  • 36. iobench  with  mount  options 0" 500" 1000" 1500" 2000" 2500" Read"MB/s" Write"MB/s" ext2" ext2"+"op6ons" ext3" ext3"+"op6ons" ext4" ext4"+"op6ons" xfs" xfs"+"op6ons" btrfs" btrfs"+"op6ons" MB/s Higher is better Friday, April 26, 13
  • 37.   IO  Scheduler  Choices 37 Round  and  round  the  disk  drive  spins but  SSD  sits  still  and  grins. It  is  randomly  fast for  data  current  and  past. My  database  upgrade  begins Friday, April 26, 13
  • 38. SQLite 0" 20" 40" 60" 80" 100" 120" 140" 160" ext2" ext3" ext4" xfs" btrfs" CFQ" An5cipatory" Deadline" Noop" Seconds lower is better Friday, April 26, 13
  • 39. aio-­‐stress 0" 100" 200" 300" 400" 500" 600" 700" 800" 900" 1000" ext2" ext3" ext4" xfs" btrfs" CFQ" An8cipatory" Deadline" Noop" MB/s Higher is better Friday, April 26, 13
  • 40. iozone  read 2150% 2200% 2250% 2300% 2350% 2400% 2450% ext2% ext3% ext4% xfs% btrfs% CFQ% An4cipatory% Deadline% Noop% MB/s Higher is Better Friday, April 26, 13
  • 41. iozone  write 0" 50" 100" 150" 200" 250" ext2" ext3" ext4" xfs" btrfs" CFQ" An4cipatory" Deadline" Noop" MB/s Higher is Better Friday, April 26, 13
  • 42.   Real  World  Workloads Flush  local  tables Make  an  LVM  snapshot Backup  with  rsync -­‐  A  Haiku  on  easy  backups  -­‐ Friday, April 26, 13
  • 44. OLTP  Performance  -­‐  1  thread 44 1000# 1200# 1400# 1600# 1800# 2000# 2200# 2400# O_DIRECT#0#ext2# O_DIRECT#0#NFS#(ext2)# O_DIRECT#0#ext3# O_DIRECT#0#ext4# O_DIRECT#0#xfs# O_DIRECT#0#zfs# O_DIRECT#btrfs# fdatasync#0#ext2# fdatasync#0#NFS#(ext2)# fdatasync#0#ext3# fdatasync#0#ext4# fdatasync#0#xfs# fdatasync#0#zfs# fdatasync#0#btrfs# O_DSYNC#0#ext2# O_DSYNC#0#NFS#(ext2)# O_DSYNC#0#ext3# O_DSYNC#0#ext4# O_DSYNC#0#xfs# O_DSYNC#0#zfs# O_DSYNC#0#btrfs# 1/4#ram#0#1#thread# 1#thread,#7/8#ram# Time in Seconds Lower is Better Friday, April 26, 13
  • 45. OLTP  Performance  -­‐  16  thread 45 0" 500" 1000" 1500" 2000" 2500" 3000" 3500" 4000" O_DIRECT"0"ext2" O_DIRECT"0"NFS"(ext2)" O_DIRECT"0"ext3" O_DIRECT"0"ext4" O_DIRECT"0"xfs" O_DIRECT"0"zfs" O_DIRECT"btrfs" fdatasync"0"ext2" fdatasync"0"NFS"(ext2)" fdatasync"0"ext3" fdatasync"0"ext4" fdatasync"0"xfs" fdatasync"0"zfs" fdatasync"0"btrfs" O_DSYNC"0"ext2" O_DSYNC"0"NFS"(ext2)" O_DSYNC"0"ext3" O_DSYNC"0"ext4" O_DSYNC"0"xfs" O_DSYNC"0"zfs" O_DSYNC"0"btrfs" 16"thread"1/4"ram" 16"thread,"7/8"ram" Time in Seconds Lower is Better Friday, April 26, 13
  • 46.   AWS  Cloud  Options 46 Performance,  uptime, Consistency  and  scale-­‐up: No,  this  is  a  cloud… -­‐  A  haiku  on  clouds  -­‐ Friday, April 26, 13
  • 47. Cloud  Performance • EC2  -­‐  Slightly  unpredictable • *Note:  not  my  research  or  graphs.    See  blog.scalyr.com  for  benchmarks  and  writeup 47 Friday, April 26, 13
  • 48.   Conclusions 48 Oracle  is  Red, IBM  is  Blue, I  like  stuff  for  free MySQL  will  do. Friday, April 26, 13
  • 49. Conclusions IO  Schedulers  -­‐  Deadline  or  Noop Filesystem  -­‐  Ext3  is  usually  slowest.    Btrfs  not  there   quite  yet  but  looking  better.    Linux  zfs  is  cool,  but   performance  is  sub-­‐par. InnoDB  Flush  Method  -­‐  O_DIRECT  not  always  best Filesystem  Mount  options  make  a  difference Artificial  benchmarks  are  fun,  but  like  most  things   comparative  speed  is  very  workload  dependent 49 Friday, April 26, 13
  • 50. Further  Reading... For  more  information  please  see  these  great  resources: Wikipedia: http://en.wikipedia.org/wiki/Ext2  and  http://en.wikipedia.org/wiki/Ext3  and  http://en.wikipedia.org/wiki/Ext4  and  http:// en.wikipedia.org/wiki/XFS  and  http://en.wikipedia.org/wiki/Btrfs MySQL  Performance  Blog: http://www.mysqlperformanceblog.com/2009/02/05/disaster-­‐lvm-­‐performance-­‐in-­‐snapshot-­‐mode/ http://www.mysqlperformanceblog.com/2012/05/22/btrfs-­‐probably-­‐not-­‐ready-­‐yet/ http://www.mysqlperformanceblog.com/2013/01/03/is-­‐there-­‐a-­‐room-­‐for-­‐more-­‐mysql-­‐io-­‐optimization/ http://www.mysqlperformanceblog.com/2012/03/15/ext4-­‐vs-­‐xfs-­‐on-­‐ssd/ http://www.mysqlperformanceblog.com/2011/12/16/setting-­‐up-­‐xfs-­‐the-­‐simple-­‐edition/ MySQL  at  Facebook  (and  dom.as  blog): http://dom.as/2008/11/03/xfs-­‐write-­‐barriers/ http://www.facebook.com/note.php?note_id=10150210901610933 Dimitrik: http://dimitrik.free.fr/blog/archives/2012/01/mysql-­‐performance-­‐linux-­‐io.html http://dimitrik.free.fr/blog/archives/02-­‐01-­‐2013_02-­‐28-­‐2013.html#159 http://dimitrik.free.fr/blog/archives/2011/01/mysql-­‐performance-­‐innodb-­‐double-­‐write-­‐buffer-­‐redo-­‐log-­‐size-­‐impacts-­‐mysql-­‐55.html 50 Friday, April 26, 13
  • 51. ...Further  Reading For  more  information  please  see  these  great  resources: Phoronix: http://www.phoronix.com/scan.php?page=article&item=ubuntu_1204_fs&num=1 http://www.phoronix.com/scan.php?page=article&item=linux_39_fs&num=1 http://www.phoronix.com/scan.php?page=article&item=fedora_15_lvm&num=3 Misc: http://erikugel.wordpress.com/2011/04/14/the-­‐quest-­‐for-­‐the-­‐fastest-­‐linux-­‐filesystem/ https://raid.wiki.kernel.org/index.php/Performance http://uclibc.org/~aldot/mkfs_stride.html http://indico.cern.ch/getFile.py/access?contribId=3&sessionId=0&resId=1&materialId=paper&confId=13797 http://linux.die.net/man/2/open http://linux.die.net/man/2/fsync http://blog.scalyr.com/2012/10/16/a-­‐systematic-­‐look-­‐at-­‐ec2-­‐io/ http://docs.openstack.org/trunk/openstack-­‐object-­‐storage/admin/content/filesystem-­‐considerations.html https://btrfs.wiki.kernel.org/index.php/Main_Page http://zfsonlinux.org/ https://blogs.oracle.com/realneel/entry/mysql_innodb_zfs_best_practices 51 Friday, April 26, 13
  • 52. Parting  thought Do  you  like  MyISAM? I  do  not  like  it,  Sam-­‐I-­‐am. I  do  not  like  MyISAM. Would  you  use  it  here  or  there? I  would  not  use  it  here  or  there. I  would  not  use  it  anywhere. I  do  not  like  MyISAM. I  do  not  like  it,  Sam-­‐I-­‐am. Would  you  like  it  in  an  e-­‐commerce  site? Would  you  like  it  with  in  the  middle  of  the  night? I  do  not  like  it  for  an  e-­‐commerce  site. I  do  not  like  it  in  the  middle  of  the  night. I  would  not  use  it  here  or  there. I  would  not  use  it  anywhere. I  do  not  like  MyISAM. I  do  not  like  it  Sam-­‐I-­‐am. Would  you  could  you  for  foreign  keys? Use  it,  use  it,  just  use  it  please! You  may  like  it,  you  will  see Just  convert  these  tables  three… Not  for  foreign  keys,  not  for  those  tables  three! I  will  not  use  it,  you  let  me  be! Friday, April 26, 13