Linux md与LVM性能

前端之家收集整理的这篇文章主要介绍了Linux md与LVM性能前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试调整我的NAS,运行openfiler,并想知道为什么我从RAID 5中的4个WD RE3驱动器获得相对较差的读取性能.

编辑:请注意我说的缓冲磁盘读取速度不缓存速度

编辑:更改格式以明确有两组输出.

当我在元设备上运行hdparm时,我得到了我期望的性能水平,降低到音量,这是速度的三分之一!

任何人都知道为什么? LVM不好吗?

院长

元设备/ dev / md0结果

[root@nas2 etc]# hdparm -tT /dev/md0
/dev/md0:
 Timing cached reads:   4636 MB in  2.00 seconds = 2318.96 MB/sec
 Timing buffered disk reads:  524 MB in  3.01 seconds = 174.04 MB/sec

Vol group / dev / mapper / vg1-vol1结果

[root@nas2 etc]# hdparm -tT /dev/mapper/vg1-vol1
/dev/mapper/vg1-vol1:
 Timing cached reads:   4640 MB in  2.00 seconds = 2320.28 MB/sec
 Timing buffered disk reads:  200 MB in  3.01 seconds =  66.43 MB/sec

编辑:请参阅hdparm手册页中的部分,该部分建议这是对顺序读取性能完全有效的测试,这是我试图解决的问题.

 -t     Perform timings of device reads for benchmark and comparison purposes.  For meaningful results,this operation should be repeated 2-3 times on an otherwise
              inactive system (no other active processes) with at least a couple of megabytes of free memory.  This displays the speed  of  reading  through  the  buffer
              cache  to  the  disk  without  any  prior caching of data.  This measurement is an indication of how fast the drive can sustain sequential data reads under
              Linux,without any filesystem overhead.  To ensure accurate measurements,the buffer cache is flushed during the  processing  of  -t  using  the  BLKFLSBUF
              ioctl.   If  the  -T  flag  is also specified,then a correction factor based on the outcome of -T will be incorporated into the result reported for the -t
              operation.

解决方法

LVM的默认预读设置非常悲观.尝试使用blockdev –setra 8192 / dev / vg1 / vol1,看看是什么阻碍了你的LVM性能.您将始终使用LVM获得性能提升;我们在正确配置的系统上测量它,占底层块设备性能的10%左右.

猜你在找的Linux相关文章