Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-13 Thread Stuart Henderson
On 2013-07-13, Nick Holland n...@holland-consulting.net wrote:
 A few years ago, after someone said basically the same thing (actually,
 I think it was more emphatic -- as in, it is impossible to see gains
 beyond ...), I played with it and saw significant gains well beyond
 bs=64k for raw devices.  I'd be surprised if individual experience
 didn't vary, though.

Larger block sizes can be far faster for flash-based storage.



Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-13 Thread Alexander Hall
I surrender and yet again realize i have boring hardware. :-P

Stuart Henderson s...@spacehopper.org wrote:
On 2013-07-13, Nick Holland n...@holland-consulting.net wrote:
 A few years ago, after someone said basically the same thing
(actually,
 I think it was more emphatic -- as in, it is impossible to see gains
 beyond ...), I played with it and saw significant gains well beyond
 bs=64k for raw devices.  I'd be surprised if individual experience
 didn't vary, though.

Larger block sizes can be far faster for flash-based storage.



IDE disk erasing/zeroing at ~2.4MB/s

2013-07-12 Thread Nathan Goings
I have a disk -- IIRC, Seagate Barracuda 160gb 7200RPM 8MB Cache SATA 
3.0GB/s


dmesg:
wd0 at pciide0 channel 0 drive 0: ST3160811AS
wd0: 16-sector PIO, LBA48, 152626MB, 312579695 sectors
wd0 (pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6

However, when I run `dd if=/dev/zero of=/dev/wd0c bs=1M'  After 3-4 
hours, it's only running at ~2.4MB/s.  CPU usage is about 30%.


First, shouldn't SATA drives be sd0? (Looked in BIOS, can't find any 
SATA-to-IDE options enabled)  Second, what can I do to speed it up? or 
troubleshoot it at least?




Re: IDE disk erasing/zeroing at ~2.4MB/s (full dmesg)

2013-07-12 Thread Nathan Goings

Full GENERIC kernel dmesg on request:

OpenBSD 5.3 (GENERIC) #26: Fri Jul 12 16:26:16 MDT 2013
r...@binarynet.hsd1.nm.comcast.net.:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Celeron(R) D CPU 3.20GHz (GenuineIntel 686-class) 3.22 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,CNXT-ID,CX16,xTPR,PDCM,LAHF

real mem  = 3220697088 (3071MB)
avail mem = 3157102592 (3010MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 08/04/06, BIOS32 rev. 0 @ 0xfaea0, 
SMBIOS rev. 2.3 @ 0xf0100 (39 entries)
bios0: vendor Award Software International, Inc. version F2 date 
08/04/2006

bios0: Gigabyte Technology Co., Ltd. 945P-S3
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP MCFG APIC
acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) 
PEX5(S5) HUB0(S5) USB0(S1) USB1(S1) USB2(S1) USB3(S1) USBE(S1) AZAL(S5) 
PCI0(S5)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PEX0)
acpiprt2 at acpi0: bus -1 (PEX1)
acpiprt3 at acpi0: bus -1 (PEX2)
acpiprt4 at acpi0: bus 3 (PEX3)
acpiprt5 at acpi0: bus -1 (PEX4)
acpiprt6 at acpi0: bus -1 (PEX5)
acpiprt7 at acpi0: bus 4 (HUB0)
acpicpu0 at acpi0
acpibtn0 at acpi0: PWRB
bios0: ROM list: 0xc/0xf600 0xd/0x8000!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82945G Host rev 0x02
ppb0 at pci0 dev 1 function 0 Intel 82945G PCIE rev 0x02: apic 2 int 16
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon X1650 Pro rev 0x9e
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 2 int 16
drm0 at radeondrm0
ATI Radeon X1650 Pro Sec rev 0x9e at pci1 dev 0 function 1 not configured
azalia0 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x01: msi
azalia0: codecs: Realtek ALC883
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x01: apic 2 int 16
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 3 Intel 82801GB PCIE rev 0x01: apic 2 int 19
pci3 at ppb2 bus 3
re0 at pci3 dev 0 function 0 Realtek 8168 rev 0x01: RTL8168 2 
(0x3800), apic 2 int 19, address 00:16:e6:6c:48:bd

rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x01: apic 2 int 23
uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x01: apic 2 int 19
uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x01: apic 2 int 18
uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x01: apic 2 int 16
ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x01: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 Intel 82801BA Hub-to-PCI rev 0xe1
pci4 at ppb3 bus 4
Ralink RT3060 rev 0x00 at pci4 dev 0 function 0 not configured
xl0 at pci4 dev 1 function 0 3Com 3c905B 100Base-TX rev 0x24: apic 2 
int 19, address 00:10:4b:64:a6:10

exphy0 at xl0 phy 24: 3Com internal media interface
ichpcib0 at pci0 dev 31 function 0 Intel 82801GB LPC rev 0x01: PM disabled
pciide0 at pci0 dev 31 function 2 Intel 82801GB SATA rev 0x01: DMA, 
channel 0 wired to compatibility, channel 1 wired to compatibility

wd0 at pciide0 channel 0 drive 0: ST3160811AS
wd0: 16-sector PIO, LBA48, 152626MB, 312579695 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: LITE-ON, DVDRW LH-20A1H, LL0C ATAPI 
5/cdrom removable

wd1 at pciide0 channel 1 drive 1: WDC WD400EB-00CPF0
wd1: 16-sector PIO, LBA, 38166MB, 78165360 sectors
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4
wd1(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 Intel 82801GB SMBus rev 0x01: apic 2 
int 19

iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM non-parity PC2-6400CL5
spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-6400CL5
spdmem2 at iic0 addr 0x52: 512MB DDR2 SDRAM non-parity PC2-6400CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0

Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-12 Thread Alexander Hall

On 07/12/13 23:50, Nathan Goings wrote:

I have a disk -- IIRC, Seagate Barracuda 160gb 7200RPM 8MB Cache SATA
3.0GB/s

dmesg:
wd0 at pciide0 channel 0 drive 0: ST3160811AS
wd0: 16-sector PIO, LBA48, 152626MB, 312579695 sectors
wd0 (pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6

However, when I run `dd if=/dev/zero of=/dev/wd0c bs=1M'  After 3-4


use the raw device, /dev/rwd0c, not the block device. I have found close 
to no speed improvements with bs  64k.


/Alexander


hours, it's only running at ~2.4MB/s.  CPU usage is about 30%.

First, shouldn't SATA drives be sd0? (Looked in BIOS, can't find any
SATA-to-IDE options enabled)  Second, what can I do to speed it up? or
troubleshoot it at least?




Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-12 Thread Nicolai
On Fri, Jul 12, 2013 at 03:50:58PM -0600, Nathan Goings wrote:
 However, when I run `dd if=/dev/zero of=/dev/wd0c bs=1M'  After 3-4 
 hours, it's only running at ~2.4MB/s.  CPU usage is about 30%.

Do instead:
dd if=/dev/zero of=/dev/rwd0c bs=1M

Nicolai



Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-12 Thread Nathan Goings

On 7/12/2013 5:12 PM, Alexander Hall wrote:

use the raw device, /dev/rwd0c, not the block device.

Tried: dd if=/dev/zero of=/dev/rwd0c bs=64k
It runs at ~72MB/s.

Thanks!



Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-12 Thread Jérémie Courrèges-Anglas
Nathan Goings binarysp...@binaryspike.com writes:

 I have a disk -- IIRC, Seagate Barracuda 160gb 7200RPM 8MB Cache SATA
 3.0GB/s

 dmesg:
 wd0 at pciide0 channel 0 drive 0: ST3160811AS
 wd0: 16-sector PIO, LBA48, 152626MB, 312579695 sectors
 wd0 (pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6

 However, when I run `dd if=/dev/zero of=/dev/wd0c bs=1M'  After 3-4 
 hours, it's only running at ~2.4MB/s.  CPU usage is about 30%.

See other replies.

 First, shouldn't SATA drives be sd0? (Looked in BIOS, can't find any
 SATA-to-IDE options enabled)  Second, what can I do to speed it up? or
 troubleshoot it at least?

See pciide(4).  My day-to-day laptop has the same drive controller,
previous BIOS versions had a switch to choose SATA but they removed it.
*shrug*

-- 
Jérémie Courrèges-Anglas
PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494



Re: IDE disk erasing/zeroing at ~2.4MB/s

2013-07-12 Thread Nick Holland
On 07/12/13 19:11, Alexander Hall wrote:
 On 07/12/13 23:50, Nathan Goings wrote:
...
 However, when I run `dd if=/dev/zero of=/dev/wd0c bs=1M'  After 3-4
 
 use the raw device, /dev/rwd0c, not the block device. I have found close 
 to no speed improvements with bs  64k.

A few years ago, after someone said basically the same thing (actually,
I think it was more emphatic -- as in, it is impossible to see gains
beyond ...), I played with it and saw significant gains well beyond
bs=64k for raw devices.  I'd be surprised if individual experience
didn't vary, though.

Personally, I like bs=1m for another reason, though.  pkill -INFO dd
produces very readable output.

 hours, it's only running at ~2.4MB/s.  CPU usage is about 30%.

 First, shouldn't SATA drives be sd0? (Looked in BIOS, can't find any
 SATA-to-IDE options enabled)  Second, what can I do to speed it up? or
 troubleshoot it at least?

well, maybe they SHOULD be (philosophically), but they WILL be whatever
your controller hardware supports.  If your controller is ahci(4)
compliant, it will be sd(4) devices, if it isn't, it ends up being
pciide(4) and wd(4).

Nick.