+ All Categories
Home > Documents > Engineering Database Hardware and Software...

Engineering Database Hardware and Software...

Date post: 27-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
21
Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Engineering Database Hardware and So2ware Together Juan Loaiza Senior Vice President Oracle From Engineered Systems to SQL in Silicon
Transcript
Page 1: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Engineering  Database  Hardware  and  So2ware  Together  

1  

Juan  Loaiza  Senior  Vice  President  Oracle  

From  Engineered  Systems    to  SQL  in  Silicon  

Page 2: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Safe  Harbor  Statement  

The  following  is  intended  to  outline  our  general  product  direcFon.  It  is  intended  for  informaFon  purposes  only,  and  may  not  be  incorporated  into  any  contract.  It  is  not  a  commitment  to  deliver  any  material,  code,  or  funcFonality,  and  should  not  be  relied  upon  in  making  purchasing  decisions.  The  development,  release,  and  Fming  of  any  features  or  funcFonality  described  for  Oracle’s  products  remains  at  the  sole  discreFon  of  Oracle.  

Page 3: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Engineering  Database  Hardware  and  SoMware  

•  ExisFng  Engineered  Systems  deeply  integrate  Database  SoMware  with  best-­‐of-­‐breed  hardware  – Exadata  and  Supercluster  

•  This  year  Oracle  extends  integraFon  to  the  Microprocessor  Level  

• Customer  Benefits:  – Performance,  Reliability,  Cost,  Security  

3  

Page 4: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  Exadata  Database  Machine  

•  Scale-­‐out,  database  opFmized  compute,  networking,  and  storage  hardware  for  fastest  performance  and  lowest  costs  

• Unique  soMware  and  protocols  enable  fastest  and  most  efficient  OLTP,  AnalyFcs,  and  ConsolidaFon  

• Delivered  integrated,  opFmized,  automated,  and  supported  end-­‐to-­‐end  to  reduce  operaFons  costs  

4  

Page 5: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

• Compute  Servers  •  Latest  fastest  processors,  largest  memory  

• Unified  Network  -­‐  InfiniBand    for  fastest  performance  

• Storage  Servers  •  2-­‐socket  servers  -­‐  low-­‐cost  and  power  CPUs  •  Fastest  PCIe  flash  combined  with  high  capacity  disk  for  best  performance,  capacity,  and  cost    

•  Data  is  duplicated  across  storage  servers  for  high  availability  

• Scale  by  adding  more  compute  or  storage  servers  as  needed  

Exadata  Hardware  

5  

Compute  Server    

Storage  Server    

Page 6: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

System  Level  Engineering  of  Database  SoMware  and  Hardware  

•  Data  Warehousing  –  SQL  Offload  to  storage  servers  enables  full  flash  bandwidth  (100s  of  GB/sec)    

–  Flash  bandwidth  is  too  high  for  network  •  OLTP  

–  Database  calls  InfiniBand  NICs  directly  bypassing  O/S  to  achieve  millions  of  IOPS  

–  Smart  Flash  logging  accelerates  commits  

•  Availability  –  Instant  server  death  detecFon  by  integraFng  with  InfiniBand  switches  

–  Sub-­‐second  I/O  failover  caps  I/O  latency  – Mirroring  of  In-­‐Memory  Database  data  

•  Storage  –  Achieve  flash  speed  with  disk  capacity  by  intelligently  caching  data  in  flash    

–  Flash  Cache  automaFcally  converts  data  to  columnar  format  for  faster  analyFcs  

•  Safe  ConsolidaKon    –  I/Os  prioriFzed  in  storage  servers  by  database,  or  SQL  user,  or  SQL  job  

–  Low  latency  network  traffic  uses  separate  network  lanes  from  high  bandwidth  traffic  

•  E.g.  separate  Commit  message  and  Report  

6  

Page 7: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Thousands  of  Mission  CriFcal  Deployments      

•  Petabyte  Warehouses  •  Business  ApplicaKons  

•  SAP,  Oracle,  Siebel,  PSFT,  …  

•  Online  Financial  Trading  •  E-­‐Commerce  Sites  • Massive  DB  ConsolidaKon  

•  Public  SaaS  Clouds  •  Oracle  Fusion  Apps,  NetSuite,  Salesforce,  …  

7  

4  out  of  the  5  Largest  Banks,  Telecoms,  Retailers  Run  Exadata  

Page 8: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Deployments  are  Mix  of  OLTP  and  AnalyFcs      •  Half  of  deployments  primarily  OLTP,  half  AnalyFcs  

•  Many  run  mixed  workloads  

•  Some  say  you  need  a  specialized  product  for  each  workload,  Oracle  and  the  market  disagree  •  Key  is  specialized  algorithms,  not  specialized  products  •  Specialty  products  die  as  specialized  algorithms  are  added  to  general  databases  

•  General  databases  have  4  big  advantages  •  Handle  mixed  and  complex  use  cases  •  Less  need  for  complex  cross  product  data  moFon  •  Much  beier  operaFonal  aiributes  

•  Security,  management,  backup,  availability,  scaling,  etc.  

•  Simpler  –  less  moving  parts  to  learn/operate/patch/secure  

8  

Page 9: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Next  Big  IntegraFon  Focus:    In-­‐Memory  Database  

Directly  on  OLTP  Data  

Real Time Analytics

No Changes to Applications

Trivial to Implement

100x  

9  

Oracle  Database  in  Memory  DB,  Released  Summer  2014  

Page 10: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Row  Format  Databases  vs.  Column  Format  Databases  

Rows  Stored  ConFguously    

§  TransacKons  run  faster  on  row  format  –  Example:  Query  or  Insert  a  sales  order  –  Fast  processing  few  rows,  many  columns  

Columns  Stored  

ConFguously  

§ AnalyKcs  run  faster  on  column  format  –  Example  :  Report  on  sales  totals  by  region  –  Fast  accessing  few  columns,  many  rows  

SALES  

SALES  

10  

Page 11: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Oracle  Dual  Format  Architecture  

•  BOTH  row  and  column  formats  for  same  table  

•  Simultaneously  acFve  and  transacFonally  consistent  

•  OLTP  uses  proven  row  format  •  AnalyFcs  &  reporFng  use  new  

in-­‐memory  Column  format  •  Not  persistent,  and  no  logging  •  Quick  to  change  data:  fast  OLTP  

•  Full  Scale-­‐Out  and  Scale-­‐Up  

11  

Normal  Buffer  Cache  

New  In-­‐Memory  Format  

SALES   SALES  

Row  Format  

Column  Format  

The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

SALES  

Page 12: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Orders  of  Magnitude  Faster  AnalyFc  Data  Scans  

•  Each CPU core scans local in-memory columns

•  Scans use fast SIMD vector instructions

•  Billions of rows/sec scan rate per CPU core •  Row format is millions/sec

12  

Vector  Register  Load  

mulFple  region    values  

Vector  Compare    all  values  an  1  cycle  

CPU  

Memory  RE

GION  

CA  

CA  CA  

CA  

Example:  Find  sales  in  region  of  CAlifornia  

>  100x  Faster  

Page 13: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Coming  in  2015:    SPARC  M7  SQL  in  Silicon  

13  

•  TradiFonal  DB  algorithms  too  complex  for  chips  – Code  is  large  with  lots  of  branches  and  random  accesses  

– Speedups  came  from  more  CPU  cores,  bigger  caches,  etc.  

• Big  Change:  In-­‐memory  columnar  is  much  simpler  

•  5  years  ago  Oracle  iniFated  a  revoluFonary  project  – Build  fastest  ever  convenFonal  microprocessor  •  32  cores,  16  DDR4  Channels,  160  GB/sec  measured  bandwidth  

– Add  In-­‐Memory  DB  operaFons  directly  on  chip  

•  First  high-­‐volume  CPU  with  naFve  SQL  opFmizaFons  – High-­‐volume  key  to  keeping  up  with  Moore’s  Law  

SQL  in  Silicon  

SPARCing  a  SQL    Performance  RevoluKon  

Page 14: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

In-­‐Memory  Algorithms  NaFvely  Implemented  on  Silicon  

14  

Performance  DB  In-­‐Memory  

AcceleraFon  Engines    

Capacity  Decompression  

Engines    

Reliability/Security  ApplicaFon  Data  

Integrity    SQL  

in  Silicon  

Page 15: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Performance:  Database  In-­‐Memory  AcceleraFon  Engines  

•  SIMD  Vectors  instrucFons  were  designed  for  graphics,  not  database  

• New  SPARC  M7  chip  has  32  opFmized  database  acceleraFon  engines  (DAX)  built  on  chip  

•  Independently  process  streams  of  columns  – E.g.  find  all  values  that  match  ‘California’    – Up  to  170  Billion  rows  per  second!  

•  Like  adding  32  addiFonal  specialized  cores  to  chip  – Using  less  than  1%  of  chip  space  

15  

Core  

Shared  Cache  

Core  

Core  

Core  

DB  Accel  

DB  Accel  

DB  Accel  

DB  Accel  

32  Database  Accelerators  (DAX)  

SPARC  M7  

Page 16: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Capacity:  Decompression  Engines  •  Compression  is  key  to  putng  more  data  in-­‐memory  

– Databases  compress  repeated  symbols,  e.g.  repeat  of  ‘California’  – Don’t  compress  bit  paierns  -­‐  leier  ‘e’  more  common  than  ‘z’  – Bit  paiern  compression  gives  approximately  2X  more  capacity  

•  Decompression  is  far  more  import  for  databases  than  compression  

•  Bit  paiern  decompression  in  normal  cores  is  slow  – Performance  of  decompress  on  today’s  processors  is  fine  for  disk  data,  slow  for  flash,  huge  boileneck  for  in-­‐memory  database  

– 64  CPU  cores  needed  to  decompress  at  full  memory  speed    

•  SPARC  M7  adds  32  decompress  engines  – Run  bit-­‐paiern  decompress  at  memory  speed  

16  

Doubles  Memory    Capacity  

Page 17: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Database  Accelerators  (DAX):  Pipelined  Streaming  Engines  

17  

DAX   L3  Cache   DRAM  

SRAM  Buffer  

 DicKonary  &  Lookup  Tables  

OZIP  decompress  

Unpack  Input  

Predicate  EvaluaKon  

Bloom  Filter   Filter  Rows  by  Bit  Vector    

Run  Length  Expand  

Pack  Output  

DAX   L3  Cache   DRAM  

CORE CLUSTER

CORE CLUSTER

CORE CLUSTER

CORE CLUSTER

CORE CLUSTER

CORE CLUSTER

CORE CLUSTER

CORE CLUSTER

AC

CE

LER

ATO

RS

CO

HE

RE

NC

E, S

MP

& I/

O IN

TER

CO

NN

EC

T C

OH

ER

EN

CE

, SM

P &

I/O

INTE

RC

ON

NE

CT M

EM

OR

Y C

ON

TRO

L

ME

MO

RY C

ON

TRO

L

L3$ & ON-CHIP NETWORK

AC

CE

LER

ATOR

S

Equivalent  of  32  extra  vector  cores  plus  64  extra  decompress  cores  

Page 18: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Reliability  &  Security:  ApplicaFon  Data  Integrity  

•  Database  In-­‐memory  places  terabytes  of  data  in  memory    – More  vulnerable  to  corrupFon  by  bugs/aiacks  than  storage  

•  SPARC  M7  ApplicaFon  Data  Integrity  implements  fine  grained  memory  protecFon  with  negligible  impact  on  performance  

•  Hidden  “color”  bits  added  to  pointers  (key),  and  content  (lock)  •  Pointer  color  (key)  must  match  content  color  or  program  is  aborted  

– Set  on  memory  allocaFon,  changed  on  memory  free    

•  Helps  prevent  access  off  end  of  structure,  stale  pointer  access,    malicious  aiacks,  etc.  plus  improves  developer  producFvity    

18  

Memory  Pointers  

Memory  Content  

STOP  

Page 19: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

How  Data  ProtecFon  Works  

• Color  bits  kept  in  upper  bits  of  pointers  • Color  bits  kept  for  every  64  byte  aligned  memory  region  

– Similar  to  ECC  (Error  CorrecFon)  bits  but  designed  to  protect  data  from  for  soMware  failures  not  hardware  

– 2  to  5  orders  of  magnitude  finer  granularity  than  OS  pages  

• Color  bits  present  in  enFre  memory  architecture:  – All  memory  paths  – Full  Cache  Hierarchy  – All  Chip  Interconnects  – Color  bits  checked  by  core  load/store  units  

19  

Virtual    Address  

Color  Bits  

64-­‐bit  Pointer  

Page 20: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Copyright  ©  2015  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  

Conclusion  

•  Engineering  Database  Hardware  and  SoMware  – Faster,  More  Reliable,  More  Cost  EffecFve,  More  Secure  databases  

• Oracle  Exadata  is  a  Hardware  Plaxorm  integrated  with  the  Database  at  the  System  Level    

•  This  year  Oracle  Sparc  M7  extends  database  integraFon  to  the  Microprocessor  –  SQL  in  Silicon  

•  The  beginning  of  a  new  era  of  Database  integraFon  – Many  opportuniKes  for  future  research  and  algorithms  

20  

Page 21: Engineering Database Hardware and Software Togethervldb.org/2015/wp-content/uploads/2015/09/loaiza.pdf · 2015-09-16 · Title: Engineering Database Hardware and Software Together.pptx

Recommended