Bug #70130 [Opn->Fbk]: usleep(1) CPU usage

From: Date: Wed, 09 Dec 2015 01:15:02 +0000
Subject: Bug #70130 [Opn->Fbk]: usleep(1) CPU usage
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197713@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 Updated by: yohgaki@php.net Reported by: saniafd93 at gmail dot com Summary: usleep(1) CPU usage -Status: Open +Status: Feedback Type: Bug Package: SPL related Operating System: Ubuntu 14.04 PHP Version: 5.5.27 Block user comment: N Private report: N New Comment: 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? Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2015-07-29 06:19:52] saniafd93 at gmail dot com I've already reviewed the PHP versions on my machines: - 2core Windows 8.1 - PHP 5.5.13 - 4core Windows 8.1 - PHP 5.5.19 (also tested PHP 5.6) - 4core Ubuntu 14.04 - PHP 5.5.9 - 8core Ubuntu 14.04 - PHP 5.5.9 But the fact remains: 5.5.9 before March worked fine ------------------------------------------------------------------------ [2015-07-29 05:28:41] saniafd93 at gmail dot com 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. I was badly surprised by this bug in a LTS version. Anyway, this is a strange behavior, because as I wrote, untill March all worked fine. CPU usage on production Ubuntu 14.04 was ~1% with usleep(1); Same behavior now requires at least usleep(10000); ------------------------------------------------------------------------ [2015-07-28 23:46:34] cmb@php.net > All worked nice untill March 2015, [...] What do you mean by that? Did you update to a newer PHP version? If so, which version did you use before, and which version do you use now. ------------------------------------------------------------------------ [2015-07-24 17:11:09] saniafd93 at gmail dot com I was wrong about number of cores. Here is new summary with processor models: - 2core Windows 8.1 (Intel Pentium P6100 2.0 GHz) usleep(1); // CPU usage: 0%-1.5% usleep(10000); // CPU usage: 0%-1% - 4core Windows 8.1 (Intel Core i3 4130 3.4 GHz) usleep(1); // CPU usage: 0%-1% usleep(10000); // CPU usage: 0%-1% - 4core Ubuntu 14.04 (Intel Celeron J1900 2.0-2.42GHz) usleep(1); // CPU usage: ~25% usleep(10000); // CPU usage: ~5% - 8core Ubuntu 14.04 (Intel Xeon E5506 2.13GHz) usleep(1); // CPU usage: ~48% usleep(10000); // CPU usage: ~1% ------------------------------------------------------------------------ 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 (#197713) next »