From owner-freebsd-performance@FreeBSD.ORG Sun Apr 22 16:09:00 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5626816A400 for ; Sun, 22 Apr 2007 16:09:00 +0000 (UTC) (envelope-from cheffo@FreeBSD-BG.org) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id CA6B613C468 for ; Sun, 22 Apr 2007 16:08:59 +0000 (UTC) (envelope-from cheffo@FreeBSD-BG.org) Received: from blah.sun-fish.com (localhost [127.0.0.1]) by blah.sun-fish.com (Postfix) with ESMTP id 6F64F1B10EEC; Sun, 22 Apr 2007 18:08:58 +0200 (CEST) Received: from [10.1.1.2] (unknown [192.168.25.6]) by blah.sun-fish.com (Postfix) with ESMTP id 68E991B10EE0; Sun, 22 Apr 2007 18:08:58 +0200 (CEST) Message-ID: <462B8898.5090306@FreeBSD-BG.org> Date: Sun, 22 Apr 2007 19:08:56 +0300 From: Stefan Lambrev User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Ivan Voras References: <462A31A9.5080207@FreeBSD-BG.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP on BLAH Cc: freebsd-performance@freebsd.org Subject: Re: apache httpd performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 16:09:00 -0000 Hi, Ivan Voras wrote: > Cheffo wrote: > > >> What else I can change/test to improve performance? >> > > First you'll have to give more info about the hardware on both systems, > and the way you benchmarked them (e.g. did you benchmark over ethernet > or from the same machine?). There are also a bunch of things that may > make apache go faster/slower, for example DNS resolving for the logs, > rewrite rules, etc. - you should test with (as much as they can be) > identical configurations. > I'm using my laptop to run ab in both test, and 2 totally different servers :) That's why I do not pretend that the benchmark is done the right way. The linux host is with pentium 4 single core processor, The freebsd host is amd64 athlon 3200+ (2GHz) - single core too Both servers share same dns server(s), so I do not think that the DNS can be issue. I'm using 3com network card - 100mbps - xl. I'll test with accf_http and will report back. If there is a problem (as I'm still not sure that there is) I'll make more accurate benchmark and will try to find where is the problem (with your help) :) > On a slow-ish 2 CPU Pentium3 server, over gigabit network (remote > client), I get: > > Server Software: Apache/2.2.3 > Server Port: 80 > > Document Path: /file.txt > Document Length: 9500 bytes > > Concurrency Level: 100 > Time taken for tests: 27.300259 seconds > Complete requests: 50000 > Failed requests: 0 > Write errors: 0 > Total transferred: 489226808 bytes > HTML transferred: 475025956 bytes > Requests per second: 1831.48 [#/sec] (mean) > Time per request: 54.601 [ms] (mean) > Time per request: 0.546 [ms] (mean, across all concurrent requests) > Transfer rate: 17500.20 [Kbytes/sec] received > > On the same server, ab running locally, I get: > > Server Software: Apache/2.2.3 > Server Port: 80 > > Document Path: /file.txt > Document Length: 9500 bytes > > Concurrency Level: 100 > Time taken for tests: 30.8557 seconds > Complete requests: 29194 > Failed requests: 6 > (Connect: 6, Length: 0, Exceptions: 0) > Write errors: 0 > Total transferred: 286117856 bytes > HTML transferred: 277811424 bytes > Requests per second: 972.86 [#/sec] (mean) > Time per request: 102.790 [ms] (mean) > Time per request: 1.028 [ms] (mean, across all concurrent requests) > Transfer rate: 9311.04 [Kbytes/sec] received > > (Yes, this is a different version of apache than yours, but I'm > illustrating a point :) ) > > Some more data points: > > - Remote client, apache, using keepalives: > Requests per second: 2891.61 [#/sec] (mean) > Time per request: 34.583 [ms] (mean) > Time per request: 0.346 [ms] (mean, across all concurrent requests) > Transfer rate: 27729.00 [Kbytes/sec] received > > - Remote client, using thttpd instead of apache (keepalives have no > influence here): > Requests per second: 3728.68 [#/sec] (mean) > Time per request: 26.819 [ms] (mean) > Time per request: 0.268 [ms] (mean, across all concurrent requests) > Transfer rate: 35499.92 [Kbytes/sec] received > > Regarding this last one: It seems that FreeBSD really benefits from > using 2 CPUs here. thttpd is a single-threaded async server, but the > load on the machine shows cca 10% idle. Thttpd gets ~~45%, swi:net gets > 45%, irq20:bge0 gets 20%, syslogd gets 5% and the rest goes where top > can't follow. It looks like ipfw might be one of the limiting factors > here (I use dynamic rules and the log shows ipfw discarding packets that > look valid). > > > Can you make this test with default /manual/ alias instead of file.txt, so we can compare results ? From owner-freebsd-performance@FreeBSD.ORG Sun Apr 22 16:27:58 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A6C616A401 for ; Sun, 22 Apr 2007 16:27:58 +0000 (UTC) (envelope-from gofp-freebsd-performance@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5349213C448 for ; Sun, 22 Apr 2007 16:27:58 +0000 (UTC) (envelope-from gofp-freebsd-performance@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HfeuO-0008LW-2G for freebsd-performance@freebsd.org; Sun, 22 Apr 2007 18:27:28 +0200 Received: from 89-172-244-220.adsl.net.t-com.hr ([89.172.244.220]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Apr 2007 18:27:28 +0200 Received: from ivoras by 89-172-244-220.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Apr 2007 18:27:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-performance@freebsd.org From: Ivan Voras Date: Sun, 22 Apr 2007 18:27:18 +0200 Lines: 32 Message-ID: References: <462A31A9.5080207@FreeBSD-BG.org> <462B8898.5090306@FreeBSD-BG.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEBDBD10BB98CAAFABC503805" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-244-220.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: <462B8898.5090306@FreeBSD-BG.org> X-Enigmail-Version: 0.94.3.0 Sender: news Subject: Re: apache httpd performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 16:27:58 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEBDBD10BB98CAAFABC503805 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Stefan Lambrev wrote: > Can you make this test with default /manual/ alias instead of file.txt,= > so we can compare results ? Sorry, I currently need that server as-is and I've deleted the manuals some time ago (since I don't need them there). It would probably be easier for you to create a dummy text file in your documentroot directory= =2E --------------enigEBDBD10BB98CAAFABC503805 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGK4zmldnAQVacBcgRAhSCAKCyGF0KzZ7lsr+VzCfpec6kOG2LDwCgvCwi nVIUzylPwAzNnCi8LAfedWs= =PQiL -----END PGP SIGNATURE----- --------------enigEBDBD10BB98CAAFABC503805-- From owner-freebsd-performance@FreeBSD.ORG Mon Apr 23 02:21:08 2007 Return-Path: X-Original-To: freebsd-performance@FreeBSD.org Delivered-To: freebsd-performance@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBA7316A403 for ; Mon, 23 Apr 2007 02:21:07 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 9589213C45A for ; Mon, 23 Apr 2007 02:21:07 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 53352 invoked by uid 0); 23 Apr 2007 02:21:05 -0000 Received: from 190.55.91.88 (HELO deimos.mars.bsd) (190.55.91.88) by relay03.pair.com with SMTP; 23 Apr 2007 02:21:05 -0000 X-pair-Authenticated: 190.55.91.88 Date: Sun, 22 Apr 2007 23:20:56 -0300 From: Alejandro Pulver To: freebsd-performance@FreeBSD.org Message-ID: <20070422232056.18fbb9b8@deimos.mars.bsd> In-Reply-To: <20070420235747.5b83996d@deimos.mars.bsd> References: <20070420235747.5b83996d@deimos.mars.bsd> X-Mailer: Claws Mail 2.8.1 (GTK+ 2.10.11; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_k5zDlz7iWx8Eia=fDWKgoT+"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Mailman-Approved-At: Mon, 23 Apr 2007 04:06:32 +0000 Cc: Subject: Re: Gaim log writing delays the system X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2007 02:21:08 -0000 --Sig_k5zDlz7iWx8Eia=fDWKgoT+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 20 Apr 2007 23:57:47 -0300 Alejandro Pulver wrote: > Hello. >=20 > I have enabled logging in Gaim, and when a chat message arrives and it > is logged the disk writing delays (freezes) the system for less than a > second, it can be noticed for example with XMMS which does a strange > sound during that period. >=20 > I think this problem is related to the system and not the port, that's > why I asked here. Also I guess more information is needed about this, > like ktrace/truss output of Gaim together with kernel statistics > (vmstat/iostat). But other than ktrace, I don't use them. What would be > the commands to get the most relevant information about this? >=20 > I am using FreeBSD 6.2-RELEASE, and the boot message is here (the file > dmesg_machine_2.txt): >=20 > http://people.freebsd.org/~alepulver/disk-crash.tar.bz2 >=20 > I posted this in freebsd-hackers@ and got no answer, maybe this is the > right place. >=20 > Thanks and Best Regards, > Ale >=20 > P.S.: please CC me as I'm not subscribed. Hello. The issue only happens with gaim-devel, and seems to be related to the sound system (doesn't happen when disabling sounds). Sorry for the noise, I've been somewhat paranoid with this because it happened when I had a broken NVidia card (or incompatible with my motherboard), and some disk problems (these were apparently fixed in FreeBSD 6.2). So I thought it was a kernel problem (it happened on a machine with an old disk and on a new one so I discarded the possibility of hardware failing). Anyways the system does freeze for less than a second when that happens. I will make a more descriptive thread about this. Best Regards, Ale --Sig_k5zDlz7iWx8Eia=fDWKgoT+ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGLBgIiV05EpRcP2ERAnwiAJ0WkUaEhQwEN//3mB4QbJ6Ko1qk7ACg0zUz qXMRuw35MomQs4xIq3R4G2Y= =O75o -----END PGP SIGNATURE----- --Sig_k5zDlz7iWx8Eia=fDWKgoT+-- From owner-freebsd-performance@FreeBSD.ORG Mon Apr 23 22:42:00 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A4E916A408 for ; Mon, 23 Apr 2007 22:42:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1208C13C45B for ; Mon, 23 Apr 2007 22:42:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 904AC470A0; Mon, 23 Apr 2007 18:41:59 -0400 (EDT) Date: Mon, 23 Apr 2007 23:41:59 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Stefan Lambrev In-Reply-To: <462B8898.5090306@FreeBSD-BG.org> Message-ID: <20070423233713.M58942@fledge.watson.org> References: <462A31A9.5080207@FreeBSD-BG.org> <462B8898.5090306@FreeBSD-BG.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-performance@freebsd.org, Ivan Voras Subject: Re: apache httpd performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2007 22:42:00 -0000 On Sun, 22 Apr 2007, Stefan Lambrev wrote: > I'm using my laptop to run ab in both test, and 2 totally different servers > :) That's why I do not pretend that the benchmark is done the right way. > > The linux host is with pentium 4 single core processor, The freebsd host is > amd64 athlon 3200+ (2GHz) - single core too > > Both servers share same dns server(s), so I do not think that the DNS can be > issue. > > I'm using 3com network card - 100mbps - xl. > > I'll test with accf_http and will report back. If there is a problem (as I'm > still not sure that there is) I'll make more accurate benchmark and will try > to find where is the problem (with your help) :) If the hardware used for the servers and clients isn't identical between the two tests, then the results are at best misleading. In this case, assuming I understand your hardware description correctly, the significant differences in server hardware make any comparison utterly meaningless. We'd be better off ignoring the Linux results entirely and simply try instead to optimize your FreeBSD performance. If you want to do side-by-side OS comparisons, you need to use the same hardware configurations in an otherwise identical software configuration. If this is 6.x, try setting net.isr.direct to 1. If running threaded apps, try using libthr instead of libpthread. If using uniprocessor hardware, make sure you are using a UP kernel rather than an SMP kernel. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-performance@FreeBSD.ORG Tue Apr 24 07:47:30 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAE8016A406 for ; Tue, 24 Apr 2007 07:47:30 +0000 (UTC) (envelope-from cheffo@FreeBSD-BG.org) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 2503613C483 for ; Tue, 24 Apr 2007 07:47:27 +0000 (UTC) (envelope-from cheffo@FreeBSD-BG.org) Received: from blah.sun-fish.com (localhost [127.0.0.1]) by blah.sun-fish.com (Postfix) with ESMTP id A7BB31B10EB5; Tue, 24 Apr 2007 09:47:26 +0200 (CEST) Received: from [192.168.3.125] (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id A45C51B10C26; Tue, 24 Apr 2007 09:47:26 +0200 (CEST) Message-ID: <462DB60E.90608@FreeBSD-BG.org> Date: Tue, 24 Apr 2007 10:47:26 +0300 From: Cheffo User-Agent: Thunderbird 1.5.0.10 (X11/20070326) MIME-Version: 1.0 To: Robert Watson References: <462A31A9.5080207@FreeBSD-BG.org> <462B8898.5090306@FreeBSD-BG.org> <20070423233713.M58942@fledge.watson.org> In-Reply-To: <20070423233713.M58942@fledge.watson.org> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP on BLAH Cc: freebsd-performance@freebsd.org, Ivan Voras Subject: Re: apache httpd performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 07:47:30 -0000 Robert Watson wrote: > > On Sun, 22 Apr 2007, Stefan Lambrev wrote: > >> I'm using my laptop to run ab in both test, and 2 totally different >> servers :) That's why I do not pretend that the benchmark is done the >> right way. >> >> The linux host is with pentium 4 single core processor, The freebsd >> host is amd64 athlon 3200+ (2GHz) - single core too >> >> Both servers share same dns server(s), so I do not think that the DNS >> can be issue. >> >> I'm using 3com network card - 100mbps - xl. >> >> I'll test with accf_http and will report back. If there is a problem >> (as I'm still not sure that there is) I'll make more accurate >> benchmark and will try to find where is the problem (with your help) :) > > If the hardware used for the servers and clients isn't identical between > the two tests, then the results are at best misleading. In this case, > assuming I understand your hardware description correctly, the > significant differences in server hardware make any comparison utterly > meaningless. We'd be better off ignoring the Linux results entirely and > simply try instead to optimize your FreeBSD performance. If you want to > do side-by-side OS comparisons, you need to use the same hardware > configurations in an otherwise identical software configuration. > > If this is 6.x, try setting net.isr.direct to 1. If running threaded > apps, try using libthr instead of libpthread. If using uniprocessor > hardware, make sure you are using a UP kernel rather than an SMP kernel. I know this and I ignore totally results under linux :) My big surprise was that CPU: AMD Athlon(tm) 64 Processor 3200+ (2002.57-MHz K8-class CPU) can't handle 100 concurrent requests normally e.g. the load on the servers goes very high, and the server does not respond very well during the test. Just to be sure that linux do NOT outperforming freebsd :) I get pentium D dual core + 2x160GB sata HDDs, and gigabit intel (em) network card. I installed linux ubuntu 7 on disk1 and freebsd 6.2 on disk2, and can confirm that with default settings freebsd outperforms linux: 35K request/30sec (freebsd) vs 34K requests/30sec (ubuntu). What I noticed is that freebsd 6.2 comes very tunned and most recommended settings are already set. And results are here: FreeBSD shitler.cmotd.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Apr 23 16:19:19 UTC 2007 root@shitler.mitler.org:/usr/obj/usr/src/sys/SMP i386 Server Software: Apache/1.3.37 Server Hostname: 192.168.2.16 Server Port: 80 Document Path: /manual/ Document Length: 9364 bytes Concurrency Level: 100 Time taken for tests: 30.000 seconds Complete requests: 35289 Failed requests: 0 Broken pipe errors: 0 Total transferred: 345387971 bytes HTML transferred: 330718551 bytes Requests per second: 1176.30 [#/sec] (mean) Time per request: 85.01 [ms] (mean) Time per request: 0.85 [ms] (mean, across all concurrent requests) Transfer rate: 11512.93 [Kbytes/sec] received Linux shitler 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux Server Software: Apache/1.3.34 Server Hostname: 192.168.2.13 Server Port: 80 Document Path: /manual/ Document Length: 9364 bytes Concurrency Level: 100 Time taken for tests: 30.035 seconds Complete requests: 34162 Failed requests: 0 Broken pipe errors: 0 Total transferred: 335024120 bytes HTML transferred: 320109432 bytes Requests per second: 1137.41 [#/sec] (mean) Time per request: 87.92 [ms] (mean) Time per request: 0.88 [ms] (mean, across all concurrent requests) Transfer rate: 11154.46 [Kbytes/sec] received I'll test with net.isr.direct=1, but I do not think I can get better results, because the bottle neck is my 100mbps switch :) Next step will be to install centos (where I can install apache without problems as ubuntu have some problems and I was forced to use pre-build apache) , build custom kernel for freebsd, and I'll make tests on gigabit network. Once I reach best results with both OSes, I'll make some charts with different concurrency :) Thanks for the tips. -- Best Wishes, Stefan Lambrev ICQ# 24134177