Page 230 - Kỷ yếu hội thảo khoa học lần thứ 12 - Công nghệ thông tin và Ứng dụng trong các lĩnh vực (CITA 2023)
P. 230

214

                                   A Buffer Based Scheme for SQLite on

                                              NAND Flash Memory




                                                                    1
                                                                                   2
                                           VanPhi Ho , VanDai Tran , KimTrong Le
                                                      1
                                               1 Computer Science Department, VKU
                                             2 Computer Technology Department, VKU
                                          {hvphi, tvdai, lktrong}@vku.udn.vn




                           Abstract. Recently, SQLite is the popular database on smart phone which uses
                           NAND  flash  memory  to  store  data.  Although  SQLite  is  a  lightweight  and
                           powerful database engine and NAND flash memory is very fast, the performance
                           of  SQLite  is  downgraded  by  physical  limitation  of  flash  memory  such  as
                           erase-before-write characteristic. Whenever updating data, SQLite has to create
                           or write back up data to a file called Journal file. This causes a lot of flash memory
                           operations leading to reduction of overall performance of SQLite. To address this
                           problem, this study introduces a buffer based scheme for SQLite on flash memory
                           by using FRAM, called BBS. BBS can minimize the overhead by deploying the
                           hybrid storage  of  FRAM and NAND flash memory. The experimental results
                           show that BBS yields a good performance and improves the reliability.

                           Keywords: SQLite, flash memory, FRAM, Smart phone database.



                     1     Introduction


                     Flash memory [1-3] has been widely used because it has many positive features such
                     as high-speed access, low power consumption, small size and high reliability. Besides
                     these  advantages,  it  has  some  downsides  including  erase-before-write,  limited  life
                     cycle. To help hosts access data stored on the flash memory as accessing disk drives,
                     a module called Flash Translation Layer (FTL) [2] is used to process the logical-to-
                     physical address mapping between the host and flash memory. The FTL has two main
                     features: address mapping and garbage collection. To date, some FTL algorithms have
                     been proposed to limit the physical limitation characteristics and improve the overall
                     performance of flash memory.
                       Despite the fact that performance of a flash memory has been enhanced by using
                     FTL algorithms,  it may encounter performance  degradation  problems when writing
                     data directly because the overwrite operations on flash memory frequently occur. To
                     address  this  problem,  we  propose  a  new  buffer  based  scheme  for  SQLite  on  flash
                     memory, called BBS. The BBS deploys the logging and recovery policies by using
                     an FRAM[4] combining with the original flash memory. Whenever data is written or
                     updated, the BBS writes the data to FRAM to avoid losing data, and then, the data is
                     written to the flash memory as soon as the FRAM is full. If the system reboots after a




                     CITA 2023                                                   ISBN: 978-604-80-8083-9
   225   226   227   228   229   230   231   232   233   234   235