Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112488 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38387 invoked from network); 11 Dec 2020 10:52:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Dec 2020 10:52:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 986431804C9 for ; Fri, 11 Dec 2020 02:22:47 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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, 11 Dec 2020 02:22:47 -0800 (PST) Received: by mail-wm1-f41.google.com with SMTP id y23so8073998wmi.1 for ; Fri, 11 Dec 2020 02:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=2OUVbUjIY3tHlY3+d9QxMjx1HCwyLz589XmcuL3OcQc=; b=SQDhSDyvAVx9NZkOHd2VZtDfebnuusmT6dbUmHez+Ky/PQ7QLVGFKb+LUDHx4bovx+ n/jqsZK4MmR/JtaZSHmioSbY63qMi/8Ku5AdzB8DRX0Wo303jBHRZYdijtRsCOGtzbZf OY1ADNT3OLPG+2vVxIipIecmFVSfn9yF0PJe5Jii6x7mx4bOZ+X8MV8xhElxH1gRyyvQ zYfyXkMOnVpagyj++wog8KkaI2bLZh7wE0zXeAJzgFdxf3LulgS8Cy8APLnMxMVQ0TuE SgGKIIl8SPrcfSosjQ1AqdLZoqmZXmIezH1OECQVgfRs4fpFdEomv/iEdy1DwFyxYz1Z OzGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=2OUVbUjIY3tHlY3+d9QxMjx1HCwyLz589XmcuL3OcQc=; b=F13UJ4hRuEBlDuS9I45NG9xjZN8msd8aIh8NLApH9bqZ+JuRWazZehD4P8RzGk8dnY 1WKqO5DvNwN2TCsHrjWz9K2A8kz+NLv1beuy86QaY5ARCd1nZkylzm19w45dz15LacDx uL2FtauolzWnvq4TeazBDgDiDhWa2qD+0YyZfnnBDCdBGTRuOgu7J1T2X8v9DBmvYPlp VUvwClSytNDVSLq4bkr7Wk1TMVGeGH22v6QyHygIfWytiRUwRr9BT38+JLB4h5M1lGTz RgANPMft2cAB6EuZ2JwnEw482lMYSBRn2pzMxo2r73EheDk/V4oXzbhnN1/LCGqoELoF bdqA== X-Gm-Message-State: AOAM5306MYmgzHfiuZDYZ49XvvTk+yqlcACrLuGbVs1hoUmthfMrkDYU XaVp3C5zT7Jc7W19jL36pgUWge1t2pY= X-Google-Smtp-Source: ABdhPJx/1zcqaB9v6qDyRmP1jI71mDGhP1oqmri/s5bDOCXYDxv+r58/ZIgtMz+QR8RFzgr9+Cp8FQ== X-Received: by 2002:a1c:a5d4:: with SMTP id o203mr12790796wme.41.1607682164736; Fri, 11 Dec 2020 02:22:44 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id o17sm14899457wrg.32.2020.12.11.02.22.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 02:22:43 -0800 (PST) To: internals@lists.php.net References: Message-ID: <7a20cd8a-f38a-cbfe-1ae7-0b69351bc37e@gmail.com> Date: Fri, 11 Dec 2020 10:22:42 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Measuring maximum execution time based on wall-time From: rowan.collins@gmail.com (Rowan Tommins) On 11/12/2020 09:59, Máté Kocsis wrote: > I would also be very curious if > anyone is aware of the reasons why the CPU time metric was chosen back > then? In my opinion, wall-time is much more useful, but maybe I'm just > missing some technical limitations (?). For most users, the max execution time is not really a precise metric, but a backstop to prevent against a process running forever - for instance, it will trap an accidental infinite loop (accidental infinite recursion, meanwhile, is often caught by the memory limit in my experience). For that use case, it can actually be desirable to exclude things like database and network calls (i.e. to use CPU time rather than wall time) because they will vary for completely different reasons and on different scales. For instance, if an SQL query takes 30 seconds, you might want to log that and work on optimising it, but your application is still functional. However, if a normal web page uses 30 seconds of CPU time in the main thread, something has probably gone seriously wrong, and you probably want to kill the process to stop it using all the server's resources. I think your proposal to allow both limits to be set independently is sensible, and imagine that most users will want a much higher clock-time limit than the CPU-time limit. Regards, -- Rowan Tommins (né Collins) [IMSoP]