DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th April 2012
Smith Smith is offline
Port Guard
 
Join Date: Apr 2012
Posts: 14
Unhappy Is my OpenBSD system abnormally slow? (Newbie / pretty old hardware)

The short version: I freshly installed OpenBSD 5.0 on an old Pentium-MMX laptop, 300 MHz, 128 MB of RAM, and net throughput when accessing this machine from LAN seems to only around 20 kbytes/s (160 kbit/s).

I discovered this when screwing around with samba, but sftp and ftp have similar throughput (i.e., the same order of magnitude). The appx 20 kbytes/sec was measured with ftp.

The ethernet card is 100 mbit capable, and the "100" LED is lit. The OpenBSD machine was connected to the other machine via a linksys router running Tomato. I have no reason to believe there is a problem with the other computer or the router, as I get "normal" speeds otherwise in this network.

I have tried to be a good (not perfect) newbie and googled around and checked man pages, but "slow OpenBSD system" in any compbination only seems to bring up religious flamewars and nothing that relates to my question.

Anyway, the question is: is this speed what I could expect? I think not, right?

And the follow up question: What would be a good tree to bark up, to try to speed it up? Any clues are appreciated. Could it be some bottleneck related to the cardbus? Is there some way to query the actual link speed of the interface?

It's my first post and i realize I don't know so much about this stuff, I don't expect to be spoonfed, just perhaps a clue or two ... please be gentle!

Some things:
  • I realize /dev/sd0 is attached to a USB 1 interface and as such its speed is limited. The /home/ partition with which i performed these experiments however is on the internal IDE drive.
  • I realize there is something about "dma errors" in the dmesg, these seem to appear no matter what hard drive i put in the machine. Don't know how common this is or if it's something to be concerned about.
  • If I interpret it correctly, a 'dd' command generating a one gig file on this drive gets a throughput of 8 mbytes/sec.
  • I didn't modify the stock /etc/pf.conf or much of anything else.

dmesg

Code:
OpenBSD 5.0 (GENERIC) #43: Wed Aug 17 10:10:52 MDT 2011
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium/MMX ("GenuineIntel" 586-class) 300 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,MMX
real mem  = 133689344 (127MB)
avail mem = 121520128 (115MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 01/01/97, BIOS32 rev. 0 @ 0xf0210
apm0 at bios0: Power Management spec V1.2 (slowidle) (BIOS management disabled)
apm0: APM power management enable: unrecognized device ID (9)
apm0: APM engage (device 1): power management disabled (1)
pcibios0 at bios0: rev 2.1 @ 0xf0200/0xb00
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfbad0/144 (7 entries)
pcibios0: no compatible PCI ICU found: ICU vendor 0xffff product 0xffff
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc0000/0xa000
cpu0 at mainbus0: (uniprocessor)
cpu0: F00F bug workaround installed
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Acer Labs M1531 PCI" rev 0xb3
pcib0 at pci0 dev 2 function 0 "Acer Labs M1533 ISA" rev 0x0a
cbb0 at pci0 dev 5 function 0 "O2 Micro OZ6832 CardBus" rev 0x34: irq 9
cbb1 at pci0 dev 5 function 1 "O2 Micro OZ6832 CardBus" rev 0x34: irq 9
vga1 at pci0 dev 6 function 0 "Neomagic Magicgraph NM2160" rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pciide0 at pci0 dev 11 function 0 "Acer Labs M5229 UDMA IDE" rev 0x20: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <HTS721080G9AT00>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TEAC, CD-220EA, 1.0A> ATAPI 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
alipm0 at pci0 dev 12 function 0 "Acer Labs M7101 Power" rev 0x09: SMBus disabled
ohci0 at pci0 dev 15 function 0 "Acer Labs M5237 USB" rev 0x03: irq 10, version 1.0, legacy support
isa0 at pcib0
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
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt2 at isa0 port 0x3bc/4: polled
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
isapnp0 at isa0 port 0x279: read port 0x203
ym0 at isapnp0 "YAMAHA OPL3-SAx Audio System, YMH0021, , " port 0x220/16,0x530/8,0x388/8,0x330/2,0x370/2 irq 5 drq 0,7
midi0 at ym0: <YM MPU-401 UART>
audio0 at ym0
"LT Win Modem, HSM0A19, , " at isapnp0 port 0x2e8/8,0x100/8 irq 3 not configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 1 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 2 device 0 cacheline 0x0, lattimer 0x20
pcmcia1 at cardslot1
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Acer Labs OHCI root hub" rev 1.00/1.00 addr 1
rl0 at cardbus1 dev 0 function 0 "Realtek 8139" rev 0x10: irq 9, address 00:10:60:75:92:67
rlphy0 at rl0 phy 0: RTL internal PHY
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron Samsung S2 Portable" rev 2.00/0.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <Samsung, S2 Portable, > SCSI2 0/direct fixed serial.04e81f05E09310502425
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (a6524047e1c9388a.a) swap on wd0b dump on wd0b
wd0a: DMA error reading fsbn 128 of 128-143 (wd0 bn 192; cn 0 tn 3 sn 3), retrying
wd0: transfer error, downgrading to Ultra-DMA mode 1
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 1
wd0a: DMA error reading fsbn 128 of 128-143 (wd0 bn 192; cn 0 tn 3 sn 3), retrying
wd0: soft error (corrected)
The output of "mount"

Code:
/dev/wd0a on / type ffs (local)
/dev/wd0k on /home type ffs (local, nodev, nosuid)
/dev/wd0d on /tmp type ffs (local, nodev, nosuid)
/dev/wd0f on /usr type ffs (local, nodev)
/dev/wd0g on /usr/X11R6 type ffs (local, nodev)
/dev/wd0h on /usr/local type ffs (local, nodev)
/dev/wd0j on /usr/obj type ffs (local, nodev, nosuid)
/dev/wd0i on /usr/src type ffs (local, nodev, nosuid)
/dev/wd0e on /var type ffs (local, nodev, nosuid)
/dev/sd0a on /u type ffs (local)
some other output

Code:
# cd /home/samba
# dd if=/dev/zero of=test1g count=1048576 bs=1024
1048576+0 records in
1048576+0 records out
1073741824 bytes transferred in 121.220 secs (8857790 bytes/sec)

# dd if=/dev/zero of=test100m count=102400 bs=1024
102400+0 records in
102400+0 records out
104857600 bytes transferred in 10.529 secs (9958290 bytes/sec)

# cp test100m /root/test100m.0
# cd root
# /usr/local/bin/smbclient -U samba //localhost/samba

put test100m.0
putting file test100m.0 as \test100m.0 (3453.0 kb/s) (average 3453.0 kb/s)
smb: \>
Reply With Quote
  #2   (View Single Post)  
Old 9th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It may be your cardbus, but it has been noted in official OpenBSD documentation that the older Realtek rl(4) based cards are relatively poor performers. The rl(4) man page lists three long paragraphs about poor documentation and the choices made by the driver designer, under the BUGS section.

The Realtek Wikipedia entry quotes FreeBSD driver documentation in source code (the citation is buried in footnote #1) that calls the 8139 some very terrible things. See the section in that page under Criticism and Praise. Do note that just below the FreeBSD notation, Theo De Raadt is quoted as praising other NICs from Realtek.

Last edited by jggimi; 9th April 2012 at 02:32 PM. Reason: found link in Wiki entry
Reply With Quote
  #3   (View Single Post)  
Old 9th April 2012
Smith Smith is offline
Port Guard
 
Join Date: Apr 2012
Posts: 14
Default

Quote:
Originally Posted by jggimi View Post
It may be your cardbus, but it has been noted in official OpenBSD documentation that the older Realtek rl(4) based cards are relatively poor performers. The rl(4) man page lists three long paragraphs about poor documentation and the choices made by the driver designer, under the BUGS section.

The Realtek Wikipedia entry quotes FreeBSD driver documentation in source code (the citation is buried in footnote #1) that calls the 8139 some very terrible things. See the section in that page under Criticism and Praise. Do note that just below the FreeBSD notation, Theo De Raadt is quoted as praising other NICs from Realtek.
Thank you thank you thank you ... pointing me toward this tree to bark up has probably saved this poor soul from trying to entrust personal files via an open port on the public internet .... to the Penguin. I do realize nothing in the world is 100% secure but now I will worry a lot less ..

After some googling based on this info, it turns out that amongst many other strange things that this realtek 8139 card does, is this one: it fails to correctly autonegotiate duplex. I tested forcing the duplex settings on the receiving and sending end, and lo, now ftp reports a transfer rate of 831 kbytes/sec for a 100mb file. This is something like 7 mbits/s (instead of 0.16 mbit/s) and for my modest needs something that I can live with. This computer is ancient, after all. Thank you and the OpenBSD team for allowing my old war horse to eventually die with dignity after a long life of service.

( These are some of the helpful quotes from monkey.org I finally found from back in 2003, sorry not able to post links

openbsd/archive/misc/0312/msg00227.html
"autonegotiation sometimes gets you mismatched duplex settings."
"This is probably the most important thing to check"

openbsd/archive/misc/0312/msg00206.html
From Theo de Raadt, "You get what you pay for." )
Reply With Quote
  #4   (View Single Post)  
Old 9th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I'm glad you found the root cause. And, as my post above neglected to say it, Welcome!
Reply With Quote
  #5   (View Single Post)  
Old 9th April 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Smith, we are glad you resolved your own questions.

Recognize that this site is independent of the OpenBSD project. While it has been known that a few OpenBSD developers have read & contributed to threads here at times, most of the regulars here are simply professionals, enthusiasts, students, & newbies to the operating system.
Reply With Quote
  #6   (View Single Post)  
Old 10th April 2012
Smith Smith is offline
Port Guard
 
Join Date: Apr 2012
Posts: 14
Default

Quote:
Originally Posted by ocicat View Post
Smith, we are glad you resolved your own questions.

Recognize that this site is independent of the OpenBSD project. While it has been known that a few OpenBSD developers have read & contributed to threads here at times, most of the regulars here are simply professionals, enthusiasts, students, & newbies to the operating system.
I resolved them with one small indispensable clue provided, and of course in this case it turned out not to be a OpenBSD-specific problem, but such is the nature of all this stuff. I imagine other vendors have coded around the crappy realtek hardware while swearing in silence. There was a reference to the driver source code (FreeBSD I think it was) in that wikipeda article and some of that stuff made me chuckle, eg:

Code:
/* Do not try to read past this point. */
Anyway of course I understand the nature of this place, it is indeed why I sought it out. My hopes was that more patient people involved would tend to congregate in a web forum rather than on a mailing list, and that somewhat stupid questions would not immediately get one's head bit off. Which turned out to be the case so far ..

Thanks again. With luck this was the last stupid OpenBSD question from me here, but my hopes are not so high about that one. Hopefully you people who know what you are talking about will remember that even a really stupid question which is patiently answered here, will eventually get googled by someone else and potentially save many man-minutes of frustration.

I'm still a bit blown away by the austere and very serious approach which surrounds the idea of OpenBSD.

I can now work on getting some of the ideas I had about this low-grade server into reality anyway, and perhaps sleep easier with that feeling I get from the very careful engineering effort, and leave the machine on not so fearful of intrusions, more just hoping it doesn't die in some spectacular way like catching on fire or something.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Your OpenBSD Hardware mfaridi OpenBSD General 145 17th December 2023 02:57 AM
OpenBSD hardware support on Mac Air & Asus Zenbook sysfu OpenBSD General 7 13th December 2011 10:47 PM
OpenBSD slow internet? guitarscn OpenBSD General 4 27th November 2010 05:25 PM
dd slow, 1500KB/s (OpenBSD LiveCD) Carpetsmoker OpenBSD General 4 3rd October 2008 10:33 AM
NetBSD: pretty fonts anomie NetBSD General 3 21st May 2008 03:00 PM


All times are GMT. The time now is 08:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick