PHP/PECL C Memcache extension slowness?

Justin Matlock jmat@shutdown.net
Thu, 18 Mar 2004 00:36:48 -0500


Aw yeah.......  That's more like it...   :)

jmat@omega jmat $ php -v
PHP 4.3.5RC3 (cli) (built: Mar 11 2004 13:48:16)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Turck MMCache v2.4.6, Copyright (c) 2002-2003 TurckSoft, St.
Petersburg, by Dmitry Stogov
    with Zend Extension Manager v1.0.1, Copyright (c) 2003, by Zend
Technologies
    with Zend Optimizer v2.5.1, Copyright (c) 1998-2004, by Zend
Technologies

jmat@omega jmat $ ./test.php 10000
Using the memcache.c PECL extension ....
Starting... writing 10000 random keys/values to memcache...
Done...wrote in 0.68966598510742 seconds
Starting... getting 10000 random keys/values from memcache...
Done.... read in 0.60540909767151 seconds 

Using the PHP class by Ryan Dean ....
Starting... writing 10000 random keys/values to memcache...
Done...wrote in 5.93298323828122 seconds
Starting... getting 10000 random keys/values from memcache...
Done.... read in 5.32992921399442 seconds 

jmat@omega jmat $ ./test.php 10000

Using the memcache.c PECL extension ....
Starting... writing 1000000 random keys/values to memcache...
Done...wrote 1000000 in 67.899487018585 seconds
Starting... getting 1000000 random keys/values from memcache...
Done.... read keys in 59.990712165833 seconds

Using the PHP class by Ryan Dean ....
Starting... writing 1000000 random keys/values to memcache...
Segmentation Fault

(doh!)


This is just after the 1M test; memcached was stopped/restarted to clear the
stats:

STAT pid 11388
STAT uptime 295
STAT time 1079587899
STAT version 1.1.10
STAT rusage_user 35:268638
STAT rusage_system 50:217365
STAT curr_items 1000000
STAT total_items 1000000
STAT bytes 81999600
STAT curr_connections 1
STAT total_connections 3
STAT connection_structures 2
STAT cmd_get 1000000
STAT cmd_set 1000000
STAT get_hits 1000000
STAT get_misses 0
STAT bytes_read 82777802
STAT bytes_written 74888906
STAT limit_maxbytes 1201326592



-----Original Message-----
From: memcached-admin@lists.danga.com
[mailto:memcached-admin@lists.danga.com] On Behalf Of Antony Dovgal
Sent: Monday, March 15, 2004 7:14 AM
To: jmat@shutdown.net
Cc: memcached@lists.danga.com
Subject: Re: PHP/PECL C Memcache extension slowness?

On Fri, 12 Mar 2004 16:21:22 -0500
"Justin Matlock" <jmat@shutdown.net> wrote:

> This is an odd one, and I was wondering if anyone else was seeing this.
<snip>

Justin, can you plz try latest CVS version (i.e. 1.8 Revision) ?
It seems, I found the reason why it was so slow.

Thanks.

---
WBR,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com