After doing some tests, I think I have found out the reasons. The read/write performance of an hard disk is not homogenous. The beginning of the disk is stored on the further cylinders from the center, while the end of the disk is stored on the cylinders close to the center. Because the disk rotation speed is constant, and the information density is constant, the raw performance of the disk is not the same for all cylinders. The performance degradation can be up to 50% when comparing performances at the beginning of the disk and at the end of the disk. I creat a small partition on the disk (using the first 2000 cylinders of the total 17000 cylinders on the disk), mount ext3 file system on it and test the performances of different directories. The performances under different directories are nearly the same :) ======= 2008-01-03 19:06:11 您在来信中写道:======= >ext3-usershello all, > > I am testing ext3 file system recently but find some problem > I use GreatTurbo Enterprise Server 10 (Zuma) and 2.6.20 kernel > I conducted my test as follows: > > mkfs.ext3 /dev/sdb1 > mount /dev/sdb1 /mnt/test > cd /mnt/test > mkdir 0 1 2 3 4 5 6 7 > > I test write and read performance under different subdirs and give the performance result. I also use filefrag to see the file layout. > >Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/0/tmpfile -c -e -+n -w > 5242880 1024 72706 0 80474 0 > /mnt/test/0/tmpfile: 44 extents found, perfection would be 41 extents > >Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/1/tmpfile -c -e -+n -w > 5242880 1024 49957 0 52899 0 >/mnt/test/1/tmpfile: 42 extents found, perfection would be 41 extents > >Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/2/tmpfile -c -e -+n -w > 5242880 1024 60292 0 64664 0 > /mnt/test/2/tmpfile: 42 extents found, perfection would be 41 extents > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/3/tmpfile -c -e -+n -w > 5242880 1024 70540 0 78644 0 > /mnt/test/3/tmpfile: 46 extents found, perfection would be 41 extents > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/4/tmpfile -c -e -+n -w > 5242880 1024 61334 0 67778 0 > /mnt/test/4/tmpfile: 44 extents found, perfection would be 41 extents > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/5/tmpfile -c -e -+n -w > 5242880 1024 66735 0 75114 0 > /mnt/test/5/tmpfile: 42 extents found, perfection would be 41 extents > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/6/tmpfile -c -e -+n -w > 5242880 1024 65062 0 72686 0 > /mnt/test/6/tmpfile: 44 extents found, perfection would be 41 extents > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/7/tmpfile -c -e -+n -w > 5242880 1024 69247 0 78563 0 > /mnt/test/7/tmpfile: 45 extents found, perfection would be 41 extents > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/tmpfile -c -e -+n -w > 5242880 1024 77085 0 81696 0 > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/5/tmpfile2 -c -e -+n -w > /mnt/test/5/tmpfile2: 48 extents found, perfection would be 41 extents > 5242880 1024 57776 0 64870 0 > > Command line used: /root/iozone -s 5g -r 1m -i 0 -i 1 -f /mnt/test/5/tmpfile3 -c -e -+n -w > 5242880 1024 54799 0 59145 0 > /mnt/test/5/tmpfile3: 44 extents found, perfection would be 41 extents > > My questions are: >1. why the performances under different subdirs varies so much? In /mnt/test/0 the performance is 72/80, while in /mnt/test/1 the performance is 49/53 >2. I see that the extents of all files are nearly the same, but their performances are different. What are the other factors that influence the performance except for the extents(fragmentation) of the file? >3. Is it true that the more files there already exists in a dir, the lower performance we will get if we test under the dir? >as in my test, the performance of /mnt/test/5/tmpfile is 66/75, while the performances of /mnt/test/5/tmpfile2 and tmpfile3 are 57/64 54/59 > >Thanks very much > > > > = = = = = = = = = = = = = = = = = = = = 致 礼! liuyue liuyue@xxxxxxxxxx 2008-01-03 _______________________________________________ Ext3-users mailing list Ext3-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ext3-users