Improve MySQL usage efficiency under FreeBSD

Source: Internet
Author: User

The test concluded that FreeBSD currently lacks a stable and efficient Filesystem for MySQL MyISAM.

First, explain the current environment. There are two Tyan servers, Dual Quad Core and 12 gb ram (6*2 GB) attached to two 73 gb scsi hard disks, the difference between the two is the CPU. The new one is E5410 (2333 Mhz, 2 * 6144KB L2), and the old one is E5320 (1866 Mhz, 2 * 4096KB L2 ).

The old MySQL database of PIXNET production runs Debian/amd64, the kernel is 2.6.22, and the file system is XFS. Another one was added a while ago. It was installed with FreeBSD/amd64 7.0-BETA2 and then upgraded to 7.0-PRERELEASE through make kernel & make world. The file system is UFS2. According to the Convention, parameters such as noatime and nodiratime are set up, both of which run MySQL 5.1.22-rc and both are MySQL slave.

It is easy to copy the slave. When there are few users, the other slave will be responsible for this original task.) copy the entire directory to the new FreeBSD, after the server_id is changed, MySQL will be updated with the master.

Then use databases/mytop to check replication delay (the original mytop does not have this message, which is the function of FreeBSD ports patch), and find that even if replication sync is run, in some cases, the UPDATE speed will not keep up with the master, and I/O will be fully loaded (as shown through gstat)

The best test is to run gstripe-s 16384 to concatenate da {0, 1} and use async + noatime. Other situations include:

Gstripe-s 16384 + gjournal + async + noatime: the log-type Filesystem does not speed up usage such as DB, which is similar to expected.

Gstripe-s 16384 + soft updates + noatime: after all, it is slower to maintain the consistent.

Single hard drive + async + noatime: as expected, the speed is only half.

In terms of efficiency, we will run Debian/amd64 to raise MySQL in the short term.

In addition, when gjournal is enabled, rsync is used to copy the data to the local machine. As a result, the kernel panic occurs. Later, after the data is copied, gjournal is used, this part also goes to other machines to see what is going on.

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.