Ubuntu 12.04 OCZ RevoDrive3 PCI-E performance so bad when cache on

前段时间将服务器装成了Ubuntu 12.04.2 desktop x64.

内核升级到了3.5.0-26

root@digoal-PowerEdge-R610:~# uname -a
Linux digoal-PowerEdge-R610 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon Mar 11 22:17:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

OCZ没有提供这个内核版本的Ubuntu 12.04 RevoDrive3的驱动. 如下 : 

http://ocz.com/enterprise/download/drivers

虽然12.04能够将其驱起来, 但是奇怪的是1块240G的盘变成了2块120G的盘.

# 设备如下 :

root@digoal-PowerEdge-R610:~# lspci|grep OCZ
04:00.0 SCSI storage controller: OCZ Technology Group, Inc. Device 1021 (rev 02)
05:00.0 SCSI storage controller: OCZ Technology Group, Inc. Device 1021 (rev 02)

# fdisk看到的块设备如下 : 

Disk /dev/sdd: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdf doesn't contain a valid partition table

Disk /dev/sdg: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdg doesn't contain a valid partition table

# 驱动信息如下, 使用的是mvsas驱动 : 

root@digoal-PowerEdge-R610:~# lspci -vv -s 04:00.0
04:00.0 SCSI storage controller: OCZ Technology Group, Inc. Device 1021 (rev 02)
        Subsystem: OCZ Technology Group, Inc. Device 1021
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 38
        Region 0: Memory at df1a0000 (64-bit, non-prefetchable) [size=128K]
        Region 2: Memory at df1c0000 (64-bit, non-prefetchable) [size=256K]
        Expansion ROM at df100000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 4096 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+ Unsupported+
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Latency L0 <512ns, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis+
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt+ UnxCmplt+ RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP+ FCP+ CmpltTO+ CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC+ UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr+ BadTLP+ BadDLLP+ Rollover+ Timeout+ NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Kernel driver in use: mvsas
        Kernel modules: mvsas

root@digoal-PowerEdge-R610:~# lspci -vv -s 05:00.0
05:00.0 SCSI storage controller: OCZ Technology Group, Inc. Device 1021 (rev 02)
        Subsystem: OCZ Technology Group, Inc. Device 1021
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 40
        Region 0: Memory at df2a0000 (64-bit, non-prefetchable) [size=128K]
        Region 2: Memory at df2c0000 (64-bit, non-prefetchable) [size=256K]
        Expansion ROM at df200000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 4096 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+ Unsupported+
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 256 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Latency L0 <512ns, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis+
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt+ UnxCmplt+ RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP+ FCP+ CmpltTO+ CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC+ UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr+ BadTLP+ BadDLLP+ Rollover+ Timeout+ NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Kernel driver in use: mvsas
        Kernel modules: mvsas

# 默认情况下cache是开启的

root@digoal-PowerEdge-R610:~# hdparm -I /dev/sdd|grep cache
        cache/buffer size  = unknown
           *    Write cache
root@digoal-PowerEdge-R610:~# hdparm -I /dev/sde|grep cache
        cache/buffer size  = unknown
           *    Write cache
root@digoal-PowerEdge-R610:~# hdparm -I /dev/sdf|grep cache
        cache/buffer size  = unknown
           *    Write cache
root@digoal-PowerEdge-R610:~# hdparm -I /dev/sdg|grep cache
        cache/buffer size  = unknown
           *    Write cache

# 在cache开启的情况下测试io能力, (完全不如以前在CentOS下的测试结果) :

pg92@digoal-PowerEdge-R610-> pg_test_fsync -f /data03/pg92/test
2 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 16kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                    2071.301 ops/sec
        fdatasync                        1990.998 ops/sec
        fsync                            1805.694 ops/sec
        fsync_writethrough                            n/a
        open_sync                        1823.106 ops/sec

Compare file sync methods using two 16kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                    1045.190 ops/sec
        fdatasync                        1868.589 ops/sec
        fsync                            1655.421 ops/sec
        fsync_writethrough                            n/a
        open_sync                         908.051 ops/sec

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
         1 * 16kB open_sync write        1826.952 ops/sec
         2 *  8kB open_sync writes        943.839 ops/sec
         4 *  4kB open_sync writes        474.954 ops/sec
         8 *  2kB open_sync writes        238.428 ops/sec
        16 *  1kB open_sync writes        118.964 ops/sec

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
        write, fsync, close              1819.038 ops/sec
        write, close, fsync              1820.679 ops/sec

Non-Sync'ed 16kB writes:
        write                           133770.955 ops/sec

#关闭cache : 

root@digoal-PowerEdge-R610:~# hdparm -W 0 /dev/sdd

/dev/sdd:
 setting drive write-caching to 0 (off)
 write-caching =  0 (off)
root@digoal-PowerEdge-R610:~# hdparm -W 0 /dev/sde

/dev/sde:
 setting drive write-caching to 0 (off)
 write-caching =  0 (off)
root@digoal-PowerEdge-R610:~# hdparm -W 0 /dev/sdf

/dev/sdf:
 setting drive write-caching to 0 (off)
 write-caching =  0 (off)
root@digoal-PowerEdge-R610:~# hdparm -W 0 /dev/sdg

/dev/sdg:
 setting drive write-caching to 0 (off)
 write-caching =  0 (off)

#再次测试iops能力, 性能居然上来了, 和CentOS中使用ocz提供的驱动性能差不多 : 

# 同时增加对open_datasync的支持, fsync的iops也大大增强.

pg92@digoal-PowerEdge-R610-> pg_test_fsync -f /data03/pg92/test
2 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 16kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                   11713.707 ops/sec
        fdatasync                        8277.305 ops/sec
        fsync                            8006.412 ops/sec
        fsync_writethrough                            n/a
        open_sync                       10998.478 ops/sec

Compare file sync methods using two 16kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                    5950.801 ops/sec
        fdatasync                        5800.574 ops/sec
        fsync                            5497.299 ops/sec
        fsync_writethrough                            n/a
        open_sync                        5432.590 ops/sec

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
         1 * 16kB open_sync write       10227.795 ops/sec
         2 *  8kB open_sync writes       7077.777 ops/sec
         4 *  4kB open_sync writes       4336.506 ops/sec
         8 *  2kB open_sync writes       2077.545 ops/sec
        16 *  1kB open_sync writes        936.299 ops/sec

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
        write, fsync, close              7316.087 ops/sec
        write, close, fsync              7283.201 ops/sec

Non-Sync'ed 16kB writes:
        write                           136783.312 ops/sec

# 当前io调度算法为noop : 

root@digoal-PowerEdge-R610:~# cat /sys/block/sdd/queue/scheduler
[noop] deadline cfq
root@digoal-PowerEdge-R610:~# cat /sys/block/sde/queue/scheduler
[noop] deadline cfq
root@digoal-PowerEdge-R610:~# cat /sys/block/sdf/queue/scheduler
[noop] deadline cfq
root@digoal-PowerEdge-R610:~# cat /sys/block/sdg/queue/scheduler
[noop] deadline cfq 

# 修改调度算法为cfq, (这个是CentoS 5中默认使用的算法)

root@digoal-PowerEdge-R610:~# echo "cfq" > /sys/block/sdd/queue/scheduler
root@digoal-PowerEdge-R610:~# echo "cfq" > /sys/block/sde/queue/scheduler
root@digoal-PowerEdge-R610:~# echo "cfq" > /sys/block/sdf/queue/scheduler
root@digoal-PowerEdge-R610:~# echo "cfq" > /sys/block/sdg/queue/scheduler

# 再次测试 : 

pg92@digoal-PowerEdge-R610-> pg_test_fsync -f /data03/pg92/test
2 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 16kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                   12010.934 ops/sec
        fdatasync                       10253.836 ops/sec
        fsync                            9368.252 ops/sec
        fsync_writethrough                            n/a
        open_sync                       11250.309 ops/sec

Compare file sync methods using two 16kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                    6145.088 ops/sec
        fdatasync                        7003.223 ops/sec
        fsync                            6475.531 ops/sec
        fsync_writethrough                            n/a
        open_sync                        5644.215 ops/sec

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
         1 * 16kB open_sync write       11284.139 ops/sec
         2 *  8kB open_sync writes       7148.275 ops/sec
         4 *  4kB open_sync writes       4054.198 ops/sec
         8 *  2kB open_sync writes       1961.062 ops/sec
        16 *  1kB open_sync writes        997.870 ops/sec

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
        write, fsync, close              8520.578 ops/sec
        write, close, fsync              8505.347 ops/sec

Non-Sync'ed 16kB writes:
        write                           136786.109 ops/sec

# 修改调度算法为deadline, 再次测试 : 

pg92@digoal-PowerEdge-R610-> pg_test_fsync -f /data03/pg92/test
2 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 16kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                   12010.934 ops/sec
        fdatasync                       10253.836 ops/sec
        fsync                            9368.252 ops/sec
        fsync_writethrough                            n/a
        open_sync                       11250.309 ops/sec

Compare file sync methods using two 16kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                    6145.088 ops/sec
        fdatasync                        7003.223 ops/sec
        fsync                            6475.531 ops/sec
        fsync_writethrough                            n/a
        open_sync                        5644.215 ops/sec

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
         1 * 16kB open_sync write       11284.139 ops/sec
         2 *  8kB open_sync writes       7148.275 ops/sec
         4 *  4kB open_sync writes       4054.198 ops/sec
         8 *  2kB open_sync writes       1961.062 ops/sec
        16 *  1kB open_sync writes        997.870 ops/sec

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
        write, fsync, close              8520.578 ops/sec
        write, close, fsync              8505.347 ops/sec

Non-Sync'ed 16kB writes:
        write                           136786.109 ops/sec
pg92@digoal-PowerEdge-R610-> pg_test_fsync -f /data03/pg92/test
2 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 16kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                   13353.306 ops/sec
        fdatasync                       11012.296 ops/sec
        fsync                           10200.735 ops/sec
        fsync_writethrough                            n/a
        open_sync                       12389.684 ops/sec

Compare file sync methods using two 16kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                    6732.473 ops/sec
        fdatasync                        7379.819 ops/sec
        fsync                            6803.874 ops/sec
        fsync_writethrough                            n/a
        open_sync                        6232.601 ops/sec

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
         1 * 16kB open_sync write       12433.956 ops/sec
         2 *  8kB open_sync writes       7998.036 ops/sec
         4 *  4kB open_sync writes       4608.304 ops/sec
         8 *  2kB open_sync writes       2198.007 ops/sec
        16 *  1kB open_sync writes       1154.104 ops/sec

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
        write, fsync, close              9500.881 ops/sec
        write, close, fsync              9435.500 ops/sec

Non-Sync'ed 16kB writes:
        write                           135123.284 ops/sec

关于这几种调度算法的详细介绍参考wiki.

[其他]

1. mvsas的版本0.8.16, 下次找个新版本驱动试试看cache on的测试是否正常 :

root@digoal-PowerEdge-R610:~# lsmod|grep mvsas
mvsas                  62360  4
libsas                 78483  1 mvsas
scsi_transport_sas     41029  2 mvsas,libsas
root@digoal-PowerEdge-R610:~# modinfo mvsas
filename:       /lib/modules/3.5.0-26-generic/kernel/drivers/scsi/mvsas/mvsas.ko
license:        GPL
version:        0.8.16
description:    Marvell 88SE6440 SAS/SATA controller driver
author:         Jeff Garzik <jgarzik@pobox.com>
srcversion:     388EA50BE3558CE73E83218
alias:          pci:v00001B85d00001084sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001083sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001080sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001044sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001043sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001042sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001041sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001040sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001022sv*sd*bc*sc*i*
alias:          pci:v00001B85d00001021sv*sd*bc*sc*i*
alias:          pci:v00001B4Bd00009485sv*sd00009480bc*sc*i*
alias:          pci:v00001B4Bd00009445sv*sd00009480bc*sc*i*
alias:          pci:v00001B4Bd00009480sv*sd00009480bc*sc*i*
alias:          pci:v00001103d00002760sv*sd*bc*sc*i*
alias:          pci:v00001103d00002744sv*sd*bc*sc*i*
alias:          pci:v00001103d00002740sv*sd*bc*sc*i*
alias:          pci:v00001103d00002722sv*sd*bc*sc*i*
alias:          pci:v00001103d00002721sv*sd*bc*sc*i*
alias:          pci:v00001103d00002720sv*sd*bc*sc*i*
alias:          pci:v00001103d00002710sv*sd*bc*sc*i*
alias:          pci:v00009005d00000450sv*sd*bc*sc*i*
alias:          pci:v000017D3d00001320sv*sd*bc*sc*i*
alias:          pci:v000017D3d00001300sv*sd*bc*sc*i*
alias:          pci:v000011ABd00009180sv*sd*bc*sc*i*
alias:          pci:v000011ABd00009480sv*sd*bc*sc*i*
alias:          pci:v000011ABd00006485sv*sd*bc*sc*i*
alias:          pci:v000011ABd00006440sv*sd*bc*sc*i*
alias:          pci:v000011ABd00006440sv*sd00006480bc*sc*i*
alias:          pci:v000011ABd00006340sv*sd*bc*sc*i*
alias:          pci:v000011ABd00006320sv*sd*bc*sc*i*
depends:        libsas,scsi_transport_sas
intree:         Y
vermagic:       3.5.0-26-generic SMP mod_unload modversions
parm:           collector:
        If greater than one, tells the SAS Layer to run in Task Collector
        Mode.  If 1 or 0, tells the SAS Layer to run in Direct Mode.
        The mvsas SAS LLDD supports both modes.
        Default: 1 (Direct Mode).
 (int)

[参考]

1. http://ocz.com/enterprise/download/drivers

2. http://blog.163.com/digoal@126/blog/static/1638770402012102613815282/

3. http://blog.163.com/digoal@126/blog/static/163877040201210279569426/

4. http://en.wikipedia.org/wiki/Scheduling_(computing)

5. http://en.wikipedia.org/wiki/CFQ

6. http://en.wikipedia.org/wiki/Anticipatory_scheduling

7. http://en.wikipedia.org/wiki/Noop_scheduler

8. http://en.wikipedia.org/wiki/Deadline_scheduler

9. 附centos中使用ocz提供的驱动以及cfq, 开启cache下测试数据 : 

centos下关闭cache的测试没有做过, 但是从后面多次测试其他场景的数据来看, 使用ocz驱动开启和关闭cache性能相差不大.

pg9.2.0@db-172-16-3-150-> pg_test_fsync
2 seconds per test
O_DIRECT supported on this platform for open_datasync and open_sync.

Compare file sync methods using one 16kB write:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                                 n/a
        fdatasync                        9466.480 ops/sec
        fsync                             261.271 ops/sec
        fsync_writethrough                            n/a
        open_sync                       12701.793 ops/sec

Compare file sync methods using two 16kB writes:
(in wal_sync_method preference order, except fdatasync
is Linux's default)
        open_datasync                                 n/a
        fdatasync                        6148.294 ops/sec
        fsync                             250.694 ops/sec
        fsync_writethrough                            n/a
        open_sync                        6321.015 ops/sec

Compare open_sync with different write sizes:
(This is designed to compare the cost of writing 16kB
in different write open_sync sizes.)
         1 * 16kB open_sync write       12598.168 ops/sec
         2 *  8kB open_sync writes       7976.631 ops/sec
         4 *  4kB open_sync writes       4740.957 ops/sec
         8 *  2kB open_sync writes       2232.638 ops/sec
        16 *  1kB open_sync writes       1138.060 ops/sec

Test if fsync on non-write file descriptor is honored:
(If the times are similar, fsync() can sync data written
on a different descriptor.)
        write, fsync, close               250.710 ops/sec
        write, close, fsync               250.055 ops/sec

Non-Sync'ed 16kB writes:
        write                           149753.941 ops/sec
时间: 2024-10-30 00:45:24

Ubuntu 12.04 OCZ RevoDrive3 PCI-E performance so bad when cache on的相关文章

Install OCZ RevoDrive3X2 on Ubuntu 12.04 x64 with kernel 3.2.0-23-generic

默认情况下Ubuntu 带的mvsas驱动可以将OCZ RevoDrive3X2驱起来, 但是性能不怎么样, 并且一块240G的盘在系统中会被认成2块120G的盘. 详见如下文章 :  http://blog.163.com/digoal@126/blog/static/163877040201331012913561/ 实际上OCZ有Ubuntu下的驱动, 本文介绍一下如何安装这个驱动. 首先要下载驱动, 在OCZ网站上找到12.04对应的驱动, http://ocz.com/enterpri

windows 8和Ubuntu 12.04双系统启动时出现grub rescue

由于在Windows下面对分区修改(我是删除分区造成),导致grub所在分区由sda3变成了sda2了,这样一来找不到grub了,Ubuntu开机就出现了: grub rescue > 在此情况下,可以如下解决,并不用重新安装系统 第一步,找出你的Linux盘在那个分区以及grub目录在什么位置. 如果你还记得最好,忘了也无所谓,使用下面命令逐个试探即可: grub rescue>ls 回车后,ls命令会列出所有磁盘分区信息,如: hd0, (hd0,msdos7),(hd0,msdos8),

如何在ubuntu 12.04上安装Qt 4.8.4

最近的项目使用嵌入式linux系统开发,开发环境在ubuntu 12.04搭建,这个版本的lubuntu,优点有,但缺点也不少,不建议新手做开发环境. 整个嵌入式Qt 4.8.4编译也算比较顺利,但也有多个要注意的地方,纪录下来,做为备忘录,也为大家做参考,还是那句话:"折腾并快乐着". 这里提醒大家一下,编译内核和qt4.8.4的arm-linux-gcc用一个版本,最好用同一个交叉编译器,以免引起不必要的问题.1.安装交叉编译器arm-linux-gcc 这里不是本篇文章的重点,但

ubuntu 12.04中如何配置jdk6 6u38版

ubuntu 12.04 下默认是安装了openjdk的,不过这个jdk问题比较多,因为你甚至无法启动Eclipse,所以还是需要自己安装jdk的. 1.下载jdk6 jdk6下载地址为:http://download.java.net/jdk6/,根据操作系统的选择对应的安装包,我的是ubuntu 12.04 32bit的,所以下载的文件是jdk-6u38-ea-bin-b04-linux-i586-31_oct_2012.bin, 2.在/usr/local下创建文件夹: sudo mkdi

Ubuntu 12.04重启清空/etc/resolv.conf里nameserver的设置如何解决

公司的新上的服务器用的都是最新的Ubuntu 12.04,同事跟我反映了一个问题,每次重启了之后,/etc/resolv.conf里面设置的nameserver就被清空了,很诡异 root@Ttpod:~# cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGE

ubuntu 12.04为何不能使用chkconfig管理服务

今天在虚拟机里做DRBD实验,使用chkconfig管理服务的时候,出现了问题. root@node2:/root# chkconfig --list | grep drbd drbd                      0:off  1:off  2:off  3:off  4:off  5:off  6:off root@node2:/root# chkconfig drbd on /sbin/insserv: No such file or directory 这是ubuntu 12

Ubuntu 12.04 64位中的常用命令

以下命令在  Ubuntu 12.04 64位下测试通过. 在linux中一切都是文件,包括文件夹也是一种特殊的文件,甚至设备也是文件. 查看当前系统的版本 cat /proc/version #Linux version 3.2.0-29-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 uname -

Ubuntu 12.04.4 LTS下linphone-android编译记录

操作系统:Ubuntu 12.04.4 LTS 32位 linphone-android版本:android:versionCode="2211" 准备工作: 1.首先安装git用于获取linphone-android源码 ykx@ykx:~$ sudo apt-get install git 获取linphone-android源码只须使用git的基本功能,所以使用apt-get安装就可以. 2.获取linphone-android源码 ykx@ykx:~/WorkSpace$ gi

ubuntu 12.04如何开启root

开发嵌入式linux,如果宿主机不能在ROOT下开发,很是麻烦,过多的权限,阻碍嵌入式程序的开发,如在ROOT下开发,可以直接复制,粘贴,大大加快开发速度,ubuntu 12.04刚一出炉,我就把工作用的机子升级到12.04,个人感觉很好很强大,下面看看怎么开启ROOT: 1.命令:sudo passwd root  为root分配密码,按提示进行设置就好. 2.第一种方法 打开终端,输入以下命令: sudo -s 进入root账户下: cd /etc/lightdm gedit lightdm