In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Reference blog: https://blog.csdn.net/helloanthea/article/details/50464800
Refer to blog: http://wubx.net/21ways-optimize-mysql/, mount file system optimization parameters are as follows (IO performance can be improved by about 20%):
Mount XFS parameters:
(rw, noatime,nodiratime,nobarrier)
Mount ext4 parameters:
Ext4 (rw,noatime,nodiratime,nobarrier,data=ordered)
If you use SSD or solid state disk, you need to consider:
Innodb_page_size = 4K Innodb_flush_neighbors = 0
IO scheduler settings: (modify settings to improve performance by about 20%)
Normally, please use deadline. The default is noop.
The setting principle is: deadline SSD for physical mechanical hard disk, noop for physical mechanical hard disk.
Echo deadline > / sys/block/ {DEV-NAME} / queue/scheduler
Here is an example of mounting the disk of the xfs file system:
[root@tidb4 ~] # fdisk / dev/sdb Welcome to fdisk (util-linux 2.23.2). The changes remain in memory until you decide to write them to disk. Think twice before using the write command. Device does not contain a recognized partition table uses the disk identifier 0xbc1ec199 to create a new DOS disk label. Command (enter m for help): nPartition type: P primary (0 primary, 0 extended, 4 free) e extendedSelect (default p): P partition number (1-4, default 1): start sector (2048-20971519, default is 2048): the default value 2048Last sector will be used, + sector or + size {KMagneM G} (2048-20971519, default is 20971519): will use the default value 20971519 partition 1 has been set to Linux type Set the size to 10 GiB command (enter m for help): wThe partition table has been altered calling ioctl () to re-read partition table. Synchronizing disks.
View disk information:
[root@tidb4 ~] # fdisk-l disk / dev/sda:42.9 GB, 42949672960 bytes 83886080 sector Units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512byte / 512byte I size (min / best): 512byte / 512byte disk label type: dos disk identifier: 0x000c8b0a device Boot Start End Blocks Id System/dev/sda1 * 2048 1026047 512000 83 Linux/dev/sda2 1026048 83886079 41430016 8e Linux LVM disk / dev/sdb:10.7 GB 10737418240 bytes 20971520 sector Units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512byte / 512byte I size (min / best): 512byte / 512byte disk label type: dos disk identifier: 0xbc1ec199 device Boot Start End Blocks Id System/dev/sdb1 2048 20971519 10484736 83 Linux disk / dev/mapper/centos-root:39.2 GB, 39153827840 bytes 76472320 sector Units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512 bytes / 512 bytes I bytes O size (minimum / optimal): 512 bytes / 512 bytes disk / dev/mapper/centos-swap:3221 MB, 3221225472 bytes, 6291456 sector Units = sector of 1 * 512 = 512 bytes sector size (logical / physical): 512 bytes / 512 bytes I Byte size (minimum / optimal): 512 bytes / 512 bytes
Format the disk:
[root@tidb4 ~] # mkfs.xfs / dev/sdb1meta-data=/dev/sdb1 isize=256 agcount=4, agsize=655296 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 finobt=0data = bsize=4096 blocks=2621184 Imaxpct=25 = sunit=0 swidth=0 blksnaming = version 2 bsize=4096 ascii-ci=0 ftype=0log = internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime = none extsz=4096 blocks=0, rtextents=0
Mount the disk:
[root@tidb4] # mount-t xfs-o rw,noatime,nodiratime,nobarrier / dev/sdb1 / data01
View:
[root@tidb4 ~] # df-h File system capacity used available mount point / dev/mapper/centos-root 37G 11G 26G 30% / devtmpfs 726M 0726M 0% / devtmpfs 741m 0741m 0% / dev/shmtmpfs 741m 8.9m 733m 2% / runtmpfs 741m 0741m 0% / sys/fs/cgroup/dev/sda1 497M 157M 340M 32% / boottmpfs 149m 0 149m 0% / run/user/0/dev/sdb1 10G 33M 10G 1% / data01
Add to fstab
Vi / etc/fstab
# # / etc/fstab# Created by anaconda on Thu Sep 29 05:58:14 2016 June # Accessible filesystems, by reference, are maintained under'/ dev/disk'# See man pages fstab (5), findfs (8) Mount (8) and/or blkid (8) for more info#/dev/mapper/centos-root / xfs defaults 0 0UUID=4add79ec-8307-4d22-bfda-9a687db1afa1 / boot xfs defaults 0 0/dev/mapper/centos-swap defaults 0 0/dev/sdb1 / xfs rw,noatime,nodiratime,nobarrier 0 0
XFS is a high-performance file system. Because of its high performance, XFS has become the first choice for many enterprise systems, especially those with large amounts of data that require structured scalability and stability. Many experts recommend using the XFS file system.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.