From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 20 14:37:23 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8452216A469 for ; Wed, 20 Jun 2007 14:37:23 +0000 (UTC) (envelope-from dcross@okcupid.com) Received: from mail0.okcupid.com (mail0.okcupid.com [66.59.66.16]) by mx1.freebsd.org (Postfix) with ESMTP id 59C6A13C4BD for ; Wed, 20 Jun 2007 14:37:23 +0000 (UTC) (envelope-from dcross@okcupid.com) Received: from max.okcupid.com (max.okcupid.com [216.254.112.36]) by mail0.okcupid.com (8.13.4/8.13.4) with ESMTP id l5KEOQcT036152 for ; Wed, 20 Jun 2007 10:24:26 -0400 (EDT) (envelope-from dcross@okcupid.com) Received: from max.okcupid.com (localhost [127.0.0.1]) by max.okcupid.com (8.13.6/8.13.6) with ESMTP id l5KEO191015025 for ; Wed, 20 Jun 2007 10:24:01 -0400 (EDT) (envelope-from dcross@max.okcupid.com) X-DomainKeys: Sendmail DomainKeys Filter v0.3.3 max.okcupid.com l5KEO191015025 Received: from localhost (dcross@localhost) by max.okcupid.com (8.13.6/8.13.6/Submit) with ESMTP id l5KEO1fC015022 for ; Wed, 20 Jun 2007 10:24:01 -0400 (EDT) (envelope-from dcross@max.okcupid.com) Date: Wed, 20 Jun 2007 10:24:01 -0400 (EDT) From: David Cross To: freebsd-hackers@freebsd.org Message-ID: <20070620100737.S56928@max.okcupid.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Wed, 20 Jun 2007 15:26:01 +0000 Subject: Very slow sed... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 14:37:23 -0000 Ok the subject line is misleading.. but I don't know how else to put it. I have a machine on which SOME programs are slow. VERY SLOW. Other programs run just fine. I cannot seem to find the source of the problem. Machine 1 (the ok machine) is running 6.2-RELEASE-pLATEST. It is a CPU: Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz (1862.11-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x6f6 Stepping = 6 Features=0xbfebfbff Features2=0xe3bd,CX16,,> AMD Features=0x20100800 AMD Features2=0x1 Cores per package: 2 real memory = 2145427456 (2046 MB) avail memory = 2060214272 (1964 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 Machine 2 (the slow machine) is running 6.2-RELEASE-pLATEST. It is a CPU: Intel(R) Core(TM)2 CPU 6320 @ 1.86GHz (1876.00-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x6f6 Stepping = 6 Features=0xbfebfbff Features2=0xe3bd,CX16,XTPR,> AMD Features=0x20100800 AMD Features2=0x1 Cores per package: 2 real memory = 4764729344 (4544 MB) avail memory = 4063408128 (3875 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 Both are compiled with the exact same CFLAGS/COPTFLAGS (though it doesn't matter WHAT I compile it with, its still SLOW on many operations, thou fine on others). For example: Machine 1: dd bs=22 if=X11-lib32.tar.bz2 | cat >/dev/null 2571071+1 records in 2571071+1 records out 56563575 bytes transferred in 23.048543 secs (2454106 bytes/sec) Machine 2: dd bs=22 if=X11-lib32.tar.bz2 | cat >/dev/null 2571071+1 records in 2571071+1 records out 56563575 bytes transferred in 24.052331 secs (2351688 bytes/sec) Machine 1: openssl speed aes-128 cbc 91791.47k 94887.05k 96138.47k 96574.02k 96623.36k aes-192 cbc 80654.04k 84248.16k 85304.90k 85590.38k 85589.09k aes-256 cbc 72706.24k 75476.05k 75957.00k 76046.60k 76020.44k Machine 2: openssl speed aes-128 cbc 92457.48k 95876.89k 96900.91k 97227.52k 97223.53k aes-192 cbc 80875.87k 84916.79k 85773.97k 85996.90k 85978.43k aes-256 cbc 72943.78k 75833.00k 76466.32k 76631.74k 76642.40k Machine 1: time sed -f /usr/src/gnu/usr.bin/groff/tmac/../../../../contrib/groff/tmac/strip.sed /usr/src/gnu/usr.bin/groff/tmac/../../../../contrib/groff/tmac/doc-common > /dev/null real 0m0.059s user 0m0.013s sys 0m0.000s Machine 2: time sed -f /usr/src/gnu/usr.bin/groff/tmac/../../../../contrib/groff/tmac/strip.sed /usr/src/gnu/usr.bin/groff/tmac/../../../../contrib/groff/tmac/doc-common > /dev/null real 0m4.506s user 0m4.167s sys 0m0.000s Yes... you read that right... almost 400 _TIMES_ slower. WTF.. Where should I be looking? -- David E. Cross