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

MySIAM and Innodb engine

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

In previous versions of MySQL5.1, the default was the MySIAM engine, and each MySIAM stored data as three files on disk.

The first is a table structure file, whose name starts with the name of the table, and its extension indicates the file type, storing table definitions for .frm files.

The second file, with its extension. MYD

The third file is the index file, with the extension .myi (MYINDEX).

MyISAM storage engine is specific to table-level locks, which does not support transactions and full-text indexing, so it is suitable for some CMS content management systems to be used as background databases, but in large concurrency and heavy-load production systems, the characteristics of table-level locks are inadequate, and if the system goes down, the MySQLd process crashes, and the MyISAM engine is easily damaged, so MyISAMchk has to be used to repair her. For this reason, start from MySQL5.5. The default storage engine has become the InnoDB Plugin engine

.

InonoDB provides Mysql with a transaction secure storage engine with commit, rollback and crash recovery capabilities. Its SELECT statement is consistent with Oracle style-unlocked read. To be exact, InnoDB is set for maximum performance when dealing with large amounts of data. Its CPU efficiency is unmatched by any other disk-based relational database engine.

Innodb is widely used in many large database sites with high concurrency and high pressure. Some sites handle an average of 800 of this insert / update load per second on InnoDB.

In version 5.1, the innodb_file _ io_threads parameter defaults to 4, which cannot be changed on Linux systems, but can be adjusted on windows systems. The effect of this parameter is that INnodb uses background threads to process the number of read and write Icano requests on the data page. After version 5. 5, innodb_file_io_threads is replaced with two new parameters. After adjustment, the corresponding parameters can be changed according to the number of CPU cores on the Linux platform. The default is 4. 5.

If there are two 8 cores to join the CPU, it can be set to:

Innodb_read_io_threads = 8

Innodb-write_io_threads=8

If the database has more reads than writes, you can set:

Innodb_read_io_threads = 10

Innodb-write_io_threads=6

As for the specific setting method, it needs to be set according to the situation of your company. However, it should be noted that these two parameters do not support dynamic changes, you need to write the parameters to My.cn, after the modification, remember to restart, the allowable value is 1-64. After the adjustment, you can use show engine innodb status\ G

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