May 12, 2009

read_ahead (disabled) as steroid

Posted by Vadim |

Last week we were busy to align XtraDB performance with 5.4, now we have some results. Currently it is available as “hacks” to XtraDB (available on Lauchpad lp:~percona-dev/percona-xtradb/hacks-porting-tune if you are interested). Basically we took improvements from 5.4 and backported ones performance related to XtraDB.

Here are results for tpcc-like workload, 100W (~10GB) ( raw results and parameters are available here
http://spreadsheets.google.com/ccc?key=rxUEhM2dqbX0uAfq9j6WQ_w ). Box Dell PowerEdge R900 (Does Dell have referral program ? ), with RAID10 (8 disks) on ext3, 32GB of RAM.

As you see there almost no difference and you may say what’s the reason in XtraDB ? The most interesting reason is XtraDB based on InnoDB-plugin and contains its nice features like FAST INDEX CREATION and dynamic pages. And XtraDB has some parameters like “adaptive_checkpoint” and control of “read_ahead”. And if in the same benchmark you disable read-ahead (innodb_read_ahead=none), you can see improvement about 15%

Actually control of read_ahead is very simple patch and can easily be included in 5.4 or InnoDB-plugin.

For curiosity I run the same benchmarks on ext3 vs xfs on SSD card, the results are:

Interesting facts:
- xfs is 25% faster ext3
- the gaps on SSD is more visible than on RAID10
- in the same time gaps can be smoother with disabled read_ahead, however disabling it does not show such improvement like on RAID10

I should mention I have strange results on xtradb running it on xfs on RAID10, I have results about 2times slower than for ext3. I am not sure yet – is it xtradb or xfs problem, and why it appears only on RAID10, but not SSD.

Related posts: :No related posts:
 

4 Comments »

  1. 1. Mark Callaghan

    What did you backport from 5.4?

    Comment :: May 12, 2009 @ 11:01 pm

  2. 2. Vadim

    Mark,

    Here is comment from Yasufumi:

    - “pause” (rep; nop) instruction in spin loop should increase performance of
    mutex/rw_lock contention. It may affect 5~10% in throughput.

    - log_buffer_flush_maybe_sync() will decrease the number of log sync
    at innodb_flush_log_at_trx_commit=[0|2]. It may affect to performance much.

    - The number of request slots for the each IO thread has been increased. (x4)
    It might be short for some high-end environments.

    - relax condition to flush log and contract ibuf at inner loop of srv_master_thread()
    – if (n_pend_ios < 3 && (n_ios – n_ios_old < PCT_IO(5))) {
    + if (n_pend_ios < PCT_IO(3) && (n_ios – n_ios_old < PCT_IO(5))) {

    Comment :: May 12, 2009 @ 11:27 pm

  3. 3. Andy

    Should read_ahead always be disabled then to improve performance?

    What are the pros and cons?

    Comment :: May 13, 2009 @ 3:36 pm

  4. 4. Vadim

    Andy,

    I do not think so, it depends on IO subsystem. For single HDD read_ahead may be useful.

    Comment :: May 13, 2009 @ 8:00 pm

 

Subscribe without commenting

Trackbacks/Pingbacks