View previous topic :: View next topic |
Author |
Message |
shamu112 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/18522600114124e836df588.jpg)
Joined: 15 Jul 2004 Posts: 37 Location: Minnesota
|
Posted: Thu Jun 22, 2006 2:15 pm Post subject: sata_nv works only in 16-bit mode |
|
|
I'm having performance issues with a SATA drive using sata_nv compiled into the kernel. hdparm executes read tests with good results, but writing to the drive is very slow. It appears the drive is functioning without DMA and in 16-bit mode.
Is there something with the setup/configuration that I'm missing?
Looking through the forums, I was unable to locate any problems of this kind.
ASUS A8N-SLI Deluxe (nForce4)
AMD64x2 3200
2 GB Corsair 3200
Maxtor 6V300F0 300GB SATA-II
IBM 60GB IBM-DTLA-307060 ATA
gentoo-sources-2.6.16-r9
A timed write on the SATA produces:
Code: |
# time dd if=/dev/zero of=./tmpfile.$$ bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.010672 seconds, 96.0 MB/s
real 0m0.032s
user 0m0.000s
sys 0m0.008s
|
On the ATA drive:
Code: |
# time dd if=/dev/zero of=./tmpfile.$$ bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.006965 seconds, 147 MB/s
real 0m0.009s
user 0m0.000s
sys 0m0.008s
|
Code: |
# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 3624 MB in 2.00 seconds = 1812.70 MB/sec
Timing buffered disk reads: 208 MB in 3.03 seconds = 68.72 MB/sec
|
dmesg:
Code: |
sata_nv 0000:00:08.0: version 0.8
ata1: SATA max UDMA/133 cmd 0x9E0 ctl 0xBE2 bmdma 0xD400 irq 5
ata2: SATA max UDMA/133 cmd 0x960 ctl 0xB62 bmdma 0xD408 irq 5
nv_sata: Primary device removed
nv_sata: Secondary device added
nv_sata: Secondary device removed
A Model: Maxtor 6V300F0 Rev: VA11
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 586114704 512-byte hdwr sectors (300091 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 586114704 512-byte hdwr sectors (300091 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
ReiserFS: sda3: found reiserfs format "3.6" with standard journal
ReiserFS: sda3: using ordered data mode
ReiserFS: sda3: journal params: device sda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit
age 30, max trans age 30
ReiserFS: sda3: checking transaction log (sda3)
ReiserFS: sda3: replayed 3 transactions in 0 seconds
ReiserFS: sda3: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 188k freed
Adding 5863716k swap on /dev/sda2. Priority:-1 extents:1 across:5863716k
ReiserFS: sda3: Removing [368413 389176 0x0 SD]..done
ReiserFS: sda3: Removing [33800 389157 0x0 SD]..done
ReiserFS: sda3: Removing [33800 389156 0x0 SD]..done
ReiserFS: sda3: Removing [33800 389154 0x0 SD]..done
ReiserFS: sda3: Removing [33800 389153 0x0 SD]..done
ReiserFS: sda3: Removing [33800 389083 0x0 SD]..done
ReiserFS: sda3: There were 6 uncompleted unlinks/truncates. Completed
|
Code: |
# hdparm -d1 -c1 /dev/sda
/dev/sda:
setting 32-bit IO_support flag to 1
HDIO_SET_32BIT failed: Invalid argument
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Inappropriate ioctl for device
IO_support = 0 (default 16-bit)
|
lspci:
Code: |
00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)
00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2)
00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)
00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
|
Code: |
# smartctl -d ata -a /dev/sda
smartctl version 5.36 [x86_64-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: Maxtor 6V300F0
Serial Number: V606EG4G
Firmware Version: VA111630
User Capacity: 300,090,728,448 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 0
Local Time is: Thu Jun 22 09:01:50 2006 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x80) Offline data collection activity
was never started.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (2643) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 131) minutes.
SMART Attributes Data Structure revision number: 32
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
3 Spin_Up_Time 0x0027 252 252 063 Pre-fail Always - 523
4 Start_Stop_Count 0x0032 253 253 000 Old_age Always - 2
5 Reallocated_Sector_Ct 0x0033 253 253 063 Pre-fail Always - 0
7 Seek_Error_Rate 0x000a 253 252 000 Old_age Always - 0
8 Seek_Time_Performance 0x0027 249 246 187 Pre-fail Always - 44328
9 Power_On_Hours 0x0032 251 251 000 Old_age Always - 964
10 Spin_Retry_Count 0x002b 252 252 157 Pre-fail Always - 0
11 Calibration_Retry_Count 0x002b 252 252 223 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 253 253 000 Old_age Always - 19
189 Unknown_Attribute 0x003a 100 100 000 Old_age Always - 0
190 Unknown_Attribute 0x0022 059 050 000 Old_age Always - 807993385
192 Power-Off_Retract_Count 0x0032 253 253 000 Old_age Always - 0
193 Load_Cycle_Count 0x0032 253 253 000 Old_age Always - 0
194 Temperature_Celsius 0x0032 043 253 000 Old_age Always - 41
195 Hardware_ECC_Recovered 0x000a 253 252 000 Old_age Always - 1198
196 Reallocated_Event_Count 0x0008 253 253 000 Old_age Offline - 0
197 Current_Pending_Sector 0x0008 253 253 000 Old_age Offline - 0
198 Offline_Uncorrectable 0x0008 253 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0008 199 199 000 Old_age Offline - 0
200 Multi_Zone_Error_Rate 0x000a 253 252 000 Old_age Always - 0
201 Soft_Read_Error_Rate 0x000a 253 252 000 Old_age Always - 0
202 TA_Increase_Count 0x000a 253 252 000 Old_age Always - 0
203 Run_Out_Cancel 0x000b 253 252 180 Pre-fail Always - 0
204 Shock_Count_Write_Opern 0x000a 253 252 000 Old_age Always - 0
205 Shock_Rate_Write_Opern 0x000a 253 252 000 Old_age Always - 0
207 Spin_High_Current 0x002a 252 252 000 Old_age Always - 0
208 Spin_Buzz 0x002a 252 252 000 Old_age Always - 0
210 Unknown_Attribute 0x0032 253 252 000 Old_age Always - 0
211 Unknown_Attribute 0x0032 253 252 000 Old_age Always - 0
212 Unknown_Attribute 0x0032 253 252 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
|
Code: |
.config
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_AMD74XX=y
CONFIG_BLK_DEV_SIIMAGE=m
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_HD is not set
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=m
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_NV=y
CONFIG_SCSI_SATA_SIL=m
CONFIG_MD=y
CONFIG_BLK_DEV_DM=m
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Aries-Belgium l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/568415785438928e91a742.jpg)
Joined: 08 Jul 2005 Posts: 730 Location: Willebroek, Belgium
|
Posted: Thu Jun 22, 2006 8:36 pm Post subject: |
|
|
Hey, I just tested it myself and I just found out something weird:
On a SATA with Reiserfs in S-RAID0:
Code: | #time dd if=/dev/zero of=./tmpfile.$$ bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.010803 seconds, 94.8 MB/s
real 0m0.022s
user 0m0.000s
sys 0m0.013s |
On a SATA with ext3:
Code: | # time dd if=/dev/zero of=./tmpfile.$$ bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.007023 seconds, 146 MB/s
real 0m0.009s
user 0m0.000s
sys 0m0.008s |
Could this be a Reiserfs issue? ![Confused :?](images/smiles/icon_confused.gif) _________________ Ep2.nl | Developers Community |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
shamu112 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/18522600114124e836df588.jpg)
Joined: 15 Jul 2004 Posts: 37 Location: Minnesota
|
Posted: Thu Jun 22, 2006 9:02 pm Post subject: |
|
|
That could be part of the issue.
The previous dd was run on ATA with ext3.
Running on an ATA (reiserfs) produces:
Code: |
# time dd if=/dev/zero of=./tmpfile.$$ bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.017105 seconds, 59.9 MB/s
real 0m0.067s
user 0m0.008s
sys 0m0.008s
|
However, I first encountered the performance issue while playing a movie in mplayer. Every once in a while several second pauses would occur during playback. I hypothesized that this was caused by low bandwidth and noticed that the sata drive was running in 16-bit mode, as reported by hdparm.
Is hdparm accurate with its's info about SATA drives? I also tried sdparm, but found it less than informative. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Aries-Belgium l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/568415785438928e91a742.jpg)
Joined: 08 Jul 2005 Posts: 730 Location: Willebroek, Belgium
|
Posted: Thu Jun 22, 2006 10:01 pm Post subject: |
|
|
shamu112 wrote: | That could be part of the issue.
The previous dd was run on ATA with ext3.
Running on an ATA (reiserfs) produces:
Code: |
# time dd if=/dev/zero of=./tmpfile.$$ bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.017105 seconds, 59.9 MB/s
real 0m0.067s
user 0m0.008s
sys 0m0.008s
|
However, I first encountered the performance issue while playing a movie in mplayer. Every once in a while several second pauses would occur during playback. I hypothesized that this was caused by low bandwidth and noticed that the sata drive was running in 16-bit mode, as reported by hdparm.
Is hdparm accurate with its's info about SATA drives? I also tried sdparm, but found it less than informative. |
Damn, why is ReiserFS so slow? Everybody sais it's the fastest fs available but I have got nothing but trouble with it. For instance when compiling mysql my computer just blocks. I never saw this on my much slower computer using ext3 as filesystem. Next install will be without ReiserFS. That's sure!
Normally the read-tests of hdparm work perfectly on SATA drives. Only the other things like enabling/disabling DMA or something, could not work on SATA drives _________________ Ep2.nl | Developers Community |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54851 Location: 56N 3W
|
Posted: Thu Jun 22, 2006 10:38 pm Post subject: |
|
|
shamu112,
A few useful snippets. A 7200 rpm disk has a head/platter data rate of between 50 and 60 Mb/sec.
A 1Mb write doesn't test anything useful. Most drives have caches of 8Mb or 16Mb, so no data will have got to the platters.
hdparm -tT /dev... returns two data rates, the higher number is the speed that data can be read from the cache on the drive.
The lower number is the sustained block sequential data rate, which is normally the head/platter data rate limit.
For SATA, DMA is always on - its a required part of the standard. The speed inprovement between PATA 16 and 32 bit modes is minimal.
There are only 16 data bits in an IDE cable. Setting 32 bit mode allows two 16 bit transfers without an address cycle.
I'm not sure its meaningful for SATA, which is on a 32 bit PCI bus anyway. The IDE interface is just a cut down 16 bit ISA bus. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|