In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Ext2, Ext3, Jfs, Xfs, Reiserfs file system performance testing, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.
It is well known that the linux standard file system presents a variety of styles. If we have no special needs, we can use the normal Ext2 file system directly. If we want to avoid lengthy file system detection after a system crash, we can switch to the Ext3 file system. If we have to deal with many small files, ReiserFS is the best choice. In addition to these asking price systems, there are several other journaling file systems that can be used in linux, including IBM AIX's journaling file system JFS and SGI's IRIX system on XFS.
Since there are so many file systems available, which one should we choose? Let's test these file systems to see their advantages and disadvantages. When we have a detailed grasp of these situations, then it is a piece of cake to optimize the file system.
Test environment:
Due to the limited hardware resources, the Vmware virtual machine is used, the version number is: VMware-workstation-full-8.0.0-471780
System kernel version: kernel-PAE-2.6.18-274.3.1.el5.centos.plus.i686
Physical memory: 1G
During the test, the physical host only ran Vmware, a necessary program, and Vmware ran only this virtual host.
The partition size of each test is 1G.
Test tools:
The testing tool we use this time is iozone, which can not only test the file system professionally, but also save the test results as files and analyze and draw the results using Excel, so that the test results can be displayed directly in the form of graphics, which is more convenient for us to analyze the results.
Test scope:
Because the Ext3 file system has three schedulers (journal, ordered and wrirteback), each scheduler has its own scheduling algorithm, and the performance of Ext3 using different schedulers is different, so we need to test the performance of Ext3 using redered and writeback. So we want to test the basic performance of read (read), re-read (reread), write (write), rewrite (rewrite), random-read (random read) and random-write (random write) data of Ext2, Ext3 (redered, writeback), JFS, XFS, and ReiserFS file systems.
Testing process
I. preparatory work
1. Prepare rpm packages of related file systems and testing tools needed
Jfsutils-1.1.12-1.i386.rpm
Kernel-PAE-2.6.18-274.3.1.el5.centos.plus.i686.rpm
Reiserfs-utils-3.6.19-2.4.1.i386.rpm
Kmod-xfs-PAE-0.4-2.i686.rpm
Kmod-xfs-0.4-2.i686.rpm
Xfsprogs-2.9.4-1.el5.centos.i386.rpm
Iozone-3-397.i386.rpm
2. Install the test tool iozone
Rpm-ivh iozone-3-397.i386.rpm
The default installation path of this test tool is very strange. Under / opt, in order to facilitate the use of iozone commands in the future, add all commands of iozone tool to the variable PATH and have a permanent effect. The specific methods are as follows:
Vim / etc/profile
Add the following to the line export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC:
PATH=$PATH:/opt/iozone/bin
The result is shown in the figure:
After saving and exiting, execute the following command to reload the variables of this file
Source / etc/profile
Note: if we are not using a centos system, download the centos kernel rpm package to install it to fully support these file systems. The centos kernel rpm package used in this test is: kernel-PAE-2.6.18-274.3.1.el5.centos.plus.i686.rpm
Installation process:
Rpm-ivh kernel-PAE-2.6.18-274.3.1.el5.centos.plus.i686.rpm
After the installation is complete, you must restart the system and load the new kernel.
Second, install the file system
1. Install the JFS file system
Rpm-ivh jfsutils-1.1.12-1.i386.rpm
Install the JFS file system module
Modprobe jfs
2. Install the ReiserFS file system
Rpm-ivh reiserfs-utils-3.6.19-2.4.1.i386.rpm
Install the ReiserFS file system module
Modprobe reiserfs
3. Install the XFS file system
Rpm-ivh kmod-xfs-0.4-2.i686.rpm
Rpm-ivh xfsprogs-2.9.4-1.el5.centos.i386.rpm
Rpm-ivh kmod-xfs-PAE-0.4-2.i686.rpm
Install the XFS file system module
Modprobe xfs
Third, create the disk partition to be used
Create five 1G partitions on the disk of your host, and the creation process will not be described.
4. Conduct a test
1. Test the Ext2 file system
(1) format a disk created by Ext2 file system
Mkfs.ext2 / dev/sda5 (use your own actual disk partition number, mine is / dev/sda5)
(2) create a mount point and mount the partition
Mkdir / test
Mount / dev/sda5 / test
(3) testing
Iozone-a-s 256m-y 256-I 0-I 1-I 2-f / test/a.test-Rb / root/ext2.wks
(explain what this test command means:-a uses full automatic mode to test the disk using block files of 4k, 8k and 16m sizes, which is too long. We use-y to specify the size of the 256k block to start the test;-s specifies the size of the file to be tested, and it will take a lot of time if the file under test is too large, so we chose 256m -I specify which operational performance of the file system to be tested. 0 means write/rewrite,1 means read/re-read,2 indicates the file being tested, and a.test this file is automatically virtual and does not need to exist;-b means that the test results are saved to a file, and I choose / root/ext2.wks,-R to mean that the file can be opened by excel. )
After the test is completed, a file with the corresponding name will be generated in the corresponding directory we set, and the test ends successfully.
(4) Unmount the mounted disk partition
Umount / test
2. Test the Ext3 file system using ordered scheduler
(1) format a new disk partition into Ext3 format
Mkfs.ext3 / dev/sda6
(2) Mount the disk partition and select ordered scheduler
Mount-o data=ordered / dev/sda6 / test/
(3) Test this file system
Iozone-a-s 256m-y 256-I 0-I 1-I 2-f / test/a.test-Rb / root/ext3_ordered.wks
(4) Uninstall this disk partition
Mount / test
3. Test the Ext3 file system using writeback scheduler
(1) Mount the disk partition that has been formatted as Ext3, and select writeback scheduler
Mount-o data=writeback / dev/sda6 / test
(2) conduct tests
Iozone-a-s 256m-y 256-I 0-I 1-I 2-f / test/a.test-Rb / root/ext3_writeback.wks
(3) Uninstall this disk partition
Mount / test
4. Test the JFS file system
(1) format a new disk partition into JFS format
Mkfs.jfs / dev/sda7
(2) Mount this partition
Mount / dev/sda7/test/
(3) conduct tests
Iozone-a-s 256m-y 256-I 0-I 1-I 2-f / test/a.test-Rb / root/jfs.wks
(4) Uninstall the disk partition
Mount / test
5. Test the XFS file system
(1) format a new disk partition into XFS format
Mkfs.xfs-f / dev/sda8
(2) Mount this disk partition
Mount / dev/sda8 / test/
(3) conduct tests
Iozone-a-s 256m-y 256-I 0-I 1-I 2-f / test/a.test-Rb / root/xfs.wks
(4) Uninstall this disk partition
Mount / test
6. Test the ReiserFS file system
(1) format a new disk partition into ReiserFS format
Mkfs.reiserfs / dev/sda9
(2) Mount this disk partition
Mount / dev/sda9 / test
(3) Test this disk partition
Iozone-a-s 256m-y 256-I 0-I 1-I 2-f / test/a.test-Rb / root/reiserfs.wks
So far, all the file systems have been tested, and then we will copy the six test files to the host with excel software and use excel to organize the results. After importing each test I result file into excel, we will display six lines of data as follows:
Operation performance comparison of Re-writer
Operation performance comparison of Re-reader
Operation performance comparison of Random Write
Through the above six diagrams, we can clearly see the performance differences of each file system against different operations and different file sizes through the comparison of the same operability. According to these differences, according to the characteristics of our system, we can choose the file system that is most suitable for our system, which plays an important role in optimizing the performance of the system itself.
Note: because this is a test on a virtual machine rather than a real physical machine, and there are not enough block sizes and enough files to be tested, the results may have a certain deviation to a certain extent. but this can also basically explain the basic characteristics of each file system, if you want to get the exact test results, you might as well conduct more adequate testing.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.