A New Cache Management Approach for Transaction Processing on Flash-based Database Da Zhou 2008-4-23.

Slides:



Advertisements
Similar presentations
Query Processing and Optimizing on SSDs Flash Group Qingling Cao
Advertisements

©Brooks/Cole, 2003 Chapter 5 Computer Organization.
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
1 - Oracle Server Architecture Overview
Embedded Real-Time Systems Design Selecting memory.
Virtual Memory Deung young, Moon ELEC 5200/6200 Computer Architecture and Design Lectured by Dr. V. Agrawal Lectured by Dr. V.
1 External Sorting for Query Processing Yanlei Diao UMass Amherst Feb 27, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Physical Storage Organization. Advanced DatabasesPhysical Storage Organization2 Outline Where and How data are stored? –physical level –logical level.
Chapter 15.7 Buffer Management ID: 219 Name: Qun Yu Class: CS Spring 2009 Instructor: Dr. T.Y.Lin.
Gordon: Using Flash Memory to Build Fast, Power-efficient Clusters for Data-intensive Applications A. Caulfield, L. Grupp, S. Swanson, UCSD, ASPLOS’09.
* Definition of -RAM (random access memory) :- -RAM is the place in a computer where the operating system, application programs & data in current use.
Slide 1 Windows PC Accelerators Reporter :吳柏良. Slide 2 Outline l Introduction l Windows SuperFetch l Windows ReadyBoost l Windows ReadyDrive l Conclusion.
Understanding Intrinsic Characteristics and System Implications of Flash Memory based Solid State Drives Feng Chen, David A. Koufaty, and Xiaodong Zhang.
Lecture 11: DMBS Internals
Simulation of Memory Management Using Paging Mechanism in Operating Systems Tarek M. Sobh and Yanchun Liu Presented by: Bei Wang University of Bridgeport.
Flashing Up the Storage Layer I. Koltsidas, S. D. Viglas (U of Edinburgh), VLDB 2008 Shimin Chen Big Data Reading Group.
Origianal Work Of Hyojun Kim and Seongjun Ahn
Computers in the real world Objectives Explain the need for secondary storage devices Understand the three main storage types – Optical – Magnetic – Solid.
Logging in Flash-based Database Systems Lu Zeping
Speaker: 吳晋賢 (Chin-Hsien Wu) Embedded Computing and Applications Lab Department of Electronic Engineering National Taiwan University of Science and Technology,
A Case for Flash Memory SSD in Enterprise Database Applications Authors: Sang-Won Lee, Bongki Moon, Chanik Park, Jae-Myung Kim, Sang-Woo Kim Published.
Overview of Physical Storage Media
1/14/2005Yan Huang - CSCI5330 Database Implementation – Storage and File Structure Storage and File Structure.
File Processing : Storage Media 2015, Spring Pusan National University Ki-Joune Li.
Design of Flash-Based DBMS: An In-Page Logging Approach Sang-Won Lee and Bongki Moon Presented by Chris Homan.
Physical Storage Organization. Advanced DatabasesPhysical Storage Organization2 Outline Where and How data are stored? –physical level –logical level.
Wei-Shen, Hsu 2013 IEE5011 –Autumn 2013 Memory Systems Solid State Drive with Flash Memory Wei-Shen, Hsu Department of Electronics Engineering National.
Free Space Management.
Design of Flash-Based DBMS: An In-Page Logging Approach Sang-Won Lee and Bongki Moon Presented by RuBao Li, Zinan Li.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Lecture 22 SSD. LFS review Good for …? Bad for …? How to write in LFS? How to read in LFS?
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Introduction to Database Systems1 External Sorting Query Processing: Topic 0.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 7 – Buffer Management.
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
DMBS Architecture May 15 th, Generic Architecture Query compiler/optimizer Execution engine Index/record mgr. Buffer manager Storage manager storage.
ICC Module 3 Lesson 3 – Storage 1 / 4 © 2015 Ph. Janson Information, Computing & Communication Storage – Clip 0 – Introduction School of Computer Science.
Magnetic Disk Rotational latency Example Find the average rotational latency if the disk rotates at 20,000 rpm.
Transactional Flash V. Prabhakaran, T. L. Rodeheffer, L. Zhou (MSR, Silicon Valley), OSDI 2008 Shimin Chen Big Data Reading Group.
1 Lecture 15: Data Storage, Recovery Monday, February 13, 2006.
Main Memory Main memory – –a collection of storage locations, –each with a unique identifier called the address. Word- –Data are transferred to and from.
What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently and safely. Provide.
1 Lecture 16: Data Storage Wednesday, November 6, 2006.
 The emerged flash-memory based solid state drives (SSDs) have rapidly replaced the traditional hard disk drives (HDDs) in many applications.  Characteristics.
COS 518: Advanced Computer Systems Lecture 8 Michael Freedman
Lecture 16: Data Storage Wednesday, November 6, 2006.
Database Management Systems (CS 564)
End of XQuery DBMS Internals
Part V Memory System Design
Introduction to Computers
File Processing : Storage Media
Lecture 11: DMBS Internals
COMPUTER MEMORY & DATA STORAGE
COMPUTER MEMORY & DATA STORAGE
Introduction I/O devices can be characterized by I/O bus connections
Lecture 9: Data Storage and IO Models
COS 518: Advanced Computer Systems Lecture 8 Michael Freedman
CS 140 Lecture Notes: Technology and Operating Systems
File Processing : Storage Media
CS 140 Lecture Notes: Technology and Operating Systems
Chap. 12 Memory Organization
Transaction Log Internals and Performance David M Maxwell
Chapter 5 Computer Organization
Lecture 18: DMBS Overview and Data Storage
COS 518: Advanced Computer Systems Lecture 9 Michael Freedman
Lecture 17: Data Storage and Recovery
Lecture 15: Data Storage Tuesday, February 20, 2001.
Clock Algorithm Example
Presentation transcript:

A New Cache Management Approach for Transaction Processing on Flash-based Database Da Zhou

2 Outline Introduction of flash memory/magnetic disk Traditional IO mechanism on magnetic disk Problem statement Our method and Experiments –Committed transactions –Uncommitted transactions –Log-based write

3 Architecture of Hardware

4 Difference on Physical Characteristics 1.Read/Write/Erase 2.Asymmetric speed of read/write/erase 3.Erase before rewrite 4.Limited erase times 5.Read/write page, erase block, 1 block=64 pages 1.Read/Write 2.The same speed of read/write 3.Rewrite in-place 4.No limited write times 5.Read/write sector Note: one flash page contains 2048 bytes

5 Outline Introduction to flash memory/magnetic disk Traditional IO mechanism on magnetic disk –Stealing frame –Not forcing pages Problem statement Our method and Experiments

6 Introduction to “Stealing Frame” Algorithm T1 T R(A) W(A) R(B) T1 reads A and updates A, then T2 read B. At this time, although T1 has not committed, the memory has no more capacity to load B. At this scenario, the updated A is written to disk, and B is loaded.

7 Introduction to “Not Forcing Pages” Algorithm T1 T R(A) W(A) Commit R(A) W(A) T1 reads A and updates A, then T1 commits. Although T1 has committed, memory still has large free space, so the updated A is still in memory. Another case: After T1 committed, then next transaction T2 need to read the result of the T1. At this case, the updated A will not be written to disk.

8 Outline Introduction to flash memory/magnetic disk Traditional IO mechanism on magnetic disk Problem statement –“Stealing frame” on flash memory –“Not forcing pages” on flash memory –LRU on flash memory Our method and Experiments

9 Basic Difference The characteristics of the Server : 1.In-place update 2.High lateness on I/O 3.Large memory The characteristics of the embedded computer: 1.Out-of-place update 2.High read/write speed 3.Limited memory

10 Stealing Frame (Magnetic Disk) IO Cost: 2 IOs

11 Stealing Frame (Embedded Computer) Out-place-update –Series update –Garbage collection IO: depth garbage: depth*page IO:depth write depth/64 erase IO Cost

12 Not Forcing Pages (Magnetic Disk) Large memory High cost of IO 160G 7200rpm Average Seek Time9ms Configuration options HP 9000 Superdome 16 slots HP 9000 Superdome 32 slots HP 9000 Superdome 64 slots Min./ Max. Memory 8 GB/512 GB8 GB/1 TB24 GB/2 TB

13 Not Forcing Pages (Flash Memory) Flash memoryMagnetic disk Read25μs9ms (Rand.) Write200μs9ms (Rand.) Erase1.5msN/A Limited memory Low cost of IO HP iPAQ rw6818 Multimedia HP iPAQ 112 Memory64MB64MB SDRAM

14 LRU on Disk According to LRU, A will be firstly outputted to disk. If A is the next data to be read, series update and garbage collection will be unavoidable.

15 Outline Introduction to flash memory/magnetic disk Traditional IO mechanism on magnetic disk Problem statement Our method and Experiments –Committed Transactions –Uncommitted Transactions –Log-based write

16 Committed Transactions Although T2 accesses F later than T3 accesses D, T2 will be outputted from memory earlier than T3 because T2 commits earlier than T3. According to our design, T3 is outputted earlier than T1.

17 Committed Transactions 768 transactions are running in the RAM. When 256 transactions are committed, each of other 512 uncommitted transactions only loads half of the data. According to the result, our method reduces by 63% IO time compared with the ARIES on SSD, even more on the write time.

18 Uncommitted Transactions The AAT of T1, T2, T3 is 6.5, 3.5, 4, then the output order is T2, T3, T1. So our method reflects the real situation of the transaction replacement mechanism of the RAM. Average Access Time

19 Uncommitted Transactions 1024 transactions run in the RAM at the same time. Every transaction loads a page of data in turn. Our AAT-based method can enhance the replace right ratio, reduce the temporary data, and then improve by 11%

20 Log-based Write When the transaction is outputted from the RAM, the modifications of transaction are organized as logs. The logs are written to the flash memory instead of data.

21 Log-based Write If the transaction needs to read the data again, we must to read the log and the original data, merge the data and its log to get the newest data. When the transaction is outputted from RAM, the logs are written to flash memory, and the data is not deleted in RAM. Only when new data is loaded into RAM, the data will be deleted.

22 Log-based Write 1024 transactions run in the RAM at the same time. Every transaction loads a page of data in turn. Although the performance of read increases by 25%, the total performance enhances by 34% as write performance improves by 75%.

23 Total Design The uncommitted transactions have higher priority than the committed transactions in memory when transaction must be outputted to flash memory. As shown in figure 3, the number of committed transactions reduces and that of uncommitted transactions with stealing pages increases when the number of total transactions increases. When only uncommitted transactions are in memory, AAT is used to decide which transaction will be outputted to flash memory. When an uncommitted transaction is outputted, the modifications are formed as logs which are written to flash memory instead of the data.

Thank You