Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74945 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96640 invoked from network); 17 Jun 2014 12:36:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jun 2014 12:36:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.174 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.128.174 mail-ve0-f174.google.com Received: from [209.85.128.174] ([209.85.128.174:42808] helo=mail-ve0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/81-21963-F4630A35 for ; Tue, 17 Jun 2014 08:36:31 -0400 Received: by mail-ve0-f174.google.com with SMTP id jx11so4787133veb.33 for ; Tue, 17 Jun 2014 05:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=/DGiyKLpv26HWIYlaVQpiIs3s2ztqNpiAhCU3Sp6n1U=; b=EdIKWCsK9yo/1IRfDP5haFnqUrlufBVWfNdRgx6fNDhstUvJ8SXON0YLeFksaY8iBU sTJa+cjMeG8/5DFPs47BIDBavYyh8GV5A/4+sJxQVDsM7EmSmzjbpF4Op+goec6kRRxH fOinVzcX4dTB+FzimW1aDygpaBrZEsgop2P5DjeLKbz4dJqelDjzAeBWTnsgmXgGoSLd lljPvlLjYlvY/llVg4vALYdDlm+Fg46jQ3H4bzlSa6HSny7/+PkesUoMfBRank/MLTbW b2vIvxTyI8zbyjgTai/ylBCSJYxrjVNihGCtZpjTEBISX1QhjrilXxFtR+9vPFEidgfR wetA== X-Received: by 10.58.1.9 with SMTP id 9mr22172170vei.14.1403008588472; Tue, 17 Jun 2014 05:36:28 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Tue, 17 Jun 2014 05:35:48 -0700 (PDT) In-Reply-To: <20140617123702.GF24253@methuselah> References: <20140617110758.GD24253@methuselah> <20140617123702.GF24253@methuselah> Date: Tue, 17 Jun 2014 14:35:48 +0200 X-Google-Sender-Auth: jBzuuy0NwA76UJ425V5T34-4hxg Message-ID: To: Martin Pelikan , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Refactoring our IO multiplexing layer From: jpauli@php.net (Julien Pauli) CCing internals On Tue, Jun 17, 2014 at 2:37 PM, Martin Pelikan wrote: >> Yes, libevent seems to be the API we need. >> Regading Nginx, I'm not sure we need file AIO, for PHP, network AIO >> could be enough to implement. Still, our FPM IO multiplexing layer is >> stable now. >> >> The problem of binding a lib is that you add one more dependency, you >> have to check for licence compatibility, and check for the dependency >> when building. Not talking about bugs in the lib impacting our >> codebase. This is a tradeoff. > > All these are very good with libevent compared to other libraries. > I try to avoid dependencies a lot (more than most people do) and I wrote > that e-mail because in this case that was the wrong thing to do. > > Doing it once is easy. Doing it for many systems quickly becomes a pain > in the arse, because you're just solving issues. That's not programming. > > But again, I don't know what exactly PHP needs. That is another question. Actually, from a user POV, only stream_select() is available. It is a "silly" wrapper over select(), and that's all. It works, but suffers from the same problems as select(). I'm not sure userland needs that perf so that select() becomes the bottleneck. It is known to become notably slow starting from several hundreds of fd. I cant believe one would use stream_select() in userland with that quantity of fds , better code in C such parts. But, where performance start becoming critical is into FPM. FPM is a fastcgi handler that needs to juggle with FastCGI clients. Here, the needs are barely the same as a webserver like NginX : fast, performant, the most CPU bound as possible, no blocking waits , etc... FPM developed for that its own layer, which actually (AFAIR) , fits the need. What I think is pitty, is that there is no consistence in PHP. FPM AIO layer is good (but obviously could be improved), but only FPM can use it actually , there is no shared API other parts of PHP could consume. Thus my questions. Julien