XFS parameter optimization and Testing

Source: Internet
Author: User

XFS parameter optimization and Testing
(1) test environment

  • Hardware environment

    Inspur NF5270M3, CPU E5-2650 v2@2.60GHz (2 Sockect * 8 Core * 2HT)
    8*16 GB of DDR3@1.33G for RAM (NUMA)
    ASPEED Graphics Family (rev 21) (used in text-only mode)
    HGST HUS724030ALA640 7200 RPM 2.7 TB SATA HDD

  • Software Environment

    Operating System: CentOS Linux release 7.1.1503
    Kernel version: 3.10.0-229. el7.x86 _ 64

(2) System Configuration
  • System Partition

    All tests are performed on the test partition/sdm1. External logs are not used by default.
    The external log is used as a comparative test item only when testing the External Log partition.

  • Other configurations

    Disable CPU frequency/voltage scaling
    The system works in text mode and the graphic interface X is not enabled.

(3) parameter optimization and Conclusion Analysis agcount

A total of five groups of tests, default, agcount = 4

$ mkfs.xfs -f -d agcount=2 /dev/sdm1$ mkfs.xfs -f -d /dev/sdl1$ mkfs.xfs -f -d agcount=8 /dev/sdm1$ mkfs.xfs -f -d agcount=16 /dev/sdm1$ mkfs.xfs -f -d agcount=32 /dev/sdm1$ mount /dev/sdm1 /mnt[root@localhost ~]# filebenchfilebench> load fileserverfilebench> set $dir=/mnt/testfilebench> run 60

Use the fs_mark test tool to test the speed of writing a file system.

fs_mark  -n  10000  -s  100  -L  1  -S  0  -D  100  -N  100  -d  /mnt/test  -t  32

, We can see that the writing journal mode is the worst, and writeback is slightly better than ordered. If your hard disk has battery backup, you can use writeback or ordered.

Journal_dev

Test Group 1: ^ journal_dev

$ mkfs.xfs -f /dev/sdm1$ mount /dev/sdm1 /mnt$ filebenchfilebench> load fileserverfilebench> set $dir=/mnt/testfilebench> run 60

Test Group 2: journal_dev

$ mkfs.xfs -l logdev=/dev/sdk1,size=65536b -f /dev/sdm1$ mount -o logdev=/dev/sdk1 /dev/sdm1 /mnt$ xfs_info /dev/sdm1 log      =external               bsize=4096   blocks=65536, version=2     =                       sectsz=512   sunit=0 blks, lazy-count=1$ filebenchfilebench> load fileserverfilebench> set $dir=/mnt/testfilebench> run 60

According to the test results, if the external device is an ordinary HDD, it will not improve the performance much. SSD/Flash is recommended as an external device.

Barrier

/Dev/sdm1 on/mnt type xfs
Agcount = 4

Test 1: barrier

$ mount /dev/sdm1 /mnt

Test 2: nobarrier

$ mount -o nobarrier /dev/sdm1 /mnt


Fs_mark, 32 threads (-t 32), fsync (open)

fs_mark  -n  10000  -s  100 -L  1  -S 1 -D  100  -N  100  -d  /sdl1 -t  32

With battery backup, you can use the nobarrier option to improve performance.

Noatime

Test 1: reltime

$ mount /dev/sdm1 /mnt$ filebenchfilebench> load filemicro_seqreadfilebench> set $dir=/mnt/testfilebench> run 60

Test 2: noatime

$ mount -o noatime /dev/sdm1 /mnt$ filebenchfilebench> load filemicro_seqreadfilebench> set $dir=/mnt/testfilebench> run 60

Optimize the read operations on the file system without recording the access time of the read files. We can see that in the small file sequential read test, the effect is obvious. noatime can reduce the frequent write operations on the disk.

Other options

Block-size
Logbufs
Logbsize
Lazy-count
Sunit
Swidth
Swalloc
O_DIRECT

This article permanently updates the link address:

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.