PHP vs. Python vs. Perl
Andreas Vierengel
avierengel at gatrixx.com
Fri Jun 30 14:18:50 UTC 2006
Steven Grimm wrote:
> I think this is really a test of libmemcache vs. Python vs. Perl. From
> what you've described, it sounds like PHP's performance was basically
> not a factor in the results since all the work was being done by the C
> memcached client library.
>
> My guess is that if you were to wire libmemcache into Python or Perl
> (say, using SWIG) you would see a similar speed increase there too.
> Based on your other results, you'd probably be back to mod_perl being
> the fastest of the three.
>
> We actually use the native PHP client with a bunch of local
> modifications rather than the libmemcache-based one. That's for a few
> reasons: when we were first setting up memcached, libmemcache was too
> unstable (which seems to no longer be the case), we want to be able to
> do rapid test cycles on changes to the client library, and finally, our
> profiling shows that the memcached client code represents a tiny
> fraction -- in the 1% range -- of the total CPU time we take to display
> a page.
>
> -Steve
>
that's exactly my experience, too. We use also a self written client but
in perl, which is about 70% the speed of Cache::Memcached. It doesn't
show up in our profiling either, so this is was not a major decision for
us, which language to use or which language is "better" :)
We have one exception and here we use a minimalistic self-written
c-library to "stream" data to memcache as fast as possible ( about
20.000 set/s and 2000 get/s with our perl-client from about 30 Webserver )
--Andy
More information about the memcached
mailing list