Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114009 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26334 invoked from network); 9 Apr 2021 17:07:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Apr 2021 17:07:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EBA27180508 for ; Fri, 9 Apr 2021 10:07:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 9 Apr 2021 10:07:27 -0700 (PDT) Received: by mail-qt1-f180.google.com with SMTP id m16so4070359qtx.9 for ; Fri, 09 Apr 2021 10:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=adm+0AAXR4lUs0ZOrBT4vqL0yT5f9ATKPEJVOEmjwyY=; b=Pj5xpowUy5c71CFwKUIMdqoFvNZE0viKtzSoGQV7PGr3nmRzSUpyVnbjkUwLTWa4IY ibuOjcjUuIlHfWELratt5ph0G65qMNeeiOyOmUGxMlNvnfxhI4TzLghYWa/saOypuTXH 91EU3zHumz4g17t6xGQJ0Jjpm4XqNam9oGLcwIt76jexTZ/s+Qi1Pj8zlhgJJapuBuAC jEUL+sKwdHYCNU4x38UlWJoeXF6iXgz2gIMGJ+TuTn16J7lgGy2YDy+8OoaDAArltD/X 9WzCqIXGjAjVBRAjU0Nj5LN3+j3KMx2T1TEwc5D1MejL54IkCVFyhx/8S2DNCgSTiKm/ t2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=adm+0AAXR4lUs0ZOrBT4vqL0yT5f9ATKPEJVOEmjwyY=; b=DX8qd5eIJYslB5/YkMgnV/JHDdOajaXItKjdAYUKATUsVQmmaIO8mEMI1c/XHvTeIh b5SCtw2Iw4LgE+QsvqoVaWQ5TYlBHIs+upmiUlQxROOI+U2anZA4DOUeaC5QYhU1d0Z2 lLQzQNmqh1hBrU1qeKdzqcH0gnXyXa7uvp+/O8pX3ZZm8DyqZYdcZRAmgTbKErHsJE94 ujxjU1ys3TldOmbHCBH7T6OYLEx6OhqlHTS9cVuWe2vimxp9to0gpATL2qs2zGR9tECd om2idq7Dm3rBX0be74/G6kPYlOXdd6OVu6auTSUWT2jWTFNUselvBZ3k/igHpFPVdWFB GDpg== X-Gm-Message-State: AOAM531eeDBX1F4stIL2RhzTtDYrfgiirEzLF6aItjoGtKK3wvQDr3Xj 69NqYKpd7wRWwqQpqFK2KvkmyAX377XH6K31UgjJipS9wX4= X-Google-Smtp-Source: ABdhPJzYtOMWVnO7Hi5iKO0/H6v5SfKPy/ScOoNXLpgC1Dbw7T1gfTd1haFOEgn2lZhQz3/hW6MqMehsjYAAYKJX+JE= X-Received: by 2002:ac8:73c4:: with SMTP id v4mr13723781qtp.208.1617988043443; Fri, 09 Apr 2021 10:07:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 9 Apr 2021 19:07:13 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000948ff305bf8d3204" Subject: Re: [PHP-DEV] FPM: Three-Phase running idea for faster frameworks From: harmsmitsdev@gmail.com (Harm Smits) --000000000000948ff305bf8d3204 Content-Type: text/plain; charset="UTF-8" Hey, I have seen this a while ago and it looks promising, however, I do have my fair share of concerns, namely: 1. We should be able to define some sort of TTL. What happens if no request comes for over an hour? Albeit this is *really* unlikely. 2. Why not implement a mechanism similar to `fork` for these new requests? So that we duplicate the memory of the process and are able to spawn new instances way faster. 3. How many instances will be kept in (I suppose) a pool for answering the requests? Regarding database connections, almost all adapters support some form of connection pooling, so the example you mention about a database connection is a bit obsolete in my opinion. Furthermore, how will we deal with database timeouts, resource exhaustion, and many other problems that might arise when stalling certain processes for too long? Just to see what we should do about the aforementioned issues, I propose that you create some sort of a basic implementation at first, so that benchmarks can at least show us how much of a difference this makes. As far as I can see, the difference will be negligible since most modern frameworks do allow you to generate PHP files, which get pre-compiled by OPCache, and thus already give amazing performance. Also, extensions like APCu go unnoticed and already greatly help storing e.g. pre-compiled routes, if you do not want to generate PHP files. For now, this will require some more discussion. Kind regards, Harm Smits --000000000000948ff305bf8d3204--