I'm install OpenBSD 4.7 (dmesg attached)

uname -a
OpenBSD d1.my.domain 4.7 GENERIC#112 amd64

Run as root:
dd if=/dev/wd0c of=/dev/null bs=1m &
dd if=/dev/wd0c of=/dev/null bs=1m &
dd if=/dev/wd0c of=/dev/null bs=1m &

top

load averages:  3.12,  2.50,  1.49    16:54:08
37 processes:  36 idle, 1 on processor
CPU states:  0.1% user,  0.0% nice,  7.3% system,  3.6% interrupt, 89.1% idle
Memory: Real: 35M/339M act/tot  Free: 2393M  Swap: 0K/3071M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
  754 root     -14    0 2232K 1228K sleep     inode     0:24  6.10% dd
25914 root      -5    0 2216K 1224K sleep     getblk    0:24  6.05% dd
21919 root     -14    0 2204K 1224K sleep     inode     2:08  5.96% dd

iostat wd0 1

      tty            wd0             cpu
 tin tout  KB/t t/s MB/s  us ni sy in id
   0    0  2.00 5141 10.04   0  0 23 13 64
   0    0  2.00 5021 9.81   0  0 16 10 74
   0  299  2.00 5206 10.17   0  0 21  8 71
   0    0  2.00 5066 9.90   0  0 15  8 77


Run as _normal user_:
dd if=/dev/urandom of=/dev/null

Try to recover ballance:
renice 20 -p 30996
renice -20 -p 21919 25914 754

top

load averages:  3.53,  3.55,  3.00    17:12:19
38 processes:  1 running, 36 idle, 1 on processor
CPU states:  0.0% user,  0.0% nice, 98.4% system,  1.6% interrupt,  0.0% idle
Memory: Real: 36M/339M act/tot  Free: 2394M  Swap: 0K/3071M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
30996 teldi    104   20  216K  200K run       -         4:48 97.95% dd
21919 root     -14  -20 2204K 1224K sleep     inode     2:15  0.15% dd
25914 root     -14  -20 2216K 1224K sleep     inode     0:31  0.00% dd
  754 root      -5  -20 2232K 1228K sleep     getblk    0:31  0.00% dd

iostat wd0 1

      tty            wd0             cpu
 tin tout  KB/t t/s MB/s  us ni sy in id
   1  283  2.00 375 0.73   0  0 99  1  0
   0    0  2.00 374 0.73   0  0100  0  0
   0    0  2.00 375 0.73   0  0 98  2  0
   0    0  2.00 382 0.75   0  0 99  1  0

Disk read speed fell from 10 Mb/s to 0.8 Mb/s  (22 Mb/s to 0.9 Mb/s in test 
with livecd).
CPU for first three dd (root processes!) fell from 18.1% to 0.2%.
renice not work in this situation.

It is not secure. One user script or program may load CPU and
database or another servers lost speed in disk operations.
This is hole for DOS attacks in OpenBSD design.

How you use the OpenBSD as web servers and hosting platform?
Permanently catch and kill processes?

-- 
Dmitry Telegin
OpenBSD 4.7 (GENERIC) #112: Wed Mar 17 20:43:49 MDT 2010
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 2951479296 (2814MB)
avail mem = 2864992256 (2732MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf06d0 (66 entries)
bios0: vendor American Megatrends Inc. version "1001" date 04/19/2006
bios0: ASUSTeK Computer INC. A8N-VM CSM
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC MCFG OEMB
acpi0: wakeup devices PCE0(S4) PCE1(S4) PCE2(S4) PS2K(S4) PS2M(S4) UAR1(S4) 
NSMB(S4) USB0(S4) USB2(S4) NMAC(S5) P0P1(S4) HDAC(S4) MC97(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) 64 Processor 3000+, 2169.41 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: AMD erratum 89 present, BIOS upgrade may be required
cpu0: apic clock running at 241MHz
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PCE0)
acpiprt2 at acpi0: bus 2 (PCE1)
acpiprt3 at acpi0: bus 3 (PCE2)
acpiprt4 at acpi0: bus 4 (P0P1)
acpicpu0 at acpi0
aibs0 at acpi0
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
pci0 at mainbus0 bus 0
"NVIDIA C51 Host" rev 0xa2 at pci0 dev 0 function 0 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 1 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 2 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 3 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 4 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 5 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 6 not configured
"NVIDIA C51 Memory" rev 0xa2 at pci0 dev 0 function 7 not configured
ppb0 at pci0 dev 2 function 0 "NVIDIA C51 PCIE" rev 0xa1
pci1 at ppb0 bus 1
ppb1 at pci0 dev 3 function 0 "NVIDIA C51 PCIE" rev 0xa1
pci2 at ppb1 bus 2
ppb2 at pci0 dev 4 function 0 "NVIDIA C51 PCIE" rev 0xa1
pci3 at ppb2 bus 3
vga1 at pci3 dev 0 function 0 vendor "NVIDIA", unknown product 0x0615 rev 0xa2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
"NVIDIA MCP51 Host" rev 0xa2 at pci0 dev 9 function 0 not configured
pcib0 at pci0 dev 10 function 0 "NVIDIA MCP51 ISA" rev 0xa2
nviic0 at pci0 dev 10 function 1 "NVIDIA MCP51 SMBus" rev 0xa2
iic0 at nviic0
spdmem0 at iic0 addr 0x50: 1GB DDR SDRAM non-parity PC3200CL3.0
spdmem1 at iic0 addr 0x51: 1GB DDR SDRAM non-parity PC3200CL3.0
spdmem2 at iic0 addr 0x52: 512MB DDR SDRAM non-parity PC3200CL3.0
spdmem3 at iic0 addr 0x53: 512MB DDR SDRAM non-parity PC3200CL3.0
iic1 at nviic0
ohci0 at pci0 dev 11 function 0 "NVIDIA MCP51 USB" rev 0xa2: apic 1 int 5 (irq 
5), version 1.0, legacy support
ehci0 at pci0 dev 11 function 1 "NVIDIA MCP51 USB" rev 0xa2: apic 1 int 5 (irq 
5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "NVIDIA EHCI root hub" rev 2.00/1.00 addr 1
pciide0 at pci0 dev 13 function 0 "NVIDIA MCP51 IDE" rev 0xa1: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 disabled (no drives)
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TOSHIBA, CD/DVDW SDR5472C, TU02> ATAPI 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
pciide1 at pci0 dev 14 function 0 "NVIDIA MCP51 SATA" rev 0xa1: DMA
pciide1: using apic 1 int 11 (irq 11) for native-PCI interrupt
pciide2 at pci0 dev 15 function 0 "NVIDIA MCP51 SATA" rev 0xa1: DMA
pciide2: using apic 1 int 10 (irq 10) for native-PCI interrupt
wd0 at pciide2 channel 0 drive 0: <FUJITSU MHV2160BT PL>
wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
wd0(pciide2:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi1 at pciide2 channel 1 drive 0
scsibus1 at atapiscsi1: 2 targets
cd1 at scsibus1 targ 0 lun 0: <Optiarc, DVD RW AD-7201S, 1.05> ATAPI 5/cdrom 
removable
cd1(pciide2:1:0): using PIO mode 4, Ultra-DMA mode 5
ppb3 at pci0 dev 16 function 0 "NVIDIA MCP51 PCI-PCI" rev 0xa2
pci4 at ppb3 bus 4
"VIA VT6306 FireWire" rev 0x80 at pci4 dev 5 function 0 not configured
stge0 at pci4 dev 9 function 0 "Sundance ST1023" rev 0x41: apic 1 int 5 (irq 
5), address 00:22:15:10:da:b9
ipgphy0 at stge0 phy 24: IP1000A 10/100/1000 PHY, rev. 0
azalia0 at pci0 dev 16 function 1 "NVIDIA MCP51 HD Audio" rev 0xa2: apic 1 int 
5 (irq 5)
azalia0: codecs: Analog Devices/0x1986
audio0 at azalia0
nfe0 at pci0 dev 20 function 0 "NVIDIA MCP51 LAN" rev 0xa1: apic 1 int 5 (irq 
5), address 00:17:31:2a:15:fe
eephy0 at nfe0 phy 1: 88E1111 Gigabit PHY, rev. 2
pchb0 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pchb1 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb2 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x2e/2: W83627EHF rev 0x63
lm1 at wbsio0 port 0x290/8: W83627EHF
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "NVIDIA OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Wacom Co.,Ltd. CTL-460" 
rev 2.00/1.06 addr 2
uhidev0: iclass 3/1, 20 report ids
ums0 at uhidev0 reportid 1: 5 buttons
wsmouse1 at ums0 mux 0
uhid0 at uhidev0 reportid 2: input=8, output=0, feature=1
uhid1 at uhidev0 reportid 3: input=0, output=0, feature=1
uhid2 at uhidev0 reportid 4: input=0, output=0, feature=1
uhid3 at uhidev0 reportid 5: input=0, output=0, feature=1
uhid4 at uhidev0 reportid 6: input=0, output=0, feature=1
uhid5 at uhidev0 reportid 7: input=0, output=0, feature=1
uhid6 at uhidev0 reportid 16: input=0, output=0, feature=2
uhid7 at uhidev0 reportid 17: input=0, output=0, feature=16
uhid8 at uhidev0 reportid 19: input=0, output=0, feature=1
uhid9 at uhidev0 reportid 20: input=0, output=0, feature=1
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Wacom Co.,Ltd. CTL-460" 
rev 2.00/1.06 addr 2
uhidev1: iclass 3/0, 2 report ids
uhid10 at uhidev1 reportid 2: input=19, output=0, feature=0
uhidev2 at uhub1 port 3 configuration 1 interface 0 "Microsoft Natural\M-. 
Ergonomic Keyboard 4000" rev 2.00/1.73 addr 3
uhidev2: iclass 3/1
ukbd0 at uhidev2: 8 modifier keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev3 at uhub1 port 3 configuration 1 interface 1 "Microsoft Natural\M-. 
Ergonomic Keyboard 4000" rev 2.00/1.73 addr 3
uhidev3: iclass 3/0, 1 report id
uhid11 at uhidev3 reportid 1: input=7, output=0, feature=0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
umass0 at uhub0 port 5 configuration 1 interface 0 "USB 2.0 USB Flash Drive" 
rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus3 at umass0: 2 targets, initiator 0
sd0 at scsibus3 targ 1 lun 0: <USB 2.0, USB Flash Drive, 0.00> SCSI2 0/direct 
removable
sd0: 15424MB, 512 bytes/sec, 31588352 sec total

Reply via email to