php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58786 many times get method cause high cpu usage
Submitted: 2009-08-02 13:04 UTC Modified: 2009-08-04 23:21 UTC
From: yorgosun at gmail dot com Assigned:
Status: Not a bug Package: memcached (PECL)
PHP Version: 5.2.10 OS: CentOS 5.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yorgosun at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-02 13:04 UTC] yorgosun at gmail dot com
Description:
------------
I wrote a test script, when I request it in high concurrent 
connections(about 200c/s),php process cause high cpu 
usage(about 25% 
usage on 1.6G Xeon * 2's server).

follow is the script code:
<?
 $mem = $dbm->getMemcached();

 $in = "testword!";
 $mem->set("DDDFFD",$in);

 for($i=0;$i<100;$i++)
 {
        $out = $mem->get("DDDFFD");
        echo $i.":".$out."<BR>";
 }
?>

My project must using the get method many times to catch the 
data in 
php script, project's script can't support enough concurrent 
connections.

Does this issue happen because libmemcached or 
php_memcached?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-04 05:27 UTC] yorgosun at gmail dot com
sorry, It's other things to caused this issue

Ignore it.
 [2009-08-04 17:17 UTC] andrei@php.net
I'm curious, which things were these?
 [2009-08-04 23:21 UTC] yorgosun at gmail dot com
$dbm->getMemcached(); 

that code not return a real memcached instance, it return a 
instance that contain some our own code.

the code calculate memcached execute time, using microtime().

I think the code executed many times cause this issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC