Bug #70130 [Com]: usleep(1) CPU usage

From: Date: Wed, 21 Apr 2021 13:02:43 +0000
Subject: Bug #70130 [Com]: usleep(1) CPU usage
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233542@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70130&edit=1 ID: 70130 Comment by: gerdchristian dot kunze at googlemail dot com Reported by: saniafd93 at gmail dot com Summary: usleep(1) CPU usage Status: Re-Opened Type: Bug Package: Unknown/Other Function Operating System: Ubuntu 14.04 PHP Version: 5.5.27 Block user comment: N Private report: N New Comment: Same behavior on Ubuntu 20.04 Php 7.4 Hardware: - Synology DS920+ Virtual Machine: - 4 Core 2 GB RAM Default install in VirtualMachineManager (from Synology) OS: - Ubuntu 20.04 (latest updates at comment) - Installed from LegacyServerISO (not LiveISO) as minimum virtual machine Webserver: - Apache 2.4.41 Default install PHP: - 7.4.3 FPM Default install Test: - while(true){usleep(1);} Result: - Cpu @ ~25% Test: - while(true){usleep(1000);} Result: - Cpu @ ~2% Test: - while(true){sleep(1);} Result: - Cpu @ ~1% Previous Comments: ------------------------------------------------------------------------ [2015-12-29 04:46:27] cyril at grazetech dot com PHP 5.6.11-1ubuntu3.1 Ubuntu 15.10 Intel Core i5-5257U CPU @ 2.70GHz I am seeing 4% - 6% CPU usage with usleep(1) ------------------------------------------------------------------------ [2015-12-20 11:16:02] saniafd93 at gmail dot com @yohgaki yes, bug still present on Ubuntu 14.04 (kernel version 3.13.0-65, php version 5.5.9-1). Sorry for my late answer. ------------------------------------------------------------------------ [2015-12-20 04:22:14] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2015-12-09 01:15:01] yohgaki@php.net I tested on my Fedora 22 64bit with PHP 5.5/5.6/7.0 (today's git) and didn't have this issue. @saniafd93 do you still have this problem? ------------------------------------------------------------------------ [2015-08-10 22:37:05] cmb@php.net > I didn't update to a new version, because the latest PHP version > on production environment (Ubuntu 14.04) was PHP 5.5.19 all the > time. Hard to tell what's causing the problem then. It might not be a PHP issue at all. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=70130 -- Edit this bug report at https://bugs.php.net/bug.php?id=70130&edit=1

« previous php.bugs (#233542) next »