query processing on smart ssds
play

Query Processing on Smart SSDs Opportunities and Challenges - PowerPoint PPT Presentation

Query Processing on Smart SSDs Opportunities and Challenges Jaeyoung Do 1 , Yang Seok Ki 2 , Jignesh M. Patel 1 , Chanik Park 2 , Kwanghyun Park 1 , David J. DeWitt 3 1 University of Wisconsin Madison Contact: 2 Samsung Semiconductor Inc.


  1. Query Processing on Smart SSDs Opportunities and Challenges Jaeyoung Do 1 , Yang Seok Ki 2 , Jignesh M. Patel 1 , Chanik Park 2 , Kwanghyun Park 1 , David J. DeWitt 3 1 University of Wisconsin – Madison Contact: 2 Samsung Semiconductor Inc. jignesh@cs.wisc.edu 3 Microsoft Jim Gray Systems Lab The opinions expressed here are those of the authors, and not necessarily of the organizations to which the authors belong. 1

  2. 2 Motivation DRAM CP CPU cache U s Bus DRAM NVRAM (e.g. SSDs) NVRAM (e.g. SSDs) Magnetic Hard Disk Drives

  3. 3 Inside a Modern SSD Flash ¡SSD ¡Device ¡ SRAM Flash Memory Embedded Controller F F Processor Host Flash Memory Interface Controller Controller F F DRAM Controller Flash Memory SSD Controller Controller F F DRAM • Embedded processors (low power) CPU • General-purpose memory Memory • High I/O bandwidth inside the flash chips I/O

  4. 4 100 Bandwidth Relative to the I/O Interface Speed Inside the SSD 10 I/O Interface 1 2007 2008 2009 2010 2011 2012 2013 2014 2015 Year

  5. 5 • Push code through the “straw,” thereby drinking smaller amounts through the straw The Philosophically similar to what Netezza and Exadata Opportunity do today, but using “commodity” resources inside the SSD • Higher performance Potential • Lower energy consumption (Joules/query) Advantages • Lower cost when building balanced systems • Simpler appliances • Programming tools for the SSD are primitive • Not enough “spare” processing power Current • Some hardware architectural limitations Challenges • Deeper DBMS implications: query optimization, buffer pool caching, updates, transaction mgmt., etc.

  6. 6 Host Host Aggregate Aggregate Scan I/O Interface I/O Interface I/O Interface I/O Interface Pre- Aggregate Scan

  7. 7 Implementation Details Samsung • New Smart SSD APIs to run database operations inside the SSD Smart SSD • Open(), Get(), Close(), SendToHost() • Modified the query processor to SQL hard-code selected Smart SSD plans Server • Implement Smart SSD executors

  8. 8 Communication Flow – e.g. Scan SQL ¡Server Smart ¡SSD ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Open(): ¡Metadata OK Scanning ¡… ¡ ¡ ¡ ¡Get(): ¡Are ¡there ¡results? ¡ NO 5μsec ¡ Get(): ¡Are ¡there ¡results? YES, ¡results Get(): ¡Are ¡there ¡results Scan ¡is ¡done FINISHED ¡ ¡ ¡ ¡ ¡ ¡ ¡Close() OK

  9. 9 Data Flow inside the SSD (NSM format) Data page Inside ¡the ¡Flash ¡SSD ¡ If Embedded qualified Processor int char int vchar Flash Memory Controller F F SRAM Host Flash Memory Interface Controller Controller F F DRAM Flash Memory Copy projected Controller Controller A tuple columns’ values F F to output buffer A value of a column Data in a tuple storage DRAM

  10. 10 Storage Formats • NSM layout Data Page int char date int char date Tuple Column • PAX layout

  11. 11 Data Flow inside the SSD with the PAX layout Data page Inside ¡the ¡Flash ¡SSD ¡ 32 Bytes LDM_CMP function If Embedded qualified Processor int int int int Flash Memory Controller F F SRAM Host Flash Memory char char char char Interface Controller Controller F F DRAM Controller Flash Memory Copy projected Controller columns’ values F F to output buffer Data storage A column DRAM A value of a column in a tuple

  12. 12 System Configuration Flash SSD SQL server (Host machine) HDD Samsung 400GB 64-bit Windows 7 HP 146GB 10K SAS SSD RPM SAS HDD 32GB DRAM (24GB dedicated Two ARM Cores to the DBMS) 16KB SRAM for 2.66 GHz Dual Quad Core each core Intel Xeon5430 256KB DRAM for 32KB L1 cache, 6MB L2 cache each core Two 7.5 RPM SATA HDDs one 1MB DRAM output for the OS and one for the Log buffer LSI four-port SATA/SAS 6Gbps HBA (host bus adapter)

  13. 13 Upper Bound on Expected Performance Gains Speed of a Simple Sequential Scan Program 20X Maximum Sequential Read (MB/s) 1500 1000 1560 500 550 80 0 SAS HDD SAS SSD Smart SSD (Internal)

  14. 14 Experimental Setup: Synthetic Data Each table has a number of integer-typed columns Table # Table # tuples # tuples/ Columns Size (GB) (millions) page Synthetic 4 4 10 400 323 Synthetic16 16 30 400 109 Synthetic64 64 110 400 29

  15. 15 Experimental Setup: TPC-H Modified TPC-H Lineitem Table, 600M tuples, 94GB Lineitem ¡ ( ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_ORDERKEY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡bigint, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_PARTKEY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡int, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_SUPPKEY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡int, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_LINENUMBER ¡ ¡ ¡ ¡int, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_QUANTITY ¡ ¡ ¡ ¡bigint, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_EXTENDEDPRICE ¡ ¡ ¡bigint, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_DISCOUNT ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡bigint, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_TAX ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡bigint, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_SHIPDATE ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡int, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_COMMITDATE ¡ ¡ ¡ ¡ ¡ ¡int, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_RECEIPTDATE ¡ ¡ ¡ ¡ ¡ ¡ ¡int, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_RETURNFLAG ¡ ¡ ¡ ¡ ¡ ¡ ¡char(1), ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_LINESTATUS ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡char(1), ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_SHIPINSTRUCT ¡ ¡ ¡ ¡char(25), ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_SHIPMODE ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡char(10), ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡L_COMMENT ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡char(47), ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ) ¡

  16. 16 10% Selection Query SAS HDD SAS SSD SELECT COLUMN_2 Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) 1000 Total Energy (KJ), 15.5X 100 log scale 16.0X 10 1 10 100 1000 Elapsed Time (seconds), log scale

  17. 17 10% Selection Query SAS HDD SAS SSD SELECT COLUMN_2 Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) 100 Total Energy (KJ), log scale 2.4X 2.3X 10 10 100 Elapsed Time (seconds), log scale

  18. 18 10% Selection Query SAS HDD SAS SSD SELECT COLUMN_2 Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) 15 I/O Subsystem Energy (KJ) 10 23.0X 5 16.0X 0 0 500 1000 1500 Elapsed Time (seconds)

  19. 19 10% Selection Query SAS HDD SAS SSD SELECT COLUMN_2 Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) I/O Subsystem Energy (KJ) 1 1.8X 2.3X 0.5 0 0 50 100 150 200 250 Elapsed Time (seconds)

  20. 20 Effect of the # of Tuples on a Page SELECT COLUMN_2, FROM [Synthetic_table] WHERE COLUMN_1 < [VALUE] Synthetic4: (323 tuples/page) SAS SSD 200 Synthetic16: (109 tuples/page) Smart SSD(PAX) Synthetic64: (29 tuples/page) 150 Time (seconds) Smart SSD outperforms the regular SSD Smart SSD underperforms 100 compared to the regular SSD 50 0 Synthetic4 Synthetic16 Synthetic64 Target Table

  21. 21 10% Aggregation Query SAS HDD SAS SSD SELECT AVG(COLUMN_2) Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) 1000 Total Energy (KJ), 16.4X 100 log scale 16.9X 10 1 10 100 1000 Elapsed Time (seconds), log scale

  22. 22 10% Aggregation Query SAS HDD SAS SSD SELECT AVG(COLUMN_2) Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) 100 Total Energy (KJ), log scale 2.6X 2.4X 10 10 100 Elapsed Time (seconds), log scale

  23. 23 10% Aggregation Query SAS HDD SAS SSD SELECT AVG(COLUMN_2) Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) 15 I/O Subsystem Energy (KJ) 10 20.9X 5 16.9X 0 0 500 1000 1500 Elapsed Time (seconds)

  24. 24 10% Aggregation Query SAS HDD SAS SSD SELECT AVG(COLUMN_2) Smart SSD (NSM) FROM Synthetic64 WHERE COLUMN_1 < [VALUE] Smart SSD (PAX) I/O Subsystem Energy (KJ) 1 1.8X 2.4X 0.5 0 0 50 100 150 200 250 Elapsed Time (seconds)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend