前段时间将服务器装成了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