From owner-freebsd-hackers Tue Sep 10 10:27: 1 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5341737B400 for ; Tue, 10 Sep 2002 10:26:50 -0700 (PDT) Received: from host217-41-48-43.in-addr.btopenworld.com (host217-41-48-43.in-addr.btopenworld.com [217.41.48.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66ED143E72 for ; Tue, 10 Sep 2002 10:26:49 -0700 (PDT) (envelope-from dom@host217-41-48-43.in-addr.btopenworld.com) Received: by host217-41-48-43.in-addr.btopenworld.com (Postfix, from userid 1001) id A1C89512; Tue, 10 Sep 2002 18:27:24 +0100 (BST) Date: Tue, 10 Sep 2002 18:27:24 +0100 From: Dominic Marks To: hackers@d.sparks.net Cc: freebsd-hackers@freebsd.org Subject: Re: Dell 2650 SMP perf question Message-ID: <20020910172724.GB889@gallium> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Sep 10, 2002 at 01:16:40PM -0400, hackers@d.sparks.net wrote: > Hi All; > > I'm stumped at how little improvement using an SMP kernel gives in a Dell > 2650. System is dual 2400 xeon processors, 2 GB ram. It's intended to be > used as a database processor, among other things. A perl process that > read and input file and updates simple records in a mysql database > actually run much more slowly: processing ~2million records takes 817 > seconds with SMP enabled and 262 seconds with it disabled. > > Simple things like some_program.pl < some_big_file | another_program.pl > > seem to take full advantage of the second processor, but this system is > supposed to run mysql. > > Hyperthreading is turned off, I believe. There aren't any > "hyperthreading" swithes in the bios I could find, but the "logical > processor" option is turned off. > > > Clues why SMP is so much slower very welcome indeed. I believe at some point in the not too distant past their have been many performance problems for people using MySQL on FreeBSD. These problems where mostly related to MySQL's use of threads, I don't know if these problems have been fully resolved but it could be that SMP is aggrevating this. Watching what MySQL is doing with a trace might show some interesting results. I suppose you're running the lastest version of MySQL ? > --- David > > > > > Nitty Gritty details: > > > > FreeBSD is 4.7prerelease, cvsupped 9/9/02. Dmesg output: > > Copyright (c) 1992-2002 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 4.7-PRERELEASE #0: Mon Sep 9 21:23:39 GMT 2002 > root@:/usr/src/sys/compile/DBSMP > Timecounter "i8254" frequency 1193182 Hz > CPU: Pentium 4 (2392.26-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0xf24 Stepping = 4 > > Features=0x3febfbff MX,FXSR,SSE,SSE2,SS,,ACC> > real memory = 2147418112 (2097088K bytes) > avail memory = 2088226816 (2039284K bytes) > Changing APIC ID for IO APIC #0 from 0 to 3 on chip > Changing APIC ID for IO APIC #1 from 0 to 4 on chip > Changing APIC ID for IO APIC #2 from 0 to 5 on chip > Programming 16 pins in IOAPIC #0 > IOAPIC #0 intpin 2 -> irq 0 > Programming 16 pins in IOAPIC #1 > Programming 16 pins in IOAPIC #2 > FreeBSD/SMP: Multiprocessor motherboard > cpu0 (BSP): apic id: 0, version: 0x00050014, at 0xfee00000 > cpu1 (AP): apic id: 2, version: 0x00050014, at 0xfee00000 > io0 (APIC): apic id: 3, version: 0x000f0011, at 0xfec00000 > io2 (APIC): apic id: 5, version: 0x000f0011, at 0xfec02000 > Preloaded elf kernel "kernel" at 0xc035a000. > md0: Malloc disk > Using $PIR table, 9 entries at 0xc00fc490 > npx0: on motherboard > npx0: INT 16 interface > pcib0: on motherboard > IOAPIC #1 intpin 3 -> irq 2 > IOAPIC #1 intpin 7 -> irq 3 > IOAPIC #1 intpin 11 -> irq 5 > pci0: on pcib0 > pci0: (vendor=0x1028, dev=0x000c) at 4.0 irq 2 > pci0: (vendor=0x1028, dev=0x0008) at 4.1 irq 3 > pci0: (vendor=0x1028, dev=0x000d) at 4.2 irq 5 > pci0: at 14.0 > atapci0: port > 0x8b0-0x8bf,0x8d8-0x8db,0x8d0-0x8d7,0x8c8-0x8cb,0x8c0-0x8c7 a > t device 15.1 on pci0 > ata0: at 0x1f0 irq 14 on atapci0 > ata1: at 0x170 irq 15 on atapci0 > pci0: at 15.2 irq 0 > isab0: at device 15.3 on > pci0 > isa0: on isab0 > pcib1: on motherboard > pci1: on pcib1 > pcib2: on motherboard > pci2: on pcib2 > pcib3: on motherboard > IOAPIC #1 intpin 12 -> irq 7 > IOAPIC #1 intpin 13 -> irq 10 > pci3: on pcib3 > bge0: mem 0xfcf10000-0xfcf1ffff irq 7 > at device 6.0 on pci3 > bge0: Ethernet address: 00:06:5b:8c:a5:62 > miibus0: on bge0 > brgphy0: on miibus0 > brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, > 1000baseTX-FDX, auto > bge1: mem 0xfcf00000-0xfcf0ffff irq 10 > at device 8.0 on pci3 > bge1: Ethernet address: 00:06:5b:8c:a5:63 > miibus1: on bge1 > brgphy1: on miibus1 > brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, > 1000baseTX-FDX, auto > pcib4: on motherboard > pci4: on pcib4 > pcib8: at device 8.0 on pci4 > IOAPIC #1 intpin 14 -> irq 11 > IOAPIC #1 intpin 15 -> irq 13 > pci5: on pcib8 > ahc_pci0: port 0xcc00-0xccff mem > 0xfccff000-0xfccfffff irq 11 at device > 6.0 on pci5 > aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs > ahc_pci1: port 0xc800-0xc8ff mem > 0xfccfe000-0xfccfefff irq 13 at device > 6.1 on pci5 > aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs > pcib5: on motherboard > pci6: on pcib5 > pcib6: on motherboard > pci7: on pcib6 > pcib7: on motherboard > pci8: on pcib7 > orm0: