05.03.2013 Views

Page Size Selection for OLTP Databases on SSD RAID Storage

Page Size Selection for OLTP Databases on SSD RAID Storage

Page Size Selection for OLTP Databases on SSD RAID Storage

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 · Ilia Petrov et. al<br />

Sequential Throughput [MB/s]<br />

2500<br />

2000<br />

1500<br />

1000<br />

500<br />

0<br />

4k 8k 16k 32k 64k 128k 256k 512k 1024k<br />

Blocksize [KB] SR SW<br />

Fig. 3. Measured sequential throughput<br />

Random Throughput [IOPS]<br />

300000<br />

250000<br />

200000<br />

150000<br />

100000<br />

50000<br />

0<br />

4k 8k 16k 32k<br />

Blocksizes [KB] RR RW<br />

Fig. 4. Measured random throughput<br />

The logical questi<strong>on</strong> now is whether the database can benefit from the hardware improvements. If<br />

so, which aspects c<strong>on</strong>tribute to the best improvement? Last but not least, do established assumpti<strong>on</strong>s<br />

regarding the influence of hardware comp<strong>on</strong>ents such as CPU change in presence of <strong>SSD</strong> storage with<br />

the above characteristics?<br />

We investigated our hypotheses by per<str<strong>on</strong>g>for</str<strong>on</strong>g>ming TPC-C experiments <strong>on</strong> a testbed comprising a<br />

MySQL database and <strong>SSD</strong> storage described above. The used benchmark - DBT2 [DBT2 2010]<br />

is an open source TPC-C implementati<strong>on</strong> [TPC-C ] <strong>on</strong> top of MySQL versi<strong>on</strong> 5.5.9 with innoDB<br />

1.1.5. DBT2 is instrumented according to the TPC-C specificati<strong>on</strong> (Secti<strong>on</strong> 4.2.2 of the TPC-C specificati<strong>on</strong><br />

[TPC-C ]), i.e. to use 20 database c<strong>on</strong>necti<strong>on</strong>s and 10 terminals per warehouse. The standard<br />

MySQL codebase uses a static page size of 16KB, whereas the best random per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance of our testbed<br />

is achieved with 4KB blocksize. There<str<strong>on</strong>g>for</str<strong>on</strong>g>e we rec<strong>on</strong>figured and recompiled MySQL <str<strong>on</strong>g>for</str<strong>on</strong>g> the two sizes,<br />

as well as <str<strong>on</strong>g>for</str<strong>on</strong>g> 8KB. For all experiments the block size of the xfs file system was set to the default<br />

value of 4KB. The TPC-C tests were per<str<strong>on</strong>g>for</str<strong>on</strong>g>med <strong>on</strong> all page size variati<strong>on</strong>s <str<strong>on</strong>g>for</str<strong>on</strong>g> different CPU and<br />

RAM c<strong>on</strong>figurati<strong>on</strong>s. We measure the average resp<strong>on</strong>se time and the average throughput in New<br />

Order Transacti<strong>on</strong>s Per Minute (NoTPM) by varying the number of warehouses, to increase the load<br />

<strong>on</strong> the system. The dataset c<strong>on</strong>tains 1800 warehouses amounting to approx. 150-180GB, str<strong>on</strong>gly<br />

depending <strong>on</strong> the database page size. As defined in Secti<strong>on</strong> 4.2 of the TPC-C specificati<strong>on</strong> [TPC-C ]<br />

we preserve the specificati<strong>on</strong> defined ratio of c<strong>on</strong>necti<strong>on</strong>s and terminals (and hence transacti<strong>on</strong>s) per<br />

warehouse; there<str<strong>on</strong>g>for</str<strong>on</strong>g>e the <strong>on</strong>ly way to increase the load <strong>on</strong> the system is to increase the dataset in<br />

terms of warehouses(Figure 4). This not <strong>on</strong>ly loads the IO-subsystem, but also increases the memory<br />

demand of the buffer manager.<br />

4. PERFORMANCE INFLUENCE OF DATABASE PAGE SIZES<br />

The database research community has widely recognized the trend of growing database page sizes<br />

to compensate <str<strong>on</strong>g>for</str<strong>on</strong>g> the IO characteristics of magnetic disks. Small random accesses (omnipresent in<br />

<str<strong>on</strong>g>OLTP</str<strong>on</strong>g> envir<strong>on</strong>ments) are a weakness of existing HDDs. For large sequential operati<strong>on</strong>s (blocked IO)<br />

the HDD efficiency increases since the transfer rate dominates over the positi<strong>on</strong>ing costs. Large blocks<br />

however lead to larger database buffers. As pointed out by [Schindler et al. 2003; Graefe 2007] there<br />

is a compromise between IO efficiency and buffer size. However a larger page size stands in stark<br />

c<strong>on</strong>trast to the characteristics of <strong>SSD</strong>s.<br />

Figures 5, 6, 7 represent the MySQL results of the TPC-C experiments <str<strong>on</strong>g>for</str<strong>on</strong>g> different page sizes,<br />

buffer sizes and CPUs. We observe a max. 20% per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance improvement in transacti<strong>on</strong> throughput<br />

(NoTPM) due to the page size per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance influence (4KB over 16 KB). The measured transacti<strong>on</strong><br />

throughput improvement can be attributed to the <strong>SSD</strong>s characteristics. These figures substantiate<br />

the claim that <strong>SSD</strong> storage reverts the trend towards larger page sizes. We claim that depending <strong>on</strong><br />

the use of indices versus direct table operati<strong>on</strong>s, the optimal page size is between 2KB and 4KB.<br />

Journal of In<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> and Data Management, Vol. 2, No. 1, February 2011.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!