Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql 5.5Parameter-- innodb_read (write) _ io_threads

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

# in version 5.1, this FILE_IO piece of MYSQL uses only 4 threads to process IO

# but on 5.5, with the stronger support for multithreading, INNODB has also strengthened its support for IO read and write threads, giving more play to the advantages of multithreading.

# the number of IO threads has been increased to 10 by default. (it is useless to match too many threads, because the capacity of IO is limited and special models are required.)

# actually this has been enhanced since 5.5.0, but it's not too late to talk about it here; [@ more@]

# 5.1

# innodb_file_io_threads

# The number of file I/O threads in InnoDB.

# Normally, this should be left at the default value of 4, but disk I/O on Windows may benefit from a larger number.

# On Unix, increasing the number has no effect; InnoDB always uses the default value.

# 5.5

Innodb_read_io_threads=4 # (default)

Innodb_write_io_threads=4 # (default)

-

Root@127.0.0.1: (none) 10:46:59 > show variables like 'innodb_%io%threads'

+-+ +

| | Variable_name | Value |

+-+ +

| | innodb_read_io_threads | 4 |

| | innodb_write_io_threads | 4 |

+-+ +

2 rows in set (0.00 sec)

Root@127.0.0.1: (none) 10:47:09 > select version ()

+-+

| | version () |

+-+

| | 5.5.7-rc-log |

+-+

1 row in set (0.00 sec)

# show engine innodb status on V 5.5

# # #

FILE I/O

-

I thread 0 state: waiting for completed aio requests (insert buffer thread)

I thread 1 state: waiting for completed aio requests (log thread)

I thread 2 state: waiting for completed aio requests (read thread)

I thread 3 state: waiting for completed aio requests (read thread)

I thread 4 state: waiting for completed aio requests (read thread)

I thread 5 state: waiting for completed aio requests (read thread)

I thread 6 state: waiting for completed aio requests (write thread)

I thread 7 state: waiting for completed aio requests (write thread)

I thread 8 state: waiting for completed aio requests (write thread)

I thread 9 state: waiting for completed aio requests (write thread)

Pending normal aio reads: 0 [0, 0, 0, 0], aio writes: 0 [0, 0, 0, 0]

Ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0

Pending flushes (fsync) log: 0; buffer pool: 0

153 OS file reads, 3 OS file writes, 3 OS fsyncs

0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s

# show engine innodb status on V5.1

-

FILE I/O

-

Waiting for O thread 0 state: waiting for iUnip o request (insert buffer thread)

I thread 1 state: waiting for I request (log thread)

I thread 2 state: waiting for I request (read thread)

I thread 3 state: waiting for I request (write thread)

Pending normal aio reads: 0, aio writes: 0

Ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0

Pending flushes (fsync) log: 0; buffer pool: 0

24 OS file reads, 138506 OS file writes, 6249 OS fsyncs

0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s

# We found out

# the 4 FILE_iO threads in 5.1 include:

Insert buffer thread

Log thread

Read thread

Write thread

# and at 5.5, there are a total of 10 FILE_IO threads

(insert buffer thread) * 1

(log thread) * 1

(read thread) * 4

(write thread) * 4

With the support of more read and write threads, it also increases the concurrency ability of INNODB.

Look forward to the faster maturity of version 5.5

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report