On Wed, 23 Mar 2011 19:21, freebsd@ wrote:
On Wed, Mar 23, 2011 at 07:09:11PM -0400, George Mitchell wrote:
On 03/23/11 18:52, Jeremy Chadwick wrote:
On Wed, Mar 23, 2011 at 06:24:05PM -0400, George Mitchell wrote:
On 03/23/11 17:57, Matthias Gamsjager wrote:
Have you tried 8 stable?

The box I tried SCHED_4BSD on was running 8.2_PRERELEASE, which still
had the problem described.  Has the scheduler changed significantly
between 8.2_PRERELEASE and stable?                  -- George Mitchell

On 23 Mar 2011 22:12, "George Mitchell"<george+free...@m5p.com>   wrote:
Original message, from ten months ago:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-May/031915.html

Briefly, running the distributed.net client on my FreeBSD 8.0 box
made Firefox take forever to start up (90 seconds vs. 2 seconds).
The distributed.net client is essentially 100% CPU bound, with
occasional file I/O and even more occasional socket I/O, running
at nice 20. The problem has persisted since then.

So I finally compiled up a kernel using SCHED_4BSD instead of
SCHED_ULE. Problem fixed.

It still doesn't give me a warm, fuzzy feeling about FreeBSD 8.0,
since I still have the awful NFS client performance problem (though
not as bad as before the Rick Macklem patch). -- George Mitchell

No, it hasn't.

You didn't provide any hardware details of your system in the link you
referenced (post to -hackers).  It matters.  dmesg output (regardless of
what scheduler you're using in the kernel) would be useful.

Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.2-PRERELEASE #0: Mon Mar 21 16:03:28 EDT 2011
    geo...@scollay.m5p.com:/usr/obj/usr/src/sys/SCOLLAY amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Sempron(tm) 140 Processor (2712.36-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100f62  Family = 10  Model = 6
Stepping = 2

Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD 
Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD 
Features2=0x37fd<LAHF,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>
  TSC: P-state invariant
real memory  = 2147483648 (2048 MB)
avail memory = 1792958464 (1709 MB)
ACPI APIC Table: <012810 APIC1758>
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <012810 RSDT1758> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 6ff00000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x508-0x50b on acpi0
cpu0: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> port 0x900-0x9ff at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 1.1 (no driver attached)
pci0: <memory, RAM> at device 1.2 (no driver attached)
ohci0: <nVidia nForce MCP61 USB Controller> mem
0xdfffb000-0xdfffbfff irq 21 at device 2.0 on pci0
ohci0: [ITHREAD]
usbus0: <nVidia nForce MCP61 USB Controller> on ohci0
ehci0: <NVIDIA nForce MCP61 USB 2.0 controller> mem
0xdfffac00-0xdfffacff irq 22 at device 2.1 on pci0
ehci0: [ITHREAD]
usbus1: EHCI version 1.0
usbus1: <NVIDIA nForce MCP61 USB 2.0 controller> on ehci0
pcib1: <ACPI PCI-PCI bridge> at device 4.0 on pci0
pci1: <ACPI PCI bus> on pcib1
hdac0: <NVidia MCP61 High Definition Audio Controller> mem
0xdfff4000-0xdfff7fff irq 23 at device 5.0 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
atapci0: <nVidia nForce MCP61 UDMA133 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 6.0 on
pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
nfe0: <NVIDIA nForce MCP61 Networking Adapter> port 0xe480-0xe487
mem 0xdfff9000-0xdfff9fff irq 20 at device 7.0 on pci0
miibus0: <MII bus> on nfe0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 3 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX,
100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master,
1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow,
1000baseT-FDX-flow-master, auto, auto-flow
nfe0: Ethernet address: 48:5b:39:07:a8:78
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
nfe0: [FILTER]
atapci1: <nVidia nForce MCP61 SATA300 controller> port
0xe400-0xe407,0xe080-0xe083,0xe000-0xe007,0xdc00-0xdc03,0xd880-0xd88f
mem 0xdfff8000-0xdfff8fff irq 21 at device 8.0 on pci0
atapci1: [ITHREAD]
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]
atapci2: <nVidia nForce MCP61 SATA300 controller> port
0xd800-0xd807,0xd480-0xd483,0xd400-0xd407,0xd080-0xd083,0xd000-0xd00f
mem 0xdffef000-0xdffeffff irq 22 at device 8.1 on pci0
atapci2: [ITHREAD]
ata4: <ATA channel 0> on atapci2
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci2
ata5: [ITHREAD]
pcib2: <ACPI PCI-PCI bridge> at device 9.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> at device 11.0 on pci0
pci3: <ACPI PCI bus> on pcib3
pcib4: <ACPI PCI-PCI bridge> at device 12.0 on pci0
pci4: <ACPI PCI bus> on pcib4
vgapci0: <VGA-compatible display> mem
0xde000000-0xdeffffff,0xc0000000-0xcfffffff,0xdd000000-0xddffffff
irq 23 at device 13.0 on pci0
acpi_button0: <Power Button> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
ppc0: <Parallel port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppc0: [ITHREAD]
ppbus0: <Parallel port bus> on ppc0
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
plip0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: [ITHREAD]
lpt0: Interrupt-driven port
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed00fff
on acpi0
Timecounter "HPET" frequency 25000000 Hz quality 900
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: [FILTER]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
Timecounter "TSC" frequency 2712355748 Hz quality 800
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ad0: 38172MB <MAXTOR 6L040J2 A93.0300> at ata0-master UDMA133
ugen0.1: <nVidia> at usbus0
uhub0: <nVidia OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <nVidia> at usbus1
uhub1: <nVidia EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ad1: 152627MB <Seagate ST3160022ACE 9.51> at ata0-slave UDMA100
ad4: 476940MB <Seagate ST3500630AS 3.AAK> at ata2-master UDMA100
SATA 1.5Gb/s
acd0: DVDR <HL-DT-ST DVDRAM GH22NS40/NL02> at ata5-master UDMA100
SATA 1.5Gb/s
hdac0: HDA Codec #0: Realtek ALC662
pcm0: <HDA Realtek ALC662 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC662 PCM #1 Analog> at cad 0 nid 1 on hdac0
pcm2: <HDA Realtek ALC662 PCM #2 Digital> at cad 0 nid 1 on hdac0
uhub0: 10 ports with 10 removable, self powered
GEOM: ad1s1: geometry does not match label (255h,63s != 16h,63s).
GEOM: ad1s2: geometry does not match label (255h,63s != 16h,63s).
Root mount waiting for: usbus1
Root mount waiting for: usbus1
Root mount waiting for: usbus1
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 sks=0x40
0x00 0x01
(probe0:ata5:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:ata5:0:0:0): CAM status: SCSI Status Error
(probe0:ata5:0:0:0): SCSI status: Check Condition
(probe0:ata5:0:0:0): SCSI sense: NOT READY asc:3a,1 (Medium not
present - tray closed)
uhub1: 10 ports with 10 removable, self powered
cd0 at ata5 bus 0 scbus2 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GH22NS40 NL02> Removable CD-ROM SCSI-0 device
cd0: 100.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not
present - tray closed
Trying to mount root from ufs:/dev/ad4s1a
vboxnet0: Ethernet address: 0a:00:27:00:00:00

You have a single-core (single processor) system.  There's no SMP in use
either (understandable).  As I mentioned, there's been discussions on
lists of sub-par performance of ULE on single-core systems.

As such, I probably wouldn't bother trying SCHED_ULE on this system.
Sticking with SCHED_4BSD is fine in your case.  If anyone in the future
brings up the possibility of SCHED_4BSD being removed from the kernel
base, you should scream quite loudly.  :-)

As for the next paragraph of your linked post (memory usage and
firefox-bin):

I can't explain what "ucond" represents in top.  That is to say: I know
what the STATE field is about, but I can't tell you code-wise what
"ucond" represents functionally; my guess is some condition relating to
a kernel mutex (thread lock).  The relevant code bits in
src/sys/kern/kern_umtx.c are over my head.  I'm sure a kernel hacker can
explain this, but it probably isn't relevant to your problem.


I strongly suspect it was to do with database locking of my
$HOME/.mozilla/firefox/.../places.sqlite file.       -- George Mitchell

That's a bit of a stretch.  truss or ktrace would help here, but it
would require someone to dedicate a bit of time to debug this problem
for you (firefox is a humongous beast; ktrace/truss output from this
program would be gigantic).  I'd probably split these two problems
(unfriendly CPU time slicing vs. memory and firefox-bin) up into
separate discussions (or even separate PRs).



Adding a tidbit of information to this that might or might not make a bit of difference to you. Link [1] that has some scheduling changes that were done in HEAD/-CURRENT that were not merged to -STABLE might be able to help you out some \o/. Also, I found in the past adjusting idprio(1) of processes proves to work out quite well for processes you want to just run in the background and not interrupt your day to day momentary work and especially for dnetc works out quite well. Link [2] I have extracted directly from the email out of convenience and applied and compiled directly into my running test kernels already and has no side effects so far with the 2-3 days its been running.

1. http://lists.freebsd.org/pipermail/freebsd-current/2011-January/022270.html

2.
http://patches.jhell.googlecode.com/hg/sched-priority.patch


--

 Regards,

 J. Hellenthal
 (0x89D8547E)
 JJH48-ARIN

_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to