MySQL 5.6 Innodb data page 16 K vs 8 K Performance Comparison Test

Source: Internet
Author: User

From MySQL5.6, a new parameter innodb_page_size can be set to 8 K and 4 K for Innodb data pages. The default value is 16 K. This parameter must be added to my. cnf at the beginning of initialization. If a table has been created and modified, an error will be reported when MySQL is started.

Reference manual:

650) this. width = 650; "border = 0>

Next I will perform a stress test for 16 K and 8 K.

Hardware: R710, 72 GB memory, 6 300 GB, 15000 forwarded raid 10, XFS partition.

My. cnf parameters:

 
 
  1. innodb_buffer_pool_size = 48G 
  2. innodb_buffer_pool_instances = 8 
  3. innodb_flush_method = O_DIRECT 
  4. innodb_file_per_table = 1
  5. innodb_read_io_threads = 16 
  6. innodb_write_io_threads = 16 
  7. innodb_io_capacity = 2000 
  8. innodb_log_files_in_group = 3 
  9. innodb_flush_log_at_trx_commit = 0 
  10. innodb_log_file_size = 1024M 
  11. innodb_max_dirty_pages_pct = 90 

1. Sysbench parameters (read/write ):

 
 
  1. sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000000 --max-requests=1000000 --num-threads=100  
  2. --mysql-host=192.168.110.121  --mysql-port=3306 --mysql-user=admin --mysql-password=123456 --mysql-db=test  
  3. --oltp-table-name=sbtest --mysql-socket=/tmp/mysql.sock run 

The sbtest table contains 0.1 billion records and the file size is 24 GB.

The following is a 16 K performance diagram:

 
 
  1. innodb_page_size = 16k 

650) this. width = 650; "border = 0>

650) this. width = 650; "border = 0>

The following figure shows the 8 K performance:

 
 
  1. innodb_page_size = 8k 

650) this. width = 650; "border = 0>

650) this. width = 650; "border = 0>

 
 
  1. Conclusion: The Peak page is 16 K, which has a low CPU pressure, with an average of 20%

  2. 8 K page, CPU pressure is 30% ~ 40%, but the select throughput is higher than 16 K


2. Sysbench parameters (read-only ):

 
 
  1. sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=10000000 --max-requests=0 --num-threads=100  
  2. --oltp-read-only=on --mysql-host=192.168.110.121  --mysql-port=3306 --mysql-user=admin --mysql-password=123456 --mysql-db=test 
  3.  --oltp-table-name=sbtest --mysql-socket=/tmp/mysql.sock run 

The sbtest table contains 0.1 billion records and the file size is 24 GB.

The following figure shows the performance of 16 K and 8 K:

650) this. width = 650; "border = 0>

650) this. width = 650; "border = 0>

Conclusion: 16 K on the left and 8 K on the right. The difference is not obvious. Therefore, for read/write frequency, 16 K is currently a good performance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.