Docstoc

Client-Based Access Control Management for XML

Document Sample
Client-Based Access Control Management for XML Powered By Docstoc
					 uFLIP: Understanding Flash
         IO Patterns




Luc Bouganim, INRIA    Björn Þór Jónsson, RU   Philippe Bonnet, DIKU
Rocquencourt, France      Reykjavík, Iceland   Copenhagen, Denmark




                                                                  1
Why should we consider flash devices?
    •    NAND flash chip typical timings (SLC chip):
           Read a 2KB page:                                             Flash cells
                     Read page (25 µs), transfer (60 µs)
           Write a 2KB page:
                     Transfer (60 µs), write page (200µs)                  RAM buffer

           Erase before rewrite! (2ms for 128 KB)

•       A single flash chip could potentially deliver:
          Read throughput of 23 MB/s, write throughput of 6 MB/s

•       And…
          Random access is potentially as fast as sequential access!
          An SSD contains many (e.g., 8, 16) flash chips. Potential parallelism!

 Flash devices have a high potential

                                                                                        2
but …
•   Flash chips have many constraints
      I/O granularity: a flash page (2 KB)
      No update: Erase before write; erase granularity: a block (64 pages)
      Writes must be sequential within a flash block
      Limited lifetime: max 105 – 106 erase
      Usually, a software layer (Flash Translation Layer) handle these constraints


•   Flash devices are not flash chips
      Do not behave as the flash chip they contain
      No access to the flash chip API but only through the device API
      Complex architecture and software, proprietary and not documented
      Flash devices are black boxes !


•   How can we model flash devices?
      First step: understand their performance

                   Need for a benchmark.
                                                                                      3
The Flash Translation Layer
• Emulates a normal block device, handling flash constraints
          When possible redirect writes to previously erased locations  Update blocks
          Maps logical address (LBA) to physical locations  Mapping information
          Distributes erase across the device (wear levelling)  Other data structures

                      •
                                                                                              RAM R/W
Read(@100, …): R F F D D    IO Cost thus depends on                                           Read
Read(@101, …): R D                The mode of the IO (i.e., read, write)                     Write
                                  Recent IOs (caching in the device RAM)                     Erase
Write(@900, …): R F              FD
                                  The device state (i.e., flash state and data structures)   Free Block
Write(@200, …): R F F D D D D D D D D D D D D D D D
                      •     Device state depends on
                                                                                      D       Unfilled block
                                                                                              Filled block
                                  Entire history of previous IO requests
                                                       Read(@101,
                                                       Write(@900,
                                                       Write(@200,
                                                       Read(@100, …)
                                               Flash Translation Layer API:
                                                                                      Flash Device
 RAM




                                             Read(LBA, &data) /   Write (LBA, data)
                    structures
                    Other FTL
          FTL MAP
 FLASH




                                  …                                                   …
                                  …                                                   …
                                  …                                                   …

         FTL Blocks                                Data Blocks                            Update Blocks
                                                                                                             4
Benchmarking flash devices: Goal and difficulties

•   Why do we need to benchmark flash devices?
      DB technology relies on the HD characteristics …
       … Flash devices will replace or complement HDs …
       … and we have a poor knowledge of flash devices.
      Flash devices are black boxes (complex and undocumented FTLs)
      Large range from USB flash drives to high performance flash board.




•   Benchmarking flash devices is difficult:
      Need to design a sound benchmarking methodology
        – IO cost is highly variable and depends on the whole device history!
      Need to define a broad benchmark
        – No safe assumption can be made on the device behavior (black box)
        – Moreover, we do not want to restrict the benchmark usage!
                                                                                5
Methodology (1): Device state

•                    Measuring Samsung SSD RW performance
                           Out-of-the-box …
                         100
    Response time (ms)




                         10




                          1



                                                     rt
                                                     Avg(rt)
                         0.1
                                  100   200    300   400       500
                                        IO number


                               Random Writes – Samsung SSD
                                      Out of the box


                                                                     6
Methodology (1): Device state

•                    Measuring Samsung SSD RW performance
                           Out-of-the-box … and after filling the device!!! (similar behavior on Intel SSD)

                         100                                                              100




                                                                     Response time (ms)
    Response time (ms)




                         10                                                               10




                          1                                                                1

                                                                                                                      rt
                                                     rt                                                               Avg(rt)
                                                     Avg(rt)                                                          Avg(rt) o-o-b
                         0.1                                                              0.1
                                  100   200    300   400       500                                 100   200    300        400        500
                                        IO number                                                        IO number


                               Random Writes – Samsung SSD                                      Random Writes – Samsung SSD
                                      Out of the box                                                After filling the device


                                                                                                                                            7
Methodology (2): Startup and running phases

 •                    When do we reach a steady state? How long to run each test?

                     100 rt                                                            1000
                                                                                                  rt
                         Avg(rt) incl.
                                                                                                  Avg(rt)
                         Avg(rt) excl.




                                                                  Response time (ms)
Response time (ms)




                      10                                                                100




                       1                                                                 10




                     0,1                                                                  1
                           0             100          200   300                               0             100           200   300
                                            IO number                                                         IO number
                               Startup and running phases for                                 Running phase for the Kingston DTI
                                     the Mtron SSD (RW)                                                flash Drive (SW)




                                                                                                                                      8
Methodology (3): Interferences between
consecutive runs
                      100
                                rt
 Response time (ms)




                      10
                                                                                      Pause length




                       1




                                     Seq. Reads               Random Writes                Seq. Reads
                      0.1
                            0                      5000                       10000                  13000
                                                          IO number
                                             Setup experiment for the Mtron SSD


                                                                                                             9
Proposed methodology:
•   Device state : Enforce a well-defined device state
      performing random write IOs of random size on the whole device
      The alternative, sequential IOs, is less stable, thus more difficult to enforce


•   Startup and running phase: Run experiments to define
      IOIgnore: Number of IOs ignored when computing statistics
      IOCount: Number of measures to allow for convergence of those statistics.


•   Interferences: Introduce a pause between runs
      Run the following experiment: SR, then RW, then SR (with a large IOCount)
      Measure the interferences. In previous experiment, 3000 IOs
      Overestimate the length of the Pause




                                                                                         10
 uFLIP (1): Basic construct: IO Pattern
 •   An IO Pattern is a sequence of IOs
        An IO is defined by 4 attributes (time, size, LBA, mode)
        Baseline Patterns (Seq. Read, Random Read, Seq. Write, Random Write)
        More patterns by using parameterized functions for each attribute


                                                               Sequential
        Consecutive
                                                               Random                           Read
time    Pause (Pause)         size      size (Size)   LBA                               mode
                                                               Ordered (Incr)                   Write
        Burst (Pause,Burst)
                                                               Partitioned (Partitions)




 Consecutive    Consecutive            Pause            Burst          Ordered         Partitioned
  Sequential     Random              Sequential       Sequential

                                                                                                     11
 uFLIP (1): Basic construct: IO Pattern
 •   An IO Pattern is a sequence of IOs
        An IO is defined by 4 attributes (time, size, LBA, mode)
        Baseline Patterns (Seq. Read, Random Read, Seq. Write, Random Write)
        More patterns by using parameterized functions for each attribute


                                                          Sequential
         Consecutive
                                                          Random                          Read
time     Pause (Pause)         size   size (Size)   LBA                            mode
                                                          Ordered (Incr)                  Write
         Burst (Pause,Burst)
                                                          Partitioned (Partitions)


•    Potentially relevant IO patterns
        Basic patterns: one function for each attribute
        Mixed patterns: combining basic patterns
        Parallel patterns: replicating a basic pattern or mixing in // basic patterns
•    Problems:
        IO patterns space is too large!
        Mixed and parallel patterns may be too complex to analyze
                                                                                             12
uFLIP (2): What is a uFLIP micro-benchmark
•   An execution of a reference pattern is a run.
      Measure the response time for individual IOs
      Compute statistics (min, max, mean, standard deviation) to summarize it.

•   A collection of runs of the same pattern is an experiment
      Restriction to a single varying parameter for sound analysis

•   A collection of related experiments is a micro-benchmark
      Defined over the baseline patterns with the same varying parameter


          Micro-benchmark       {experiment}      {{run}}      {{{IO}}}



•   9 varying parameters  9 micro-benchmarks
      Basic patterns: IOSize, IOShift, TargetSize, Partitions, Incr, Pause, Burst
      Mixed patterns: Ratio (mix only two baseline patterns)
      Parallel patterns: ParallelDegree (replicate in // each baseline pattern)
                                                                                     13
uFLIP (3): The 9 micro-benchmarks
 1   Granularity    IOSize     Basic performance? Device latency?

 2   Alignment      IOShift    Penalty for badly aligned IOs?

                    Target
 3    Locality                 IOs focused on a reduced area?
                     Size

 4   Partitioning Partitions   IOs in several partitions?

 5      Order        Incr      Reverse pattern, In place pattern, IOs with gaps?

                   Parallel
 6   Parallelism               IOs in parallel?
                   Degree

 7       Mix        Ratio      Mixing two baseline patterns?

 8     Pause        Pause      Device capacity to benefit from idle periods?

 9     Bursts       Burst      Asynchronous overhead accumulation in time?
                                                                                   14
    Results
                                   SR                                                                                               Samsung
                           8       RR                                                                     9                         Memoright




                                                                         Response time (relative to SW)
                                   SW
                                   RW                                                                                               Mtron
                           7                                                                              8
      Response time (ms)




                           6
                                                                                                          7
                                                                                                          6
                           5
                                                                                                          5
                           4
                                                                                                          4
                           3
                                                                                                          3
                           2
                                                                                                          2
                           1                                                                              1
                           0
                               0        100   200     300    400   500
                                                                                                               1   2   4    8     16   32   64   128
                                              IO size (KB)                                                             TargetSize (MB)


                                          Granularity for the                                                  Locality for the Samsung,
                                           Memoright SSD                                                       Memoright and Mtron SSDs


•   For SR, SW and RR,                                                                                    •   When limited to a focused area,
      linear behavior, almost no latency                                                                     RW performs very well
      good throughputs with large IO Size

•   For RW, 5ms for a 16KB-128KB IO
                                                                                                                                                       15
Results: summary
                       Baseline patterns (32 KB)     Locality    Partitioning           Ordered           Parallelism
                     SR       RR       SW     RW        RW           SW           Reverse     In-Place
                    (ms)     (ms)     (ms)    (ms)     (MB)       (Partitions)   (Incr = -1) (Incr = 0)
SSD Memoright        0.3      0.4      0.3      5     8 (=)        8 (=)              =           =           no
SSD Mtron            0.4      0.5      0.4      9     8 (2)       4 (1.5)           =           =           no
SSD Samsung          0.5      0,5      0.6     18    16 (1.5)     4 (2)          1.5         0.6          no
Module Transcend     1.2      1.3      1.7     18     4 (2)       4 (2)           3           2           no
SSD Transcend MLC    1.4      3.0      2.6    233     4 (=)        4 (2)           2           2           no
USB Kingston DTHX    1.3      1.5      1.8    270    16 (20)      8 (20)          7           6           no
USB Kingston DTI     1.9      2.2      2.9    256       No         4 (5)           8          40           no



•   SR, RR and SW are very efficient
•   Flash devices incur large latency for RW
•   Random writes should be limited to a focused area
•   Sequential writes should be limited to a few partitions
•   Good support for reverse and in place patterns.
•   Surprisingly, no device supports parallel IO submission

                                                                                                                   16
Conclusion
•   The uFLIP benchmark
      Sound methodology: Device preparation & setup  stable measurements
      Broad: 9 micro benchmarks, 39 experiments
      Detailed: 1400 runs, 1 to 5 million I/Os ... for a single device!
      Simple: an experiment = a 2-dimensional graph
      Publicly available: www.uflip.org


•   First results: Flash devices exhibit similar behaviors
      Despite their differences in cost / complexity / interface


•   Current & Future work
      Short term: Visualization tool, with several levels of summarization
      Enhance the software: setup parameters, benchmark duration, ...
      Exploit the benchmark results!
                                                                              17
Experiment color analysis
                            Run




       IO


                                  18
Details




          19
Conclusion
•   The uFLIP benchmark
      Sound methodology: Device preparation & setup  stable measurements
      Broad: 9 micro benchmarks, 39 experiments
      Detailed: 1400 runs, 1 to 5 million I/Os ... for a single device!
      Simple: an experiment = a 2-dimensional graph
      Publicly available: www.uflip.org


•   First results: Flash devices exhibit similar behaviors
      Despite their differences in cost / complexity / interface


•   Current & Future work
      Short term: Visualization tool, with several levels of summarization
      Enhance the software: setup parameters, benchmark duration, ...
      Exploit the benchmark results!
                                                                              20
www.uflip.org



                Questions?

                             21
22
Selecting a device




                     23
Device result summary

     Granularity           SR           RR          SW            RW
     Alignment             SR           RR          SW            RW
     Locality              SR           RR          SW            RW
     Partitioning                 R                        W
     Order                        R                        W
     Parallelism           SR           RR          SW            RW
     Mix               SR/RR    SR/SW    SR/RW    RR/SW   RR/RW   SW/RW
     Pause                 SR           RR          SW            RW
     Bursts                SR           RR          SW            RW




           Experiment marked as interesting
           Experiment marked as not interesting
           Not performed


                                                                          24
Experiment analysis




                      25
Experiment color analysis
                            Run




       IO


                                  26
Details




          27

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:12
posted:2/20/2013
language:Unknown
pages:27