From owner-freebsd-threads@FreeBSD.ORG Mon Apr 27 08:43:44 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A80B1065674; Mon, 27 Apr 2009 08:43:44 +0000 (UTC) (envelope-from raykinsella78@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id B98468FC16; Mon, 27 Apr 2009 08:43:43 +0000 (UTC) (envelope-from raykinsella78@gmail.com) Received: by bwz9 with SMTP id 9so2064852bwz.43 for ; Mon, 27 Apr 2009 01:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=EgL9OfuikxPUuaOQkhhv6hBEs0YxgajW0ZnJZENa4n0=; b=sxaFGPdkm8nw0CSPO4PIhXmMNaMuSrYigaP8I5J37ESCivA7rCooT4PRs5wJZ/6ZlO acbSdBSQSHhJuc5U5tVVO8I1JJN9HT1GFb90DVWtPQx6Z7l9sMZDO8fQxpg09tk7yauF MxR1DgC0VkageEToiqhi4w3JfxocQOhRMaSvU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=nHU478wC8tRjwFlDyJ3jSb3PRQ/fNhULLI4bcbOMBzLmGgDL2GzgzHPQzQU3Er4i+O XKmr7z/bQe3qr/IELHoBSGP/CLeEYdkwAGRfTkgSDLSUm0SQmFw2pmmoW4GdsR8sTkik RA1DNdacQ+iU0BA+j9w0Dodurg6d3tj7TxdpI= MIME-Version: 1.0 Received: by 10.239.172.18 with SMTP id y18mr253998hbe.72.1240820320304; Mon, 27 Apr 2009 01:18:40 -0700 (PDT) In-Reply-To: <40bb871a0904241542o3f4d6c6ap62ff71876074bbea@mail.gmail.com> References: <40bb871a0904241542o3f4d6c6ap62ff71876074bbea@mail.gmail.com> Date: Mon, 27 Apr 2009 09:18:40 +0100 Message-ID: <584ec6bb0904270118v37795ee2k24c9262d4c1abd80@mail.gmail.com> From: Ray Kinsella To: Joseph Kuan Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, freebsd-performance@freebsd.org, freebsd-threads@freebsd.org Subject: Re: FreeBSD 7.1 taskq em performance X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 08:43:45 -0000 Joseph, I would recommend that you start with PMCStat and figure where the bottleneck is, Given that you have a two threads and your CPU is at 100%, my a apriori guess would be a contention for a spinlock, so I might also try to use LOCK_PROFILING to handle on this. Regards Ray Kinsella On Fri, Apr 24, 2009 at 11:42 PM, Joseph Kuan wrote: > Hi all, > I have been hitting some barrier with FreeBSD 7.1 network performance. I > have written an application which contains two kernel threads that takes > mbufs directly from a network interface and forwards to another network > interface. This idea is to simulate different network environment. > > I have been using FreeBSD 6.4 amd64 and tested with an Ixia box > (specialised hardware firing very high packet rate). The PC was a Core2 2.6 > GHz with dual ports Intel PCIE Gigabit network card. It can manage up to > 1.2 > million pps. > > I have a higher spec PC with FreeBSD 7.1 amd64 and Quadcore 2.3 GHz and > PCIE Gigabit network card. The performance can only achieve up to 600k pps. > I notice the 'taskq em0' and 'taskq em1' is solid 100% CPU but it is not in > FreeBSD 6.4. > > Any advice? > > Many thanks in advance > > Joe > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to " > freebsd-performance-unsubscribe@freebsd.org" > From owner-freebsd-threads@FreeBSD.ORG Mon Apr 27 11:07:04 2009 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 842931065674 for ; Mon, 27 Apr 2009 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6650C8FC17 for ; Mon, 27 Apr 2009 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3RB739G002457 for ; Mon, 27 Apr 2009 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3RB73wr002453 for freebsd-threads@FreeBSD.org; Mon, 27 Apr 2009 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Apr 2009 11:07:03 GMT Message-Id: <200904271107.n3RB73wr002453@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 11:07:05 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o threa/133734 threads 32 bit libthr failing pthread_create() o threa/128922 threads threads hang with xorg running o threa/127225 threads bug in lib/libthr/thread/thr_init.c o threa/122923 threads 'nice' does not prevent background process from steali o threa/121336 threads lang/neko threading ok on UP, broken on SMP (FreeBSD 7 o threa/118715 threads kse problem o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP o threa/116181 threads /dev/io-related io access permissions are not propagat o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/101323 threads [patch] fork(2) in threaded programs broken. s threa/100815 threads FBSD 5.5 broke nanosleep in libc_r s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc s threa/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/83914 threads [libc] popen() doesn't work in static threaded program o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/80435 threads panic on high loads o threa/79887 threads [patch] freopen() isn't thread-safe o threa/79683 threads svctcp_create() fails if multiple threads call at the s threa/76694 threads fork cause hang in dup()/close() function in child (-l s threa/76690 threads fork hang in child for -lc_r o threa/75374 threads pthread_kill() ignores SA_SIGINFO flag o threa/75273 threads FBSD 5.3 libpthread (KSE) bug o threa/72953 threads fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYST o threa/70975 threads [sysvipc] unexpected and unreliable behaviour when usi s threa/69020 threads pthreads library leaks _gc_mutex s threa/49087 threads Signals lost in programs linked with libc_r s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/39922 threads [threads] [patch] Threaded applications executed with s threa/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwrite() need wra s threa/34536 threads accept() blocks other threads s threa/32295 threads [libc_r] [patch] pthread(3) dont dequeue signals s threa/30464 threads pthread mutex attributes -- pshared s threa/24632 threads libc_r delicate deviation from libc in handling SIGCHL s threa/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVTIMEO socket o 38 problems total. From owner-freebsd-threads@FreeBSD.ORG Tue Apr 28 10:53:39 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BEF4106564A for ; Tue, 28 Apr 2009 10:53:39 +0000 (UTC) (envelope-from gofdt-freebsd-threads@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id E969E8FC1B for ; Tue, 28 Apr 2009 10:53:38 +0000 (UTC) (envelope-from gofdt-freebsd-threads@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LykwR-0003zr-3j for freebsd-threads@freebsd.org; Tue, 28 Apr 2009 10:53:35 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Apr 2009 10:53:35 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Apr 2009 10:53:35 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-threads@freebsd.org From: Ivan Voras Date: Tue, 28 Apr 2009 12:53:14 +0200 Lines: 52 Message-ID: References: <40bb871a0904241542o3f4d6c6ap62ff71876074bbea@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1E2992A464A9D9DE65A5E08C" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090409) In-Reply-To: <40bb871a0904241542o3f4d6c6ap62ff71876074bbea@mail.gmail.com> X-Enigmail-Version: 0.95.7 Sender: news Cc: freebsd-net@freebsd.org, freebsd-performance@freebsd.org Subject: Re: FreeBSD 7.1 taskq em performance X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2009 10:53:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1E2992A464A9D9DE65A5E08C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Joseph Kuan wrote: > Hi all, > I have been hitting some barrier with FreeBSD 7.1 network performance= =2E I > have written an application which contains two kernel threads that take= s > mbufs directly from a network interface and forwards to another network= > interface. This idea is to simulate different network environment. >=20 > I have been using FreeBSD 6.4 amd64 and tested with an Ixia box > (specialised hardware firing very high packet rate). The PC was a Core2= 2.6 > GHz with dual ports Intel PCIE Gigabit network card. It can manage up t= o 1.2 > million pps. >=20 > I have a higher spec PC with FreeBSD 7.1 amd64 and Quadcore 2.3 GHz a= nd > PCIE Gigabit network card. The performance can only achieve up to 600k = pps. > I notice the 'taskq em0' and 'taskq em1' is solid 100% CPU but it is no= t in > FreeBSD 6.4. Maybe this could help you: http://people.yandex-team.ru/~wawa/ It's a SMP patch to the em driver. --------------enig1E2992A464A9D9DE65A5E08C 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.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkn24CAACgkQldnAQVacBcij+ACgj133tqKW+kK2+S5/AVYQ3YfC GVIAoJzfKlga03AzieDZCR7SbFw66p0z =iBPe -----END PGP SIGNATURE----- --------------enig1E2992A464A9D9DE65A5E08C-- From owner-freebsd-threads@FreeBSD.ORG Thu Apr 30 09:19:26 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB8AF106566C for ; Thu, 30 Apr 2009 09:19:26 +0000 (UTC) (envelope-from ykrapiva@gmail.com) Received: from mail-fx0-f162.google.com (mail-fx0-f162.google.com [209.85.220.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7B78FC1A for ; Thu, 30 Apr 2009 09:19:26 +0000 (UTC) (envelope-from ykrapiva@gmail.com) Received: by fxm6 with SMTP id 6so1684302fxm.43 for ; Thu, 30 Apr 2009 02:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=Nf4dMemR28uOAp+5TFPRekid1gcWaZqiT6Z/GcBr2bY=; b=pMcEfu3wp53BfWLPJHDj0HvdRouw6/+DgKmr7HUpRhLIBlKVSiFahZ1+5G2CZOrpmr 4fMwdAKZqYM34AegdBHAIHz4rCeRsg9zyQql92SdS0uJMUEa+h2MsWj7s84xl9YdNkTT AtKJm+Gyv+hYL+iexCq2LKkErMJE6FGW+UqQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=PGH1SJIAsUFnfpQIhoROeINcWe4emJo4d0ABReon2VMgbLMVhjIpXT/l7AMMV8PzlB CE6NyuAJj6284K3ucROITSRAQGTsnGlTKXNXAUPhashennPGUXaoiIyRSNoxOHrXF0il 6UtCmOgaWLF4O7KzFG+AvcLM2ElrmS1vuSrOs= MIME-Version: 1.0 Received: by 10.204.123.136 with SMTP id p8mr1233725bkr.21.1241081594058; Thu, 30 Apr 2009 01:53:14 -0700 (PDT) Date: Thu, 30 Apr 2009 11:53:14 +0300 Message-ID: <73923e560904300153t22cef75ay81434eeb5a245b2d@mail.gmail.com> From: Yevgen Krapiva To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: How to increase the maximum number of threads per process ? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 09:19:27 -0000 Hi. How to increase the maximum number of threads per process ? sysctl kern.threads.max_threads_per_proc=5000 do the trick but if I specify more than 5000 (10000 for example), the system doesn't let me anyway to create more than ~5000 of threads. This is needed for server application which creates a new thread for incoming request. If the number of threads reaches the OS's limits, it crashes. Thanks.