From owner-freebsd-arch Mon Nov 20 9:41:14 2000 Delivered-To: freebsd-arch@freebsd.org Received: from sampnt500.avantgo.com (unknown [209.220.59.68]) by hub.freebsd.org (Postfix) with ESMTP id 46A5837B479; Mon, 20 Nov 2000 09:41:10 -0800 (PST) Received: by sampnt500.avantgo.com with Internet Mail Service (5.5.2650.21) id ; Mon, 20 Nov 2000 09:42:06 -0800 Received: from river.avantgo.com ([10.1.30.114]) by sampnt500.avantgo.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id W0LZ2H5X; Mon, 20 Nov 2000 09:41:56 -0800 From: Scott Hess To: Julian Elischer Cc: jasone@FreeBSD.ORG, arch@FreeBSD.ORG, smp@FreeBSD.ORG Date: Mon, 20 Nov 2000 09:45:53 -0800 (PST) Subject: Re: Threads (KSE etc) comments In-Reply-To: <3A192821.13463950@elischer.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have seen the notion of limiting KSE's to the number of CPUs mentioned a number of times on the arch and smp lists. This is presumably done to maximize performance of CPU-bound and network-I/O-bound programs. Please keep disk-I/O-bound programs in mind. The current (3.x/4.x) pthreads implementation is horrid for programs bound by disk I/O. If you have a single multithreaded process doing lots of disk I/Os (let's call it MySQL), then it effectively becomes seek constrained. Converting from single disk to a 6 disk hardware RAID only gains perhaps %20 in throughput, even though throughput should at least double or triple. My informal testing under 3.x with a 6 disk striped set indicated that maximum throughput occurred with 8 seperate processes (running 8 seperate loads), so long as the CPU didn't become a bottleneck. With 1 disk, the maximum was more like three processes - but it was still more than the single process your posting would restrict things to. Presumably more disks would want more processes, with some upper limit where more processes don't help. [No, I don't have the bandwidth to contribute work at this time. I might be able to scrape together some time to characterize the issue more precisely, though, if I knew that my results were going to get folded in. My main goal is that after everything is said and done, there isn't a huge hole intentionally designed into the system!] Later, scott On Mon, 20 Nov 2000, Julian Elischer wrote: > A KSEG can only have as a maximum N KSEs associated with it, where N is > the number of processors, (unless artificially reduced by a lower > concurency declaration). (you said this but only indirectly). In > general, KSEs are each assigned to a processor. They do not in general > move between processors unless some explicit adjustment is being > made(*), and as a general rule, two KSEs will not be assigned to the > same processor. (in some transitional moments this may be allowed to > briefly happen) This in general if you run a KSEC on the same KSE it was > run on last time, you should be on the same processor, > (and get any affinity advantages that might exist). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message