Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47793 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72092 invoked from network); 5 Apr 2010 17:20:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Apr 2010 17:20:08 -0000 Authentication-Results: pb1.pair.com header.from=speedy.spam@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=speedy.spam@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.92.25 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: speedy.spam@gmail.com X-Host-Fingerprint: 74.125.92.25 qw-out-2122.google.com Received: from [74.125.92.25] ([74.125.92.25:1307] helo=qw-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/A1-60700-7CB1ABB4 for ; Mon, 05 Apr 2010 13:20:08 -0400 Received: by qw-out-2122.google.com with SMTP id 8so1617346qwh.59 for ; Mon, 05 Apr 2010 10:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:reply-to:x-priority :message-id:to:cc:subject:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=/8y+Mf6iwuvAbr+t7O+5htSYdpvvIXAvzQTGjm/AXIs=; b=m/OGeey0fNGqA4MgnBGS9EUGg8BTm0fGucC3VlYkySh0HTnlgzUpiiuVPaIA1gZL0E AN4UVh8cnKSPLUhwtC4pj48L8aPnyoO9FNFyea5iV7ka/3UBvj4dUIGKqNFuC54FS3FY /z4p9ghqqLPlpKIjP1iEj2pRkH9xwS+4BfE5E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:reply-to:x-priority:message-id:to:cc:subject:in-reply-to :references:mime-version:content-type:content-transfer-encoding; b=quo8aqP80k9iOeFrRzN61K0VPSMzXj1as4OxkX4+s4yWF1WVeDoAYVszhm6gvjty5J 826auny4YPKyMsaav6OIm5hxa+di3Z1tD5KcqTLwlr25EnkGSBEpexpf09148CDmJ+Kq TOgxerHUC/1R/1vmZSmlHEcUZX9OVjUm3ZTp0= Received: by 10.224.98.197 with SMTP id r5mr2122953qan.277.1270488003833; Mon, 05 Apr 2010 10:20:03 -0700 (PDT) Received: from tankgirl ([72.14.241.35]) by mx.google.com with ESMTPS id 7sm2675560qwb.36.2010.04.05.10.19.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Apr 2010 10:20:02 -0700 (PDT) Date: Mon, 5 Apr 2010 19:19:55 +0200 Reply-To: speedy X-Priority: 3 (Normal) Message-ID: <1751940094.20100405191955@gmail.com> To: Moriyoshi Koizumi CC: Alexey Zakhlestin , internals@lists.php.net In-Reply-To: References: <1941231697.20100401163215@gmail.com> <1288EF47-3DAE-4162-B9A6-FD21ACAEF8BB@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] php and multithreading (additional arguments) From: speedy.spam@gmail.com (speedy) Hello Moriyoshi, Monday, April 5, 2010, 5:57:38 PM, you wrote: >> Is overhead of starting new thread large? > The cost is almost the same as when spawning a new runtime instance on > a threaded web server with TSRM enabled. If you'd pass a large data > to the subthread, then the overhead should go large because of the > deep copy. Note that could be optimized by implementing copy on write (with properly placed hooks and shared data) between contexts - would save tons of memory and speed up the thread creation by an order of magnitude. > Moriyoshi --=20 Best regards, speedy mailto:speedy.spam@gmail.com